Skip to main content

Message Formats

The Notification service includes the following message formats:

Order Notification

The Order Notification service provides customers and integrators the ability to subscribe to order updates that indicate when the order status changes.The subscription is enabled using Amazon Simple Queue Service (SQS), and the type of the subscription can be defined by the integrator, such as Short Message Service (SMS), email, or push notifications. The Amazon Resource Name (ARN) for the Simple Notification Service (SNS) topic is created per company using the following pattern: arn:aws:sns:{region}:{source_owner}:proda-pos-notifier-{company_id}. After the SNS topic is created, the subscription can be configured based on the integrator’s needs.

For more information on the message formats, see Message Formats for samples of each message type.

The following notifications use the Order Notification format:

Sample 1 - Committed Order (From Cloud)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "committed",
    "order_condition": "committed",
    "order_number": "999999",
    "origin": "mobile",
    "payment_status": "open",
    "site_id": "999999999999",
    "state": "committed",
    "store_number": "999999",
    "timestamp": "201-99-99T19:55:34Z"
}

Sample 3 - Checked-in Order (from Store)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "",
        "consumption_type": "OnPremises"
    },
    "notification_status": "checkedin",
    "order_condition": "checkedin",
    "order_number": "999999",
    "origin": "999999",
    "payment_status": "paid",
    "site_id": "999999999999",
    "state": "checkedin",
    "store_number": "999999",
    "timestamp": "20YY-11-07T22:05:12Z"
}

Sample 2 - Commit Delayed

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "committed",
    "order_condition": "delayed_delivery",
    "order_number": "999999",
    "origin": "mobile",
    "payment_status": "paid",
    "site_id": "999999999999",
    "state": "committed",
    "store_number": "999999",
    "timestamp": "20YY-11-07T20:51:20.815Z"
}

Sample 4 - Checked-in Order (from Cloud)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "checkedin",
    "order_condition": "checkedin",
    "order_number": "999999",
    "origin": "mobile",
    "payment_status": "open",
    "site_id": "999999999999",
    "state": "checkedin",
    "store_number": "999999",
    "timestamp": "20YY-11-08T19:55:34Z"
}

Sample 5 - Check-in Delayed

JSON

{
  "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "checkedin",
    "order_condition": "delayed_delivery",
    "order_number": "999999",
    "origin": "mobile",
    "payment_status": "paid",
    "site_id": "999999999999",
    "state": "checkedin",
    "store_number": "999999",
    "timestamp": "20YY-11-07T20:51:20.815Z"
}

Sample 6 - Cancelled Order (from Store)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "voided",
    "order_condition": "voided",
    "order_number": "999999",
    "origin": "999999",
    "payment_status": "open",
    "site_id": "999999999999",
    "state": "voided",
    "store_number": "999999",
    "timestamp": "20YY-11-09T09:25:33Z"
}

Sample 7 - Cancelled Order (from Cloud)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "Carry Out",
        "consumption_type": "OnPremises"
    },
    "notification_status": "voided",
    "order_condition": "voided",
    "order_number": "999999",
    "origin": "mobile",
    "payment_status": "open",
    "site_id": "999999999999",
    "state": "voided",
    "store_number": "999999",
    "timestamp": "20YY-11-09T09:25:33Z"
}

Sample 8 - Overringed Delayed

JSON

{
    "_id": "999999999999",
    "state": "overringed",
    "payment_status": "refunded",
    "timestamp": "20YY-04-29T19:06:54.822Z",
    "notification_status": "voided",
    "origin": "mobile",
    "site_id": "",
    "company_id": "999999999999",
    "store_number": "999999",
    "order_number": "999999",
    "order_condition": "delayed_delivery"
}

Sample 9 - Kitchen Bump (from Store)

JSON

