Shopping Integrations
Order integrations
The order integration starts when the checkout process is finished, and payment is committed with the payment Service provider (PSP). Norce's solution is flexible and can be set up in several different ways, depending on the client´s business processes.
Flexibility is key, but we have found that a default integration pattern, a defined setup is easier to start discussions from.
- When an order is received in Norce it is sent through the Norce Commerce Connect process to the ERP system that is master of the orders.
- Firstly, the
OrderReceivedEvent
is triggered. To be able to send a notification to the end customer the integration can listen to this event and fetch data from Norce Commerce Query and send an email through an email service provider. - The actual order, or
OrderRequest
message is pushed to the integration from Norce using a REST protocol. An “OK” is received. If something goes wrong, Norce will retry calling the integration for some time before alerting and logging the order.
- Firstly, the
The ERP will receive the order and start the process. This is done asynchronously as the ERP might take a longer time to process than is feasible to wait on. The best practice is to store the message in a queue and return an “OK” back to Norce.
- During the processing of the order by the ERP, it is possible to send status updates to Norce.
- An acknowledgement is sent back to Norce, which sets the status in Norce Commerce to “Confirmed” and updates the order with the ERP order number for traceability.
- Other statuses can be sent back to Norce, like “canceled”.
- When the order is picked, packed and shipped an event is sent to Norce
- When a dispatch is created in the ERP the delivery note is sent to Norce, with tracking information.
- A notification to the end customer is also sent from the integration to an email service provider.
- When an invoice is created in the ERP it is sent to Norce, with finalized information from the order and a correct amount that should be captured from the end customer. Norce will then use this invoice information to send a capture message to the Payment Service Provider (PSP).
Order history
After the order is sent to the ERP, Norce does not keep track on detailed order changes. Norce Commerce has only a general view of the order process based on the status changes sent to Norce Commerce from the ERP.
For clients that needs a detailed view on their sales channels, the best practice is to provide the relevant order history data directly from the ERP to the front-end application.
About the APIs
For system integration with Norce Commerce use:
- Norce Commerce Connect The API used by all system integrations is the Norce Commerce Connect. Read about how use it here: Calling Norce Commerce Connect
- Norce Commerce Query The API used to lookup and fetch data is the Norce Commerce Query. This is a queryable API that exposes Norce Commerces data layer for the solutions. Read about how to use it here: Calling Norce Commerce Query
- Norce Commerce Event Norce Commerce Event starts processes when something has happened in Norce Commerce. This is a service bus that the solutions can listen to and subscribe to events. Read about how use it here: Using Norce Commerce Event
Integration use cases
Below is a list of all integration endpoints, with some explanations and links to examples and other resources.
Read about Norce Commerce’s System integration patterns to get more detailed information on how to build your integration. Read about Implement an Order Receiver Service to understand how to receive and handle order integration specifically.
Create a customer order
Norce Commerce sends out a CreateOrder
call as a SOAP or REST call to a configured URL for the client and expects a response with status or an exception.
This order creation integration process is described more in its own page here: Implement an Order Receiver Service.
Configurations and other resources
- The full OrderRequest schema and its OrderResponse
- Configuration in the Admin UI
- ERP integration section in client settings, help
- Creating the Order Receiver Service
Acknowledgement and order updates
The ERP send its order acknowledgement when the order is processed and trigger a SendOrderStatus call to Norce Commerce. This call can be used to update the order continuously during its lifetime.
It is possible to pass in additional fields (order info types) when
calling SendOrderStatus.
Use this, if Norce Commerce should handle storing important information on the order you want accessible from Norce Commerce Services.
Common statuses in the SendOrderStatus call are:
Status | Description |
---|---|
Allocation | Waiting on response from ERP (usually not used) |
Confirmed | Order is confirmed from the ERP, usually this call send in the ERPOrderNo to Norce |
BackOrder | Order is pending, waiting on suppliers |
Delivered | Order is delivered, but not invoiced |
Invoiced | Order is invoiced and done |
Cancelled | Order is annulled |
PartlyDelivered | Order is partly delivered, but not invoiced |
ReadyForPickup | Order is ready for pickup at store |
Creating delivery notes
This step is optional but is useful in some situations.
When a dispatch advice is created in the ERP a delivery note can be sent to Norce Commerce with tracking information and references to the sales order. This can be shown to the end customer or be used by mail notifications. When an order is updated through this step, there is no need to call the SendOrderStatus above for changing the status to “Delivered”, this is automatically done by the CreateDeliveryNote call.
The integration calls Norce Commerce Connect and creates a delivery note in Norce, that is linked to the Order. Notifications with tracking information can be sent at the same time. Many delivery notes for the same Order is allowed.
With Deliver notes you can pass in parcel numbers that can be shown to the customer in the frontend.
There are some examples in postman here
Creating invoice and capture payments
This step is optional but is needed for orders with payments that needs to be captured (settled) from Norce Commerce.
When an order is captured through this step, there is no need to call the SendOrderStatus above for changing the status to “Invoiced”, this is automatically done by the CreateInvoice call.
The integration calls Norce Commerce Connect and creates an invoice in Norce that is linked to the Order. This can trigger a capture of the payments. Many invoices for the same Order is allowed.
Functionality can be different for different payment methods and payment services. Check the documentation of the payment service for more details.
There are some examples in postman here
Credit payments
In order return scenarios, where the end customer needs to be repaid all or some of the amount, a CreditPayment call can be used. The call requires a credit invoice for a specific sales order and Norce will check for the sales orders payment information and send a credit payment call to the payment service provider (PSP).
There are some examples in postman here
Order process event types
Norce Commerce Event has several event types that can be used by the integration. Mostly this is needed for notifications to end customer or to other systems.
OrderReceivedEvent
This event gets triggered when Norce Commerce has received an order from the application, before it gets sent to the ERP system. These events are delivered only once for each order and can be used to send order received notifications.
The solution then listens to the event and lookup the Quotations in Norce Commerce Query, before sending the notification to the end customer.
- Administering Event types
- Looking up Quotations in Query
Norce Commerce might not have the order created when this notification is triggered, since the order process is about to start.
Recommended practice is to not send information based on the full order at this stage, only a minimal notification that it is received and is being processed.
OrderConfirmedEvent
This event gets triggered when Norce Commerce has received an order confirmation from the ERP-system. These events are delivered only once for each order and can be used to send confirmation emails.
The solution then listens to the event and lookup the Orders in Norce Commerce Query, before sending the notification to the end end-customer.
- Administering Event types
- Looking up Orders in Query
OrderReadyForPickupEvent
This event gets triggered when Norce Commerce has received an order status update signaling that the order is ready to be picked up at a store or another drop-point location. These events are delivered only once for each order and can be used to send notification emails.
The solution listens to the event and lookup the Order in Norce Commerce Query, before sending the notification to the end customer.
- Administering Event types
- Looking up Orders in Query