Learn how to create and add personalised promotion codes to your campaigns
E-commerce platforms: Shopify only
Penny Black can generate personalised promotional codes based on a Shopiy promotion, add them to inserts, and publish them back to Shopify (and optionally to Klaviyo). The use of these codes is also tracked back in our attribution performance metrics.
How it works
This capability is powered by Shopify's promotions engine.
The core promotion is created in Shopify first, and then we generate personalised codes based on this promotion for individual customers as their insert is rendered.
The codes will be created using up to 10 characters from the recipient's first name, capitalised, and with a 5-character alphanumeric random component at the end.
Here’s an example of a rendered personalised code:
Setting up personalised promo codes
Create the promotion on Shopify
When you first create the code:
- Choose the type (it can be any of the types offered, such as product-based or order-based)
- For Method choose Discount Code and give it an initial code to name it appropriately, e.g.
- You need to give the promotion at least one code for it to be created, and this also becomes the name
- All other values can be configured as desired for your promotion
- Once created you should see the new promotion in your list
Connect Penny Black to your new promotion
- From the promotion list page, click on promotion which will take you to the promotion details page
- Now check your browser URL bar for this page, you will see a numeric identifier referring to that particular promotion at the end, e.g.
https://admin.shopify.com/store/your-store-name-here/discounts/1061908414604
-
Copy this number
-
Go to the E-Commerce tab in your Penny Black Settings page
-
On the Personalised Promotion Codes panel, paste in your Shopify Price Rule ID:
You can only use Penny Black to generate codes for one promotion at a time.
Using a personalised promo code in a campaign
Once you've configured your promo code, you will see Personalised Promotion Code as an option for mapping your artwork variables to your orders.
Find the field that you placed in your artwork for your promotional code and select this value from the dropdown.
Saving these codes to your Klaviyo customer profile
As well as sending the codes back to Shopify, we can send them to your customer’s Klaviyo profile for follow-up emails and SMS campaigns.
Please ensure you have the correct Klaviyo API permissions enabled for using this feature.
In Settings → E-Commerce → Personalised Promotion Codes, enter the attribute name in the following field:
This should be the name of the attribute in Klaviyo that you want the promo code to be stored in.
Checking the codes in Shopify
Once the campaign has been running and generated a few codes for some of your orders, you can come back to check them in Shopify.
Find the promotion that you created and you will now see X codes created by App:
Click on the 'View all codes' link to list the individual codes created:
You can now track the usage as you would with any other promotion in Shopify. You will also see any subsequent purchases made using these codes attributed to Penny Black on the performance dashboard.