App Bridge - Any kind of id / token to tie a POS cart to a completed order?

173 13 32

Is there any kind of cart ID that gets created in POS that can be accessed in App Bridge Cart Properties (or elsewhere) that will also then show up in a completed order object? 

On the cart side, I see a common id that shows up for APP::CART::SET_PROPERTIES and APP::CART::UPDATE, for example 16c6f01a-051b-00a8-a594-295653d11647. However, I don't see this id show up anywhere in the order object afterward.

On the order side, I see token, checkout_token, checkout_id, but none of these match the id retrieved by App Bridge. Thank you.

Shopify Staff
Shopify Staff
18 5 4

This is an accepted solution.

Hey @policenauts1 ,

One way to accomplish this is to use the ID that you discovered that is sent on all `Cart` group actions in App Bridge. This ID is set when you create a Cart object in App Bridge.
If you create a Cart object then use the `APP::CART::SET_PROPERTIES` with the cart's id property used as the value it will then be saved to the cart for use outside of App Bridge.

Once the checkout happens and an Order is created, you can retrieve the cart's id that created the order by accessing the `custom_attributes` field.

Set Properties Action

cart.dispatch(Cart.Action.SET_PROPERTIES, {
  data: {
      "ID": "3e2f37dd-069a-0b39-b3a8-a1ec955dec5d" // The cart id


query {
  order(id: "gid://shopify/Order/1964279267384") {
    customAttributes {


  "data": {
    "order": {
      "customAttributes": [
          "key": "ID",
          "value": "3e2f37dd-069a-0b39-b3a8-a1ec955dec5d"
Andrew Apperley
(App Bridge) Mobile Developer