Skip to main content
Discount Item for WooCommerce

Learn how use unique and static discount codes in Omnisend Campaigns and Automations for WooCommerce stores

Ira avatar
Written by Ira
Updated over 2 months ago

Omnisend offers various ways to provide discounts to your customers. Discount content block has an ultimate functionality, allowing you to generate unique discount codes for your WooCommerce store.

This article will show you how to set up unique discount code generation in your WooCommerce account and use them in your Omnisend campaigns and automations.

If your store is not on WooCommerce but on Shopify or BigCommerce, jump to the dedicated article.

If your store is on some other platform, check this article.

Didn’t find what you were looking for? Post a thread on the WordPress forum and support the community by getting the answers you need.

Before You Begin

  • Unique codes will only work with unique discounts enabled in your WordPress admin. The process is described below.

  • If the Omnisend plugin isn't set to 'auto-update' in your WordPress admin, update it manually under the Plugins tab.

  • If you choose a static discount content block - you will need to type in the code manually. Unique codes are only populated in the Unique discount content block.

Setup Process

To enable auto-generated discounts for your WooCommerce store, follow these simple steps to turn on unique code creation.

Step 1. There are two ways to start the process: go to your WordPress admin and open your Omnisend plugin or begin by adding a Unique Discount block to your Omnisend email. A popup window will appear, providing instructions on how to turn on this feature.

Step 2. Once in your WordPress Admin panel, you will see a banner prompting you to click the "Enable Unique discounts."

Step 3. Once you click "Enable Unique discounts," a popup window will appear asking you to approve this action and to allow access to manage the coupons, products, customers, orders, and sales report. Click "Approve" to continue.

⚠ If you get an error message stating, "Error: An error occurred in the request, and at the time, we were unable to send the consumer data," please see the Troubleshooting section below.

Step 4. After pressing the "Approve" button, a success message will appear in your WordPress Admin panel informing you that your site is connected to Omnisend now, meaning unique discount codes are enabled.

If you started by adding a discount block to your email, when you return to the Campaign Editor, you'll see a success banner meaning unique discount codes can now be used in your emails.

Unique Discounts in Campaigns

When you add the Unique Discount Content Block to your email campaign, a unique discount code will be generated for that campaign, ensuring that all campaign recipients receive the same discount code.

During the setup process, a placeholder of XXXX-XXXX-XXXX will be displayed, and the code will be automatically inserted from your store's admin once the campaign is sent.

Important! The email campaign test emails will still show the XXXX-XXXX-XXXX placeholder, as the discount code isn't generated when you send the test email.

In WooCommerce admin, the discount code will be displayed under Marketing → Coupons in the following way.

By clicking "edit" under the code, you will see the generated code's general settings, usage restrictions, and usage limits.

Unique Discounts in Automations

If you add the Discount content block to your automation, by default, each email will include a custom, unique discount code. Therefore, each recipient will receive a unique discount code. However, you can also choose to reuse the same discount codes (across multiple automation messages in emails and SMS); continue reading to learn how. 

Note! You must follow the setup process described above to ensure you enable discount creation on the WordPress end. Otherwise, you will see the following popup banner.

During the setup, you will see only the placeholder, and the actual discount will be generated when the message is sent.

As previously mentioned, if you add the discount item to each automation email, different codes will be generated for each email. However, if you want to use the same code in all of the automation emails, you can enable the option to reuse a unique discount code in the workflow, meaning the same code will be shared with a customer across multiple automation messages in both email and SMS (if added).

  • If the Reuse unique discount code in this workflow setting is enabled, the same discount code will be applied across multiple messages (email and SMS) within the same automation, keeping your offer consistent.

  • Important: If you set the coupon expiry date shorter than the delay between messages in the automation workflow, Omnisend will automatically check if the reusable discount code is still valid before sending a new message. If the code has expired, Omnisend will generate a new one, even if the Reuse Discount Code setting is enabled, so your customers don't receive expired discounts.

