Supply Lens

Set up Mirakl

Lesson 17 of 30 8 min read

Connect a Mirakl shop, choose order states without breaking acceptance, deal with customers withheld until payment, and send stock by location.

Mirakl is the software behind many retailers' marketplaces, so one connector reaches a whole family of "Mirakl-based channels". Each marketplace configures Mirakl its own way, and two behaviours catch people out: orders that must be accepted before they progress, and customer details that are hidden until the payment clears. The Mirakl settings exist to handle exactly those.

By the end of this lesson you'll be able to connect a Mirakl shop and choose order settings that won't strand orders awaiting acceptance or import them without a customer.

Connect

Connect Mirakl with the seller's API key and, optionally, a Shop ID. If you leave the Shop ID blank, Supply Lens uses the shop the API key belongs to. Fill it in when the key can see more than one shop.

The Mirakl order states

includeOrderStatuses takes Mirakl's state codes. Case doesn't matter:

STAGING, WAITING_ACCEPTANCE, WAITING_DEBIT, WAITING_DEBIT_PAYMENT, SHIPPING, SHIPPED, TO_COLLECT, RECEIVED, CLOSED, REFUSED and CANCELED (Mirakl spells it with one L).

includeOrderStatusesWhen set, only orders currently in these states are requested from Mirakl. Empty means any state. A value that isn't one of the states above fails the import with an error naming it.
customerDebitedOnlyWhen true, only orders whose customer payment has been debited are requested.
importDelayWait before importing, for other apps or for the marketplace to fill in details such as the customer after payment.
setupDate / lastImportDateGo-live cut-off and watermark, managed by the system.

An order left out because of its state is picked up on a later import, once it moves into an included state.

The two traps

Trap 1: acceptance

Mirakl orders can only be accepted while they're in WAITING_ACCEPTANCE. If Supply Lens sends order acknowledgements to Mirakl, it can only accept orders it has imported in that state.

Keep WAITING_ACCEPTANCE when you send acknowledgements

If you leave WAITING_ACCEPTANCE out of includeOrderStatuses, or turn on customerDebitedOnly, orders awaiting acceptance are never imported, so they're never accepted.

Trap 2: the missing customer

Some marketplaces withhold the whole customer record (name, contact details and addresses) until the payment is debited. An order imported before then arrives with no customer and isn't re-read afterwards.

Rendering diagram...

With customerDebitedOnly on, such an order is held back and imported, complete, on the first import after the debit. It's the clean fix, but only when you are not sending acknowledgements.

Customer and Location

defaultCustomerIdThe Party used when an order has no identifiable customer.
alwaysSetDefaultCustomerIdUse the default customer for every order.
defaultFulfillmentLocationIdThe ship-from Location for every order. When set it is always used, taking precedence over Mirakl's warehouse and fulfilment centre codes, which are still recorded on the Document.
disableExpectedPayableTagSkip the total check at import.

Set defaultFulfillmentLocationId when everything ships from one place, or when the seller doesn't use Mirakl warehouses.

Stock

splitByLocationWhen true, stock is sent as separate records per fulfilment Location instead of one total, so Mirakl can track each warehouse.

Brightwater Drinks on a retailer marketplace

Brightwater Drinks sells on a Mirakl-based retailer marketplace that requires acceptance, and Supply Lens sends the acknowledgements.

  • Shop ID is filled in because the API key covers two shops.
  • includeOrderStatuses = WAITING_ACCEPTANCE, SHIPPING. customerDebitedOnly stays off.
  • importDelay is set to give the marketplace time to fill in details.
  • defaultFulfillmentLocationId is the single warehouse; Mirakl's codes are still visible on each Document.
  • One warehouse, so splitByLocation stays off.

Recap

  • Connect with an API key; the Shop ID is optional and defaults to the key's shop.
  • includeOrderStatuses takes Mirakl state codes; a wrong code fails the import.
  • If you send acknowledgements, keep WAITING_ACCEPTANCE and leave customerDebitedOnly off.
  • Otherwise customerDebitedOnly avoids importing orders with no customer.
  • defaultFulfillmentLocationId overrides Mirakl's warehouse codes; splitByLocation sends stock per Location.
Complete and take the quiz

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