This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
To export orders from Wix Restaurants to an external POS:
Listen for changes to Wix Orders with the Order Created and Order Approved events.
When these events are triggered, verify that the order contains restaurants items by checking lineItems
for items with catalogReference.appId
equal to "9a5d83fd-8570-482e-81ab-cfa88942ee60"
.
For example:
See the full Order Object structure for reference.
Create a mapping between Wix Restaurants orders and your external POS system orders to support syncing between them. Make sure to include all external IDs, such as order and customer IDs in the mapping. Store this mapping on your servers.
Create the complete order in the POS system using your POS API.
To import orders from an external POS into Wix Restaurants:
Retrieve the external order from the POS.
Create a mapping between your external POS system orders and Wix Restaurants orders to support syncing between them. Make sure to include all external IDs, such as order and item IDs in the mapping. Store this mapping on your servers.
Call List Locations to identify and save the relevant location ID. Use this ID as the businessLocationId
when creating Wix orders in the next step.
Call Create Order with restaurants catalog references.
You must specify the following in catalogReference
:
catalogItemId
: The ID of the item.appId
: The Wix Restaurants Orders (New) appId, "9a5d83fd-8570-482e-81ab-cfa88942ee60"
.options.operationId
: The operationId
of the operation the item is being ordered from.options.menuId
: The menuId
of the menu the item is being ordered from.options.sectionId
: The sectionId
of the section the item is being ordered from.You can optionally specify options.onlineOrderingPageUrl
. Specifying this allows customers on the site to click the item in the cart and navigate back to the item's modal where they can edit the item details.
If you want the order to be visible to the user in the orders kanban in the dashboard, create a fulfillment with the order details using Create Fulfillment.
Note: Wix Restaurants fulfillments are automatically created with the "Pending"
status.
To keep Wix Restaurants orders up to date with changes in an external POS:
Create a mapping between your external POS system orders and Wix Restaurants orders to support syncing between them. Make sure to include all external IDs, such as order and item IDs in the mapping. Store this mapping on your servers.
Listen to external events for changes to the POS.
Update your mapping according to the changes.
On any changes, update the relevant Wix order fulfillments by calling Update Fulfillment.