Obtain customer consent in Shopify Point of Sale
If you are selling products instore that require an additional terms of service or purchase agreement, it's important that you can track this in Shopify. This might include terms of service for products with an ongoing service agreement, data consent, or simple email marketing consent.
You may want to do this on the customer level using customer tags, or, you may want to track consent against individual products.
In any case, using the ShopFields app you can collect customer consent quickly and easily.
One way to do this would be to create a simple binary (yes/no) custom field in the custom fields app. Your field might look like this:
Then, in Shopify POS, marking off whether the customer has agreed to the terms of service is as simple as:
- Clicking on the Add custom field tile
- Selecting our TOS field
- Saving
Once applied, the field will show up on the order in point of sale.
Now that the field has been applied, we can use Shopify Flow to handle any follow-on actions. This might include:
- Adding the customer to a specific list in Klaviyo
- Adding a tag to the customer or order based on if they have agreed to the terms of service
- Setting up email alerts if an order comes through that contains a specific product, and the customer has not agreed to the terms of service.
There are lot of ways to extend and customize this to suit your needs too. Perhaps you want to offer consent on individual products, or instead of a binary yes/no option you have a list where the customer can choose what level of consent or marketing they are comfortable with.
SMS Marketing Consent on Shopify POS
When clicking 'accepts marketing' in Shopify POS, either in the customer's profile or checkout, the customer will be subscribed to email marketing, but not SMS marketing. Using ShopFields and Shopify Flow you can automate this process and update a customer's SMS marketing consent.
Before enabling, make sure you understand and follow your region's privacy rules for collecting SMS marketing consent.
To set this up all we need to do is:
- Create a field in ShopFields with the key 'accepts_sms'
- Create a Shopify Flow that listens for this key anytime it gets an order and updates the customer's profile
1. Create the field in ShopField app
First I create a field in the ShopFields app. Note the "key" is "accepts_sms" and I'm using a true / false field. I'm also using an order field instead of applying the field to individual items in the cart.
2. Create the Shopify Flow
Next I create a Flow using the free Shopify Flow app. It simply:
- Listens for anytime an order is created
- Checks if the order contain an attribute with the key 'accepts_sms' (the key we set on our field)
- Sends a HTTP Request to Shopify. This is where the magic happens. We send a GraphQL request to Shopify to update the customer's profile.
Here's each step in detail (I'd recommend opening the image in a new tab if needed):
There are a two things you will need to update in your HTTP Request action:
- Add your store name to the URL field. If your store name is happy-days, your URL should be https://happy-days.myshopify.com/admin/api/2023-10/graphql.json
- Create a custom app in Shopify and paste in your Admin API access token
Here are the fields:
URL
https://{YOUR-STORE}.myshopify.com/admin/api/2023-10/graphql.json
Headers
X-Shopify-Access-Token : { Your Admin API Access Token}
Content-Type : application/json
Body
Credit for the GraphQL request goes to Kevnob's post on the Shopify community{
"query": "mutation customerSMSMarketingConsentUpdate($input: CustomerSmsMarketingConsentUpdateInput!) {\n customerSmsMarketingConsentUpdate(input: $input) {\n customer {\n id\n smsMarketingConsent {\n marketingState\n consentUpdatedAt\n marketingOptInLevel\n }\n }\n userErrors {\n field\n message\n }\n }\n}",
"variables": {
"input": {
"customerId": "{{order.customer.id}}",
"smsMarketingConsent": {
"marketingOptInLevel": "SINGLE_OPT_IN",
"marketingState": "SUBSCRIBED"
}
}
}
}
Now that it's all set up, when a staff member adds the field to that order, the customer's SMS marketing consent will be updated.
Troubleshooting and next steps
If you're running into issues, the first thing to check is the Flow run history. If there's any errors they should be logged there. Check you've added your HTTP Request fields in correctly, and that the customer has a phone number, as this is required to enable SMS marketing consent.
You may want to extend this flow to tag the customer, to handle un-subscriptions, or to only subscribe under certain conditions. You might want to change the API version as well.