Create offers with Shopify

[Beta]: Information contained within a blue box is specific to the Shopify auto-generated coupons for emails (open beta) 

With the Attentive and Shopify integration, you can sync unique discount codes directly from Shopify into an offer in Attentive. You can also upload bulk-generated discount codes created in Shopify or create an offer that matches a shared discount code from Shopify.

[Beta]: Unlike shared codes that can be reused, each auto-generated code is dynamic and unique for each subscriber, providing better security and tracking.

Create an offer with auto-generated unique discount codes from Shopify

Follow the steps below to create an offer that gets unique, automatically-generated discount codes from Shopify.

Notes

  • After creating an 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 from Shopify.
  • If you have multiple Attentive accounts, each linked to a single Shopify store, the same Shopify discount code can be used across these different Attentive accounts.
  • If you manage multiple regions in a single Attentive account, a single Attentive offer linked to a single Shopify discount code can be used in all the regions you manage.
  • If you manage multiple regions in a single Attentive account, and you use multiple Attentive offers, each separate offer must be linked to a unique Shopify discount code.
  1. On the Offers page, click + Create offer.
  2. In the Choose an offer type window, click Select next to Integrated Discount Codes (This option doesn’t appear if you haven’t yet set up an integration with Shopify.)

    [Beta]: Integrated One-Time Sync or Integrated Auto-Refill Sync.

    • Auto-Refill Sync: We will replenish coupons as they are used automatically
    • One-Time Sync: We will not generate more coupons as they are used

    Clicking + Create offer on the Offers page and clicking Select next to Integrated discount codes. The Create integrated discount codes page appears.

  3. Enter a Discount name. We recommend using the same name that you use for the discount in Shopify.
  4. In the External ID field, enter the external ID of the discount from your Shopify account.
    • To find a discount’s external ID, go to the Discounts page in Shopify and click on the discount you want to use. The string of numbers at the end of the URL is the external ID. Copy and paste this number into the External ID field in Attentive.

      External IDs can’t be reused. If you try to reuse an external ID that was used to create another offer (even if that offer has been deleted), you won’t be able to create the new offer.
      The external ID highlighted in the URL of a discount in Shopify.

  5. In the Code format field, create a code format with no spaces that contains {RAND}, as in the screenshot above. When subscribers receive a code, {RAND} is replaced by six random characters.

    Example: SAVE10{RAND}

  6. (Optional) Enter a Description.

    [Beta]

    In the Target Threshold field, enter the number of unique codes to generate. Minimum is 1,000 codes; maximum is 1 million codes.

    1. Coupon generation is not instant. Generating codes takes time based on your target threshold. Plan ahead to ensure codes are ready before your send:
      1. Small thresholds (under 10,000 codes): Minutes to generate
      2. Large thresholds (up to 1 million codes): Up to 16 hours to generate
    2. Attentive automatically applies an extra 10% buffer to your threshold.
    3. If you need coupons immediately, use the manual CSV upload option instead.

     

  7.  (Optional) Click Add auto-apply link to automatically apply the discount at checkout, then complete the following:
    • Destination URL: Enter the link where your subscribers should be sent. Include {{subscriber.signupOffer.link}} (for welcome journeys) or {{offer.code}} where you want the discount code to appear in the URL.
      1. Example: https://{shopname}.myshopify.com/discount/{{offer.code}}
    • You can add this URL to messages by clicking the { } Personalization button in the message composer and choosing the {{offer.link}} variable. See the instructions for creating campaign and journey messages for more information.
    • Add UTM parameters: Add UTM parameters you want to append to the link.
      1. Note: UTM_Source and UTM_Medium may already be filled out based on your Google Analytics configuration. See FAQ for more information.
  8. Click Create.
  9. Wait approximately 5–10 minutes to ensure that discount codes are being generated.

    Note: New discount codes are automatically generated once you reach 1,000 remaining.

    [Beta]: For Auto-Refill Sync, new discount codes are automatically generated after 10% of coupons are used. New codes are not generated once used for One-Time Sync.

