MultiOrder Sync

Send data between your order management system and Nacelle.

Use the MultiOrder Sync to link your order management system (OMS) to Nacelle, like FluentCommerce and Manhattan Associates.

Custom connector

To begin the data sync process, start by granting your OMS permission to send and pull data to and from Nacelle with the custom connector token. Set up a custom connector in the Nacelle dashboard.

Validation contract

There is no validation step required for sync.

Consume the contract

This sync is responsible for sending an order into a OMS. No fields need to be set or modified.

πŸ“˜

This API is used to sync an order with an OMS after the payment is processed. It is run as part of the order creation process.

REST API contract

Merchant Supplied Endpoint:

Example

https://merchant-mapper.com/sync/consume

HTTP Method: POST

Request format:

  • Headers:
    • Content-Type: application/json: Specifies that the request body contains JSON data
    • x-nacelle-signature-sha256: The signed payload signature. This is an HMAC signature. The secret can be retrieved from the Nacelle dashboard.
    • (Optional authentication headers)
  • Request Body (JSON): Based On (Create a Multi Order)
{
   ...
   "order_items": [...],
   "promotions":{...},
   "appplied_discounts":[...],
   "shipping_rate":{...}.
   "shipping_rates":[...],
 }

Response format:

  • Status Code:
    • 200 OK - The request was successful, and the order was synced to the OMS.
    • 400 Status Bad Request - The object is missing required data.
    • 401 Unauthorized - Authentication is required and not provided.
    • 403 Forbidden - The user does not have permission to update the task.
    • 422 Unprocessable Content - The merchant sync returned an error when syncing to the OMS.
    • 500 Internal Server Error - The merchant sync encountered an internal error like not being able to access the OMS.
Response body (JSON)

Based on the (Response Model Reference )

{
  "order": {...},
}

The response body indicates that the order has been successfully sent to the OMS.

Error handling (JSON)

Based on the (Response Model Reference )

{
  "order": {},
  "error": {
    "error": "Order Management system not responding",
    "category": "sync_service",
    "details": {}
  }
}

The response body includes an error field containing a descriptive error message, and a category with optional details. The category should be used to give the client information on how to parse the details section. For more information, see Error Responses in the Response model reference.

Consuming sync workflow

[Merchants] Call the create orders endpoint

Call the /multiorders endpoint in Nacelle to create an order using the REST API:

<https://noms.api.nacelle.com/api/v1/multiorders>
--header 'Authorization: Bearer <merchant-auth-token>'  
--header 'x-nacelle-space-id: <merchant-space-id>'  
--header 'Content-Type: application/json'  
--data-raw '{
  ...  
  "order_items": [...],  
  
}'

[Nacelle] Call the merchant sync

Nacelle uses the orchestration layer to call the merchant supplied endpoint:

https://merchant-mapper.com/sync/consume  
--header 'Secret: some secret/validation header to tell the merchant this is coming from a trusted source'  
--header 'Content-Type: application/json'  
--data-raw '{  
   ...  
  "order_items": [],  
}'

[Merchants] Merchant sync convert the order object

You then need to convert the order object into the required format for the 3rd party OMS.

[Merchants] Call the OMS

Call your OMS to sync the order.

[Nacelle] Continue with the orchestration flow

order, err := merchantMapperConfig.sync.consume(order)

If Nacelle encounters an error during any of the orchestration steps, we stop the orchestration flow and respond to the merchant with the error. Otherwise we continue to process other steps in the orchestration flow with the order.