Articles in this section

Send Customer-Specific Coupon Codes to Customer Segments via Klaviyo

Send customer-specific coupon codes from CommentSold to targeted email or SMS campaigns in Klaviyo by exporting coupon codes as a CSV file, importing them into a Klaviyo list, and inserting the coupon code and expiration date as personalized profile properties in your campaign.

Use the table of contents below to navigate to specific sections of this article:

Uploading coupon codes to Klaviyo


 

  1. Download the coupon code CSV from the Coupons tab in CommentSold.
  2. Log into Klaviyo and navigate to Lists & Segments > Select Create List.
  3. Name your list based on the base coupon and select Create List.
  4. Within the new list, go to Settings > Consent > set opt-in process to Single opt-in, then click Save.
  5. In the same list, go to Imports > select Import Contacts.
  6. Upload the CSV file you downloaded from CommentSold.
  7. For your first import:
    • Check the boxes for email, code, and expiresAt.
    • Optionally check customer ID.
  8. Use the drop-downs to Select or Create New Field for each column.
  9. In the pop-up, name each profile property (or use the default), then select Create.
  10. Once all fields are mapped, select Next.
  11. On the next screen, select No to avoid subscribing users to marketing.
  12. Click Import.
    • Note: Duplicate profiles will be skipped. Only the first code listed for each email will be imported.

Using your newly uploaded coupon codes within email/SMS campaigns


 

  1. Go to Templates in Klaviyo.
  2. Choose a template or select Create to start from scratch.
  3. Drag and drop a Text Box into your email design.
  4. In the text box, add your intro text—e.g., “Use code:”
  5. With the text box still selected, click Personalization in the top right.
  6. Search for the profile property you used for the coupon code (e.g., "code").
  7. Under Custom, select the code property.
  8. In the next screen, leave the default text blank (we recommend not sending to users without a code).Select Insert.
  9. To preview the code:
    • Exit the text box.
    • Click Preview & Test in the top right.
    • Under Preview data source, search a profile with a known coupon code.
  10. To add the coupon’s expiration date:
    • Repeat the same steps but use the "expiresAt" property.
    • Or insert this directly: {{ person|lookup:"expiresAt"|default:'' }}

FAQs


How do I upload CommentSold coupon codes to Klaviyo?

Download the coupon code CSV from the Coupons tab in CommentSold. In Klaviyo, create a list, configure its consent settings, and import the CSV. Map the CSV columns to profile properties such as email, code, and expiresAt, then complete the import.

Which fields should I import from the coupon code CSV?

For the first import, map the email, code, and expiresAt fields. You can optionally import customer ID.

Should I subscribe customers to marketing during the import?

No. During the import process, select No when asked whether to subscribe users to marketing. This avoids subscribing customers through the import.

What happens if the CSV contains duplicate customer profiles?

Klaviyo skips duplicate profiles. If multiple coupon codes are listed for the same email address, only the first code listed for that email is imported.

How do I insert a customer-specific coupon code into a Klaviyo email?

Open a Klaviyo email template and add a text box. Select Personalization, find the profile property used for the coupon code, such as code, and insert it into the message. You can preview the personalized code using a profile with a known coupon code.

How do I include a coupon's expiration date in a Klaviyo email?

Insert the expiresAt profile property using the Personalization menu. Alternatively, use this template variable:

{{ person|lookup:"expiresAt"|default:'' }}

Should I add default text for customers who don't have a coupon code?

No. Leave the default text blank when inserting the coupon code. This helps prevent the email from displaying a fallback message to customers without a code.

Was this article helpful?
0 out of 0 found this helpful