[Beta]: Monitor your coupon availability to ensure you don't run out and avoid messages being dropped or paused

  • Remaining: Shows how many codes are currently available out of your target threshold
  • Total: Total codes generated all time
  • Target: Goal amount of codes (equivalent to threshold setting)
  • Generation status: Will show ‘Generating’ if new codes are currently being generated
  • After you’ve created your new offer, you can add it to journeys or campaigns.
Note: If you're not seeing discount codes being generated, remember to mark Attentive as a sales channel on the discount in Shopify in order to “activate” the offer on Attentive’s end. To do so, follow the instructions from Shopify. Selecting Attentive as the sales channel in Shopify.

[Beta] Best practices

For campaigns

  • Set your target threshold higher than your estimated send volume. We recommend a buffer of 10%. Attentive automatically applies a 10% buffer on top of your threshold.
  • Check that code generation is complete before scheduling your campaign.
  • If codes run out mid-send, the campaign will pause. Remaining recipients will not receive their messages until more codes are available.

For journeys

  • Review historical journeys and send volumes to estimate your needs. Set your target threshold higher than your estimated send volume. We recommend a buffer of 10%. Attentive automatically applies a 10% buffer on top of your threshold.
  • Enable Auto-refill for ongoing journeys to maintain a continuous supply of codes.
  • If codes run out, that specific journey send will be dropped. Subscribers will not receive their messages and the send will not be retried.

General recommendations

  • For large sends (100,000+ recipients), create your offer at least 24 hours in advance
  • We recommend using Auto-refill for journeys and other high-volume automated messages

Shopify Coupon Limits

  • Shopify allows a maximum of 20M coupon codes. Once you hit this number more cannot be generated.

  • If your coupons are failing to reach the desired threshold, please go and delete old coupon codes.

[Beta] Frequently Asked Questions

  • How long does it take to generate codes?
    • Generation time depends on your target threshold. Small batches (under 10,000 codes) take minutes, while the maximum threshold of 1 million codes can take up to 16 hours. Plan ahead for large campaigns.
  • Can I use auto-generated coupons in campaigns?
    • Yes! Auto-generated coupons now work in all campaigns and journeys
  • What happens if I run out of codes during a send?
    • For campaigns, the send will pause until more codes are available. For journeys, messages will be dropped and not retried. This is why it's critical to set your threshold higher than your expected send volume.
  • Why do I have more coupons than my threshold?
    • Attentive automatically applies a 10% buffer to coupon generation to avoid running out of coupons.
  • Can I change my threshold?
    • No, you cannot change the threshold after setting it. If you want to change the threshold you need to create a new offer and point it to the same Shopify coupon.
  • Do I need to create the discount in Shopify first?
    • Yes. The discount must be created and active in your Shopify store before you can create an integrated discount code offer in Attentive.
  • Is this feature available for Shopify Plus only?
    • No, auto-generated coupons are available for both Shopify and Shopify Plus users.
  • Can I generate codes for multiple offers at the same time?
    • Yes, but generating multiple large offers simultaneously may slow down overall generation time. For best results, stagger large code generation requests.
  • What if I need coupons immediately?
    • If you need codes right away and can't wait for generation, use the manual CSV upload option instead. Export codes from Shopify and upload them as Unique discount codes in Attentive.
  • Can I switch between Auto-refill and One-Time after creating an offer?
    • No, you cannot switch an integrated offer time.
  • Is there a limit to how many codes I can generate?
    • Yes, the maximum target threshold is 1 million codes per offer. If you have more than 1 million codes queued for generation across all your offers, you'll need to wait for the queue to process before adding more.

Create an offer with unique discount codes from Shopify

If you want to use unique, bulk-generated discount codes from Shopify, you can upload a CSV file with those codes to Attentive. See Create unique discount codes for more information.

Create an offer with a shared discount code from Shopify

After you create a discount with a discount code in Shopify (e.g., SPRING10 for 10% off your purchase), create a new shared discount code in Attentive and use the code from Shopify as its Discount code. See Create a shared discount code for more information.

Articles in this section

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