Supply Lens

Test your integration

Lesson 22 of 24 8 min read

Build a test plan from real sample orders, run it against the Sandbox, and read Document and Target Data statuses to see what happened.

Testing is where an integration earns trust. A test plan built from your awkward real-world orders, run in the Sandbox, catches the problems that would otherwise surface on your busiest day. In this lesson you will build that plan, run it, and learn to read the statuses that tell you what happened.

The basic test

Once your Sandbox Integration is enabled:

  1. Make sure a Mapping sends some test data from Supply Lens into Unleashed.
  2. Create or import a test order in the source system, or run the source Integration manually.
  3. Wait a few minutes, then check the Document in Supply Lens.
  4. Check the sales order in the Unleashed Sandbox.

You should see your test messages appear in Unleashed. That proves the connection; now prove the settings.

Build a test plan from your decisions

For each decision you made in the settings deep-dive, write one test order that proves it. A good plan for an order flow covers:

TestWhat it proves
A paid web orderDefault status, order number, customer creation
An unpaid order, or one tagged for reviewStatus rules, custom status
An order from an existing customerMatching, and whether the customer is updated
An order with a discount code and shippingCharge and discount mapping, Xero sales accounts
A gift order (different buyer and recipient)Delivery name, address and contact settings
An order with an unknown SKUThat it is held with a clear error
A foreign-currency order for a new customerCustomer created in the right currency
A cancellationdeleteCancelledOrders
A dispatch in UnleashedShipment flows back to the channel, order completed
A stock change in UnleashedInventory flows out to the channel

Reading what happened

Open the Document from its list and click the magnifying glass to see the Document summary.

Document statuses

  • PendingData has arrived and is waiting to be processed. Normally only for a fraction of a second.
  • In progressThe Document is being processed.
  • ReadyProcessed, but the Mapping is manual, so nothing has been sent yet.
  • CompleteProcessed to at least one Map.
  • FailedAn error was thrown. Open the Logs to see why.

Target Data communication statuses

Target Data is what Supply Lens sends to Unleashed for a Document.

  • PendingWaiting to be sent at the next opportunity.
  • In progressBeing sent now.
  • SentSent successfully.
  • FailedFailed to send. Check the logs.
  • CancelledTarget Data with the same reference already existed, so this copy was not sent. A safeguard against duplicates when you reprocess.

Use the logs and source data

  • The Logs button on the Document summary shows how the Document was built and, when it failed, why.
  • SOURCE DATA takes you to the original data the Document came from. You can download or copy it, view its logs, and reprocess, complete or cancel it.

Reprocess freely while testing

Because Target Data with the same reference is marked Cancelled rather than sent again, you can change a setting and reprocess without creating duplicates in Unleashed. To deliberately resend, the earlier Target Data with that reference must be set to Cancelled first.

Hilltop's test week

Priya runs her ten tests in the Sandbox. The gift order shows the buyer's name as the delivery name, so she turns on prioritiseNameForDeliveryName and reprocesses. The unknown-SKU order fails with A product with Id '00000000' or code 'GIFT-CARD' does not exist, exactly as intended. The dispatch test sends tracking back to the Shopify development store. She records each result in her project notes.

Recap

  • Prove the connection with one order, then prove each settings decision with its own test order.
  • Include awkward orders: gifts, discounts, unknown SKUs, foreign currency, cancellations.
  • Document statuses show processing; Target Data statuses show sending.
  • Use Logs and Source Data to diagnose, and reprocess safely: duplicates are cancelled, not resent.
Complete and continue

Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.