Personalised promo codes

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 discounts engine.

The core discount is created in Shopify first, and then we generate personalised codes based on this promotion for individual customers as their insert is created.

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:

personalised-promo-example

Setting up personalised promo codes

Create the discount in 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 discount 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 discount
  • Once created, you should see the new discount alongside your others

Connect Penny Black to your new promotion

  • From the Discounts list page, click into the discount which will take you to its details page
  • Now check your browser URL bar for this page, you will see a numeric identifier referring to that particular discount 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 you created 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 Klaviyo profiles for follow-up emails and SMS campaigns.

Please ensure you have the correct Klaviyo API permissions enabled for using this feature.

In SettingsE-CommercePersonalised 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 e.g. "1st time discount (PB)"

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 discount that you created and you will now see X codes created by App:

Screenshot 2025-03-31 at 14.10.39

Click on the 'View all codes' link to list the individual codes created:

Screenshot 2025-03-31 at 14.11.28You can now track the usage as you would with any other discount in Shopify. You will also see any subsequent purchases made using these codes attributed to Penny Black on the performance dashboard.