{
    "_id": "999999999999",
    "company_id": "999999999999",
    "destination": {
        "id": "999999",
        "name": "",
        "consumption_type": "OnPremises"
    },
    "notification_status": "bumped",
    "order_condition": "bumped",
    "order_number": "999999",
    "origin": "999999",
    "payment_status": "paid",
    "site_id": "999999999999",
    "state": "bumped",
    "store_number": "999999",
    "timestamp": "20YY-11-07T22:06:20Z"
}

Sample 10 - New Business Date (from Store)

JSON

{
"platform": "MOAPI",
"platform_version": "1.0",
"msg_type": "moapi.notification",
"msg_id": "999999999999",
"content_type": "application/json",
"payload": "{\"business_date_update\":{\"name\":\"\",\"store_number\":\"999999\",\"last_contact_time\":\"20YY-11-09T09:17:56Z\",\"business_date\":\"20YY-11-09T05:00:00Z\",\"pos_type\":\"IRIS\",\"pos_version\":\"3.8 build 1775\",\"server_timestamp\":\"20YY-11-09T09:18:01.176Z\",\"site_id\":\"999999999999\",\"company_id\":\"999999999999\"}}"
}

Sample 11 - Purged Order at EOD (from Cloud)

JSON

{
    "platform": "MOAPI",
    "platform_version": "1.0",
    "msg_type": "moapi.purged_orders",
    "msg_id": "999999999999",
    "content_type": "application/json",
    "payload": "{\"purged_orders\":[{\"_id\":\"999999999999\",\"state\":\"open\",\"company_id\":\"999999999999\",\"order_number\":\"999999\",\"site_id\":\"999999999999\",\"store_number\":\"999999\"},{\"_id\":\"999999999999\",\"state\":\"open\",\"company_id\":\"999999999999\",\"order_number\":\"999999\",\"site_id\":\"999999999999\",\"store_number\":\"999999\"},{\"_id\":\"999999999999\",\"state\":\"open\",\"company_id\":\"999999999999\",\"order_number\":\"999999\",\"site_id\":\"999999999999\",\"store_number\":\"999999\"}]}"
}

Sample 12 - Order Ready

JSON

{
   "_id": "99459ad4-841d-4fc7-b867-441de560d972",
   "order_number": "123",
   "origin": "101",
   "state": "saved",
   "order_status": {
      "status": "saved"
   },
   "payment_status": "paid",
   "fulfillment_status": "order_ready"
   "timestamp": "2024-02-28T15:38:34.289Z",
   "notification_status": "order-ready",
   "company_id": "59ceaef2ff6d56240036f6f4",
   "site_id": "59ceb0a3ff6d56240036f6f9",
   "store_number": "101"
}

Sample 13 - Order Fulfilled

JSON

{
   "_id": "99459ad4-841d-4fc7-b867-441de560d972",
   "order_number": "123",
   "origin": "101",
   "state": "saved",
   "order_status": {
      "status": "saved"
   },
   "payment_status": "paid",
   "fulfillment_status": "fulfilled"
   "timestamp": "2024-02-28T15:38:34.289Z",
   "notification_status": "order-fulfilled",
   "company_id": "59ceaef2ff6d56240036f6f4",
   "site_id": "59ceb0a3ff6d56240036f6f9",
   "store_number": "101"
}

Sample 14 - 1 Order Ready

JSON

