Skip to main content

Integration Status Handling

For those who are syncing their Kojo orders to another system, the integrationState field allows you to present the status of each order's link to the Kojo user. See the IntegrationState enum under the GraphQL or REST Orders reference for a description of each status.

Kojo will leave all orders in a NOT_LINKED state by default, allowing you to use this field as needed. In addition, Kojo will set orders to an OUT_OF_SYNC state if a change is made in Kojo after you have marked the order LINKED.

In general, the flow for syncing orders from Kojo to an integrated system should be:

  • pull the orders that are in a NOT_LINKED, OUT_OF_SYNC, or ERROR state;
  • create the orders in the integrated system (or update them if they are OUT_OF_SYNC);
  • call the updateOrderIntegrationState endpoint to mark the order as LINKED if successful, or ERROR if not.

Last Sync Time​

Each order has a read-only integrationLastSync time, which Kojo will set to the time that the order was last updated to a LINKED status. If the order has never been marked LINKED, the integrationLastSync will be null.