When orders from Shopify come over into Infoplus, the order's tags from Shopify are turned into order tags in Infoplus. However, if there are customer level tags in Shopify, those do not automatically come over into Infoplus. To accomplish this, we have an example script below that runs against orders and does the following:
- Pulls the Shopify customer ID out of the extra order data in Infoplus then uses it, along with a Shopify access token, to make an HTTP request to the Shopify API.
- Converts the response from Shopify from string to JSON format, then parses out the customer tags from the response.
- Loops through the customer tags, adding each of them as tags to the order in Infoplus.
Due to the ever-changing nature of writing and maintaining scripts, Infoplus does not provide support in this area. We recommend someone in your IT Department handles scripting requests internally so that you keep all control over the process.
Some further notes about this script:
- The script should be created with a Script Type of Record and Record Type of Order.
- This script should only be ran against orders that came from Shopify. Use a smart filter and trigger to automatically run the script against orders that came from Shopify.
- Replace "YOUR-SHOPIFY-ACCESS-TOKEN" with a valid API access token from Shopify. Please contact Infoplus support if you're not sure what your access token is.
- Replace "YOUR-SHOPIFY-SUBDOMAIN" with the proper subdomain from your Shopify site. For example, if your shopify site is at https://acmeproducts.myshopify.com, you would use the value "acmeproducts";