Automatically Adding Tags to POS orders that contain a custom Item

I used GraphiQL in my shop on a POS order that had both a regular product and custom item. The main difference is that for custom items the product and variant are both null (see output below).

So you could check if the order was places by POS (order / app / name) and if any of the order / lineItems / product is empty or does not exist.

"order": {
      "app": {
        "name": "Point of Sale"
      },
      "lineItems": {
        "nodes": [
          {
            "name": "Big ■■■■ Guitar Pedal",
            "product": {
              "title": "Big ■■■■ Guitar Pedal"
            },
            "variant": {
              "title": "Default Title"
            }
          },
          {
            "name": "Test custom sale",
            "product": null,
            "variant": null
          }
        ]
      }
    }
  },
1 Like