Overview
This integration allows you to import your coupon codes from Shopify to use in Zaius. You can use different coupon codes for various campaigns, segments, and can even assign a unique code based on a customer attribute (e.g., assign coupon codes exclusively to your repeat customers).
Values & Benefits
- Track which coupon codes have been assigned to your customers
- Re-use the same coupon code in reminder or follow-up touchpoints
- Give your Support Team insights into which coupon codes have been given to customers
- Allow unique codes to have a static prefix and/or suffix
How It Works
Configuration
- Log into your Shopify store and navigate to the Apps page. If you are an admin, you will see a link, Manage private apps, at the bottom of the page. Click on this link.
- Click on Create a new private app. (Note: If this is your first private app in Shopify, you might have to first follow the prompts to enable private app development, before you can click on this button.)
- On the Create private app page, enter a memorable name (like "Zaius Coupons") under Private app name, then add support@zaius.com as the emergency developer email.
- Under the Admin API section, change "Products" to "No access."
- Expand Show inactive Admin API permissions and set "Read and Write" access to both "Discounts" and "Price Rules".
- Set the Webhook API version to "2020-10".
- Click Save, then confirm. Keep the resulting page open, as you’ll need your API key and password.
- Next, click Install App under the Shopify Discount Code integration in Zaius’ App Directory. On the Settings page, enter your Shopify Store, the API Key, and the Password provided from the private app setup, then click Validate Credentials.
Generating Your First Coupons
- Create a discount code in Shopify that you'll use as a template. (Zaius will use the rules of this coupon code.)
- In Zaius, open the Use Discount Code as Template section under Settings and enter the discount code into the Shopify Coupon Code form.
- Under the Code Generation section, specify a unique Rule Name (rule_id) to label the coupons that will be generated, then configure the pool size and any additional parameters. Note that the rule_id must be lowercase, alphanumeric with underscores.
- Click Generate. You can check the progress in the Activity Log.
Using Your First Coupons in a Campaign
You can render a unique coupon in your campaign by referring to the Zaius rule_id, like so:
{{ app.shopify_discount_codes.generate_coupon(rule_id: 'myRule', email: customer.email) }}
Best practice recommends adding a "utms" parameter, which (for emails) can be supplied the auto-utms of the campaign by sending the utm_params value, like so:
{{ app.shopify_discount_codes.generate_coupon(rule_id: 'flashsale_2020', email: customer.email, utms: utm_params) }}
Important Note: Keep an eye on the number of coupon codes you imported and the number of campaigns in which you use coupon codes. If the number of sends in your campaign exceeds the number of unassigned coupon codes, your sends will be aborted after the campaign has used up all the available unassigned coupon codes.
If an automated campaign is configured, and you enabled the Maintain pool size option, Zaius will try to re-send the campaign to customers whose sends were aborted. This will happen an hour later, when the pool has been restored.
Rendering a coupon multiple times in a single email
If you need to use the coupon multiple times, you can assign the value. We recommend doing this in the "Variables" section beneath your content. Specify your template variable name, e.g., “coupon_code”
on the left side, then enter the app call with its parameters on the right side, like so:
{{app.shopify_discount_codes.generate_coupon(rule_id: 'myRule', email: customer.email, utms: utm_params)}}
You can then use your variable name anywhere later in the template to print the same coupon code in multiple places by typing it in double brackets, for example:
{{coupon_code}}
.
Non-email channels
If a channel uses an identifier other than email address, you should use that channel's identifier for generating coupons. We have added shortcuts for both email
(as indicated above) and phone
.
You can specify these or any other customer identifier manually. We still advise you to include UTM parameters, but non-email channels do not typically have automatic parameters available, so you would have to specify them manually.
To use an SMS example, we would use the identifier phone like so:
{{ app.shopify_discount_codes.generate_coupon(
rule_id: 'myRule',
identifier_field: 'phone',
identifier_value: customer.phone,
utms: '?utm_source=zaius&utm_medium=sms&utm_campaign=springblast&utm_content=discount')
}}
Or, using the shortcut available for email
and phone
, like so:
{{ app.shopify_discount_codes.generate_coupon(
rule_id: 'myRule',
phone: customer.phone,
utms: '?utm_source=zaius&utm_medium=sms&utm_campaign=springblast&utm_content=discount')
}}
Managing Your Coupon Rules
Under the Manage Coupon Rules section, you can click on the drop-down to view all the coupon rules you generated in Zaius. The drop-down also shows how many codes remain in each pool. (Zaius dynamically assesses these numbers.) All these rules are showing valid rule_ids that you can use in your campaigns, using Liquid.
Requirements
- To take advantage of the integration, you must have permission to manage private apps in your Shopify account. (Check for the Manage private apps link at the bottom of the Apps page in Shopify.)
- You must generate coupon codes prior to launching your campaign