Important! The automation test emails will still show the XXXX-XXXX-XXXX placeholder, as the discount code isn't generated when you send the test email.

Discount Item Settings

The discount content block is available in the editor under the Content step.

You will need to open the Quick Add menu and select one of the discount blocks → drag and drop it into your email if it's not added by default.

The static discount block has a code field where you must type in the code. Please note the code won't be generated automatically.

Unique discount codes will sync the codes generated in your WordPress admin automatically.

Once you add a Unique Discount block to the email, you can edit the code settings.

Under the Unique Discount tab, you will find the general settings, where you can change the block's content and discount conditions.

Discount Type and Value Type

The first option available in the menu allows you to choose the type of discount.

  • Cart discount: specify the percentage or specific amount off (the amount will be set in your store's currency) and expiry period.

  • Free shipping: provides a free shipping with a specific expiry date.

You can also apply the discount to all products or the minimum order price (the amount will be set in your store's currency).

Note! It's impossible to set discount conditions to be applicable to a specific category for now, but we're planning to add such an option in the upcoming updates.

Annotation

Gmail Annotations are a feature specifically designed for promotional emails. They allow you to include additional information about your promotions, which is displayed in the recipient's inbox, making your email more noticeable.

Here's what it looks like in your customers' inboxes.

Expiry Period & Date Format

After selecting the type and value of the discount, you can also provide an expiry period. The expiration period starts when the message with the discount is sent and ends at the end of the day + Expiration period, both in your Omnisend account time zone.

For example, if you send a message with a discount that expires in one day at 3:21 PM EDT, the start time in EDT is set to 8:21 AM (3:21 in EET), and the end time is 4:59 PM (11:59 PM EET) on the next day.

In other words, the discount is valid for one day, plus hours left by the end of the other.

Button

Button settings allow you to edit text, link, style, and button alignment. The button link is the link your customers will be taken to after they click it. By default, it's your store's homepage, but you can use any link you want.

Once you finalize editing the block, it will be auto-saved, so you can proceed with editing your email further 🚀

Discount codes are excellent for attracting new customers while demonstrating gratitude for loyal and long-term customers. Sharing discounts with your customers has never been easier. Simply add a discount content block to your email and make your email marketing relevant!

Troubleshooting

If you face any issues setting discount codes, please check the permalink settings in your WordPress admin. The default permalink will not work, so you would need to go to Settings → Permalinks and turn on "Post name."

Without this setting enabled, Omnisend won't be able to reach your WooCommerce Rest API to generate discount codes successfully.

If you get an error message "Error: An error occurred in the request and at the time we were unable to send the consumer data." please go to WooCommerce > Status > Tools.

Then scroll lower and click the "Verify database" button next to the "Verify base database tables" section.

Afterwards, go to the Omnisend page and click "Enable Unique discounts" again.

If you still get an error, please contact your hosting provider and make sure that your store’s WooCommerce Rest API is accessible from the outside. In particular, we expect that these endpoints are not blocked:

- [YOUR SHOP DOMAIN]/wp-json/wc/v3/settings
- [YOUR SHOP DOMAIN]/wp-json/wc/v3/coupons

Also, ensure that tools such as CloudFlare are not interfering with requests to these endpoints. If our integration can't access these endpoints, the Unique Discounts won’t we won't

FAQ

Can the format of the auto-generated discount be changed?

The format of the code generated in the Discount Content block cannot be changed. Nevertheless, you can create your own code on your store and then insert it in your email as a static discount code.

Will I see the discount code in my WordPress admin?

Yes, the discount code will be created in your WordPress admin after sending the email.

Can I use multiple discount codes in a single email?

Ensure that only one unique discount code is generated per email; placing multiple unique codes will result in all of them using the same code based on the first block configuration.

To use different unique discount codes with different conditions, place them in separate emails and don't use reuse codes settings.

Did this answer your question?