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).
| includeOrderStatuses | When 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. |
|---|---|
| customerDebitedOnly | When true, only orders whose customer payment has been debited are requested. |
| importDelay | Wait before importing, for other apps or for the marketplace to fill in details such as the customer after payment. |
| setupDate / lastImportDate | Go-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.
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
| defaultCustomerId | The Party used when an order has no identifiable customer. |
|---|---|
| alwaysSetDefaultCustomerId | Use the default customer for every order. |
| defaultFulfillmentLocationId | The 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. |
| disableExpectedPayableTag | Skip the total check at import. |
Set defaultFulfillmentLocationId when everything ships from one place, or when the seller
doesn't use Mirakl warehouses.
Stock
| splitByLocation | When 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.customerDebitedOnlystays off.importDelayis set to give the marketplace time to fill in details.defaultFulfillmentLocationIdis the single warehouse; Mirakl's codes are still visible on each Document.- One warehouse, so
splitByLocationstays off.
Recap
- Connect with an API key; the Shop ID is optional and defaults to the key's shop.
includeOrderStatusestakes Mirakl state codes; a wrong code fails the import.- If you send acknowledgements, keep
WAITING_ACCEPTANCEand leavecustomerDebitedOnlyoff. - Otherwise
customerDebitedOnlyavoids importing orders with no customer. defaultFulfillmentLocationIdoverrides Mirakl's warehouse codes;splitByLocationsends stock per Location.
Quick guides for this topic
Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.