Create a discount code within Shopify

With the Attentive and Shopify integration, you can sync unique discount codes directly from Shopify into the Attentive platform manually or automatically. Once you have your discount code, the External ID can be found in the URL.

Note: For International implementations with one Shopify store, a separate discount needs to be created for each Attentive account. You can’t reuse the same Shopify discount in multiple Attentive accounts.
Note: You must grant permission in Shopify to Attentive to use Shopify discount codes. Follow these instructions from Shopify to grant permission.

Create a discount code (not automatic)

Follow the instructions below to create a discount code in your Shopify store. 

Note: After creating the offer within Shopify, you'll need to mark Attentive as a sales channel in order to “activate” the offer on Attentive’s end. To do so, follow the instructions outlined here.
  1. Navigate to Offers on the side menu.
  2. On the Offers page, click + Create offer.
  3. On the Choose an offer type window, select Integrated discount codes.

    Note: This option only displays if the integration with Shopify is already set up on the Marketplace tab. See the Shopify Setup Guide for details.

  4. On the Create integrated discount codes page, add the following information about the discount code:
    • Discount name: Best practice is something that indicates the discount such as "10% Off." There is a five character minimum.

    • External ID: found on the Discounts page in your Shopify store. Click the relevant discount and copy the ID from the URL.

      Code format: This value must include the {RAND} variable, which will be replaced by six random characters. Note that this must not contain any spaces.
    • (Optional) Description

  5. (Optional) You can set the discount code to be automatically applied for your customers at checkout.

    1. Under Discount Link, slide the Add auto-apply link toggle switch on (if it’s not already on).

    2. If the Destination URL isn’t auto-filled:

      • Click the tooltip, which explains when to use this field as well as an example formatted URL.

      • Complete the Destination URL field.
        Note: Be sure to add “{coupon}” in place of the discount code. When the link is included in a text message, “{coupon}” is replaced with the integrated discount code.

      • (Optional) Enter the UTM parameters that are relevant to you in the various UTM fields.

        Note: The UTM_Source and UTM_Medium fields may be auto-filled for you based on what you have set up under Settings > Google Analytics. See this article for more information.

        For example, Shopify supports auto-apply using the format (with UTMs added):{coupon}?utm_source=attentive&utm_medium=sms&utm_campaign=welcome

    A preview of the auto-apply URL that you’re building displays on the right side of the page.

  6. Click Create.
    A success message displays. You can now add this discount code when working with sign-up units and welcome journeys.
  7. Wait ~5-10 minutes to ensure that discount codes are being generated. You’ll be able to see how many are remaining on the Offers screen.

    Note: We automatically generate new discount codes once you reach 1,000 remaining.

Create a discount code (automatic)

View the following video to learn how to automatically generate discount codes with Shopify:

  1. On the Offers page, click Create Offer.
  2. Select Integrated discount codes. If this option does not appear, set up your Shopify integration before continuing. The Details page appears. 
  3. In the Discount name field, enter an internal-facing name for the discount. We recommend using the same name that you used in Shopify. 
  4. In the External ID field, enter the External ID of the discount from your Shopify account. 
    • To do so, go to Shopify > Discounts. Click on the discount then select the string of numbers at the end of the URL. That string of numbers is the External ID. 
  5. In the Code format field, enter the coupon label you would like to use followed by the {RAND} macro. 
    • {RAND} will be replaced with a unique string of digits for each subscriber; this will be their discount code. 
    • See Offer Distribution to control which codes are valid during a specific time period.
  6. Below Discount link, click Add auto-apply link to automatically apply a discount to the subscriber's purchase when they click the short link in the message. Then, from Shopify, paste the shareable link in the Destination URL field below. Append any desired UTM parameters below for tracking. 
  7. When you are satisfied, click Create. The Add an offer and welcome journey page appears. 
  8. Below Offer, click + Create new to apply an offer to the Shopify discount code. Click Welcome to customize the message copy in which the offer appears. 
  9. When you are satisfied, click Save and close

Articles in this section

Was this article helpful?
1 out of 3 found this helpful