{
    "message": {
        "_id": "8d714f54-ba81-49a3-a642-eda988a1e934",
        "company_id": "649092475e665ca98844c8c7",
        "destination": {
            "consumption_type": "OffPremises",
            "id": "carry-out",
            "name": "Carry Out"
        },
        "notification_status": "order-ready",
        "order_condition": "order-ready",
        "order_number": "900477",
        "order_source": "Mobile",
        "order_source_ext": {
            "is_ado": false,
            "is_marketplace": false,
            "is_tax_liable": false,
            "name": "Mobile",
            "order_source_id": "Mobile"
        },
        "origin": "101",
        "payment_status": "paid",
        "site_id": "649093c242bfb5facd93ec13",
        "state": "saved",
        "store_number": "2",
        "timestamp": "2024-04-09T13:46:11.201Z"
    },
    "sns_response": {
        "$metadata": {
            "attempts": 1,
            "httpStatusCode": 200,
            "requestId": "b16b622d-35e1-5301-a191-3ca2bc0b14a1",
            "totalRetryDelay": 0
        },
        "MessageId": "e6764172-8af6-57fc-ae9f-1ffd031c105c"
    },
    "subject": "XENIAL Notification:order-ready",
    "topic_arn": "arn:aws:sns:us-east-1:747781953870:
qa-pos-notifier-649092475e665ca98844c8c7"

Menu Data Notification

The following notifications use the Menu Data Notification format:

Sample 15 - Delta Change (Batch Process)

JSON

{
"platform":"dm",
"platform_version":"0.0.1",
"msg_type":"dm.edm.batchprocess",
"msg_id":"999999999999",
"content_type":"application/json",
"payload":"{\"company_id\":\"999999999999\",\"msg_type\":\"dm.edm.batchprocess\",\"site_ids\":[\"999999999999\"],\"uri\":\"http://dmbackend.xenial.com/notify-edm-batch-process?effective_date=20YY-09-23T10%3A40%3A09.168Z&include_audit=true&include_inactive=true\",\"payload\":\"{\\\"batch_id\\\":\\\"999999999999\\\",\\\"company_id\\\":\\\"999999999999\\\",\\\"entities_delta_urls\\\":{\\\"modifier-collection\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/modifier-collection?signature=999999999999.999999999999.999999999999\\\",\\\"bundle-component\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/bundle-component?signature=999999999999.999999999999.999999999999\\\",\\\"menu-item-group\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/menu-item-group?signature=999999999999.999999999999.999999999999\\\",\\\"tag\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/tag?signature=999999999999.999999999999.999999999999\\\",\\\"product-price\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/product-price?signature=999999999999.999999999999.999999999999\\\",\\\"menu-category\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/menu-category?signature=999999999999.999999999999.999999999999\\\",\\\"product\\\":\\\"https://ol-history.xenial.com/presign/date/9-23-20YY/data-type/Delta/collection/product?signature=999999999999.999999999999.999999999999\\\"},\\\"entities_failed\\\":[],\\\"entities_updated\\\":[{\\\"entity_type\\\":\\\"product\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/product/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"product-price\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/product-price/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"bundle-component\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/bundle-component/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"modifier-collection\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/modifier-collection/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"tag\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/tag/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"menu-category\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/menu-category/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"},{\\\"entity_type\\\":\\\"menu-item-group\\\",\\\"uri\\\":\\\"https://dmbackend.xenial.com/menu-item-group/current?effective_date=20YY-09-23T10:40:09.168Z&include_inactive=true&include_audit=true&batch_id=999999999999\\\"}],\\\"entities_deleted\\\":{\\\"bundle-component\\\":[{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"}],\\\"menu-item-group\\\":[{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"},{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"},{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"},{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"},{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"},{\\\"external_id\\\":\\\"999999\\\",\\\"entity_id\\\":\\\"999999999999\\\"}]},\\\"site_ids\\\":[\\\"999999999999\\\"],\\\"timestamp\\\":\\\"20YY-09-23T10:40:09.168Z\\\",\\\"msg_type\\\":\\\"dm.edm.batchprocess\\\",\\\"source_platform\\\":\\\"dm\\\",\\\"platform_version\\\":\\\"0.0.1\\\",\\\"source_platform_version\\\":\\\"0.0.1\\\"}\",\"source_platform\":\"dm\",\"source_platform_version\":\"0.0.1\"}",
"ref":"{}"
}

Sample 16 - Table Refresh (Store.Refresh)

JSON

