Set Up Coupons (for Magento 1.x)

read

Overview

Magento supports Shopping Cart Price Rules that can be used to apply a discount to a customer's order. Coupon codes can be created for existing price rules, so that shoppers can easily leverage a given code to apply a discount during the checkout process.

Klaviyo's Coupons for Magento feature allows Magento 1.0 stores to do the following:

  • Create new coupons in Klaviyo associated with pre-existing price rules in Magento.
  • Include dynamic coupons within flow emails, so each recipient receives a unique code.

This guide will explain how to get setup with Magento coupons in Klaviyo.

Requirements

Ensure that the following requirements are in place before setting up coupons for Magento:

Note

If you are unsure whether or not your REST API is configured properly, please review the steps outlined under the first subheader of our Troubleshooting section at the end of this guide.

Generate REST Credentials in Magento

To enable Klaviyo's Magento Coupons feature, first generate REST API credentials from your Magento store, and then paste these into your Klaviyo account.

  1. Click on System > Configuration and then click on Klaviyo under the Customers section.
  2. Click Generate OAuth Tokens.763276

The Consumer Key, Consumer Secret, Authorization Token and the Authorization Secret will populate. You will copy/paste these values into your Klaviyo account in the next step.

Setup Magento Coupons in Klaviyo

  1. From your Klaviyo account, navigate to your Magento integration.
    763277
  2. Click the Advanced Options arrow to expand the Coupon Settings.
  3. Paste in the REST credentials you created above.

    Note

    Your Magento server must support HMAC-SHA1 signatures for OAuth authentication.
    763278
  4. Click Update Magento Settings.

Klaviyo will validate your REST credentials and you will be able to start creating coupons with the Coupons tab of your account.

Create a Magento Coupon in Klaviyo

When you first navigate to the Coupons tab in your Klaviyo account after providing your REST credentials, you will see the message, "You haven't added any coupons yet." 

Note

Before you create a new coupon, you will first need to define a Price Rule in Magento that will include all the specifications for the coupon. Price Rules cannot be created from within Klaviyo. A new coupon created in Klaviyo must reference a pre-existing Price Rule in Magento.

When creating a Price Rule in Magento, note that the option to associate a new Price Rule with a specific coupon should be left set to Specific Coupon and you must have the Use Auto Generation checkbox selected.
  1. Click Add Coupon to create a new coupon.
  2. Fill in the following information: Coupon Name and the Magento Rule ID.
    • Coupon Name: The name you specify can consist of only letters, numbers and underscores and can be up to 32 characters long
    • Magento Rule ID: Create a rule in Magento first, and paste the ID of that rule here to associate it with this coupon

763280

All created coupons will appear with the following overview details:

  • Coupon Name: Name of the coupon
  • Active Timeframe: There are the following options:
    • Active, No Expiration
    • Date A - No Expiration
    • Date A - Date B
    • Active, Expires Date B
  • Created Date: Date the coupon was created
  • Last Updated Date: Date the coupon was last updated

Coupons can be edited and deleted from this tab via the dropdown on the right-hand side.
763282

Use a Magento Coupon in a Flow Email

Once a coupon is created, you can insert it into a flow email using the following placeholder variable:

{% coupon_code 'CODE_FOR_YOUR_COUPON' %}

where you replace CODE_FOR_YOUR_COUPON with the coupon name.  For example:

763284

When emails are sent out, this variable will be dynamically replaced with a unique discount code for each recipient.

Note

When you preview  emails - either in Klaviyo, or by sending a preview email - you will not see a unique coupon code populate. Coupon codes are only generated during live sends.

Troubleshooting

If your having any issues, start by checking out our guide on Troubleshooting Coupons (for Magento 1x).

 

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