This section describes the order process between Mirakl Connect and the channel, as well as the APIs and events the connector must implement.
Below is the list of flows:
- Import channel orders into Mirakl Connect.
- Update channel orders according to seller actions in Mirakl Connect.
- Trace the channel order operation status and log it in Mirakl Connect.
Each flow is detailed in the next sections.
To import orders placed on the channel, the connector must fetch the orders from the channel and upserts them in Mirakl Connect using the upsertOrders API. This API also updates orders based on changes that occur on the channel. For more information, refer to the REST APIs reference.
Note: This API operates in replace mode, meaning each time the API is called, the order payload replaces the existing order data in Mirakl Connect.
Once the orders are imported into Mirakl Connect, the seller can process actions such as accepting or shipping the order. These operations must be synchronized with the channel.
To achieve this, the connector must implement consumers for the order events that Mirakl Connect triggers each time there is an action on the order, updating it on the channel.
The event to implement is OrderActionEvent. Below the different actions that trigger this event:
ACCEPT: The seller accepts or refuses the order.CREATE_SHIPMENT: The seller ships the order, and the event contains shipping tracking information.
For more information, refer to the Event APIs reference.
The previous section describes the events the connector consumes to update channel orders with seller operations. This section describes how to trace the operation results.
All the operation events mentioned earlier include the field action_id at the root of the payload. For each processed event, the connector must provide an integration status to Mirakl Connect using this action_id by calling the updateActionStatus API.
For more information, refer to the REST APIs reference.