{
    "platform": "dm",
    "platform_version": "0.0.1",
    "msg_type": "store.refreshed",
    "msg_id": "999999999999",
    "content_type": "application/json",
    "payload": {
        "timestamp": "20YY-07-15 08:45:16Z",
        "notification_status": "store.refreshed",
        "origin": "Xenial.Onboarding",
        "site_id": "999999999999",
        "company_id": "999999999999",
        "store_number": "999999",
        "entities_full_urls": {
            "tax-definition": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/tax-definition?signature=999999999999.999999999999.999999999999",
            "product": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/product?signature=999999999999.999999999999.999999999999",
            "time-period": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/time-period?signature=999999999999.999999999999.999999999999",
            "product-price": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/product-price?signature=999999999999.999999999999.999999999999",
            "tax-group": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/tax-group?signature=999999999999.999999999999.999999999999",
            "order-destination": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/order-destination?signature=999999999999.999999999999.999999999999",
            "discount-definition": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/discount-definition?signature=999999999999.999999999999.999999999999",
            "tag": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/tag?signature=999999999999.999999999999.999999999999",
            "bundle-component": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/bundle-component?signature=999999999999.999999999999.999999999999",
            "pay-type": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/pay-type?signature=999999999999.999999999999.999999999999",
            "lookup": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/lookup?signature=999999999999.999999999999.999999999999",
            "modifier-collection": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/modifier-collection?signature=999999999999.999999999999.999999999999",
            "menu": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/menu?signature=999999999999.999999999999.999999999999",
            "menu-category": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/menu-category?signature=999999999999.999999999999.999999999999",
            "variant": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/variant?signature=999999999999.999999999999.999999999999",
            "order-source": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/order-source?signature=999999999999.999999999999.999999999999",
            "menu-item-group": "https://ol-history.xenial.com/presign/date/07-15-20YY/data-type/Full/collection/menu-item-group?signature=999999999999.999999999999.999999999999"
        }
    }
}

Sample 17 - Site Online (Site.Status - IRIS POS)

JSON

{
   "store_number":"999999",
   "last_contact_time":"20YY-09-05T08:57:17Z",
   "business_date":"20YY-09-05T04:00:00Z",
   "pos_type":"IRIS",
   "pos_version":"3.8 build 1785",
   "server_timestamp":"20YY-09-05T08:57:23.178Z",
   "accepting_online_orders": true,
   "company_id":"999999999999",
   "site_id":"999999999999",
   "status":"online",
   "sent_at":"20YY-09-05T08:57:23.181Z"
}

Sample 18 - Site Offline (Site.Status - IRIS POS)

JSON

{
   "store_number":"999999",
   "last_contact_time":"20YY-09-05T08:42:37Z",
   "business_date":"20YY-09-05T04:00:00Z",
   "pos_type":"IRIS",
   "pos_version":"3.8 build 1785",
   "server_timestamp":"20YY-09-05T08:42:38.871Z",
   "accepting_online_orders": true,
   "company_id":"999999999999",
   "site_id":"999999999999",
   "status":"offline",
   "sent_at":"20YY-09-05T08:48:38.927Z"
}

Sample 19 - Site Online (Site.Status - POS API)

JSON

{
    "store_number": "999999",
    "last_contact_time": "20YY-08-24T11:01:06.583Z",
    "business_date": "20YY-08-24T00:00:00.000Z",
    "pos_type": "XPOS",
    "pos_version": "3.7.8",
    "server_timestamp": "20YY-08-24T11:01:06.953Z",
    "accepting_online_orders": true,
    "company_id": "999999999999",
    "site_id": "999999999999",
    "status": "online",
    "sent_at": "20YY-08-24T11:01:06.955Z"
}

Sample 20 - Site Offline (Site.Status - POS API)

JSON

{
    "store_number": "999999999999",
    "last_contact_time": "20YY-08-24T11:01:06.583Z",
    "business_date": "20YY-08-24T00:00:00.000Z",
    "pos_type": "XPOS",
    "pos_version": "3.7.8",
    "server_timestamp": "20YY-08-24T11:01:06.953Z",
    "accepting_online_orders": true,
    "company_id": "999999999999",
    "site_id": "999999999999",
    "status": "offline",
    "sent_at": "20YY-08-24T11:04:23.762Z"
}