Solved

Automatically Adding Tags to POS orders that contain a custom Item

StelloFoods
Visitor
3 0 0

Hello, 

 

At our POS terminal we sell our normal line of products that are also sold online and we also run through credit card transactions that are for our manufacturing or distributing ends of the business and they are just processed as custom sales. I would like to use Shopify flow to automatically add tags to these so they can later on be filtered out and organized. The issue I was running into is finding the condition in Shopify flow that would correctly find these custom sales.

 

Any help would be appreciated! 

Accepted Solution (1)

paul_n
Shopify Staff
1003 133 240

This is an accepted solution.

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 Muff Guitar Pedal",
            "product": {
              "title": "Big Muff Guitar Pedal"
            },
            "variant": {
              "title": "Default Title"
            }
          },
          {
            "name": "Test custom sale",
            "product": null,
            "variant": null
          }
        ]
      }
    }
  },

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Reply 1 (1)

paul_n
Shopify Staff
1003 133 240

This is an accepted solution.

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 Muff Guitar Pedal",
            "product": {
              "title": "Big Muff Guitar Pedal"
            },
            "variant": {
              "title": "Default Title"
            }
          },
          {
            "name": "Test custom sale",
            "product": null,
            "variant": null
          }
        ]
      }
    }
  },

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.