A shopper signs up, copies the discount code on screen, then receives a different code by email a minute later. If the first one fails at checkout, the shopper has to guess which offer is valid. If both work separately, you may accidentally give out two discounts where you intended to offer one.

An Omnisend signup form on a Shopify store can generate a unique code for a recipient, display it after signup, and pass that same code to the welcome email. The important part is to generate the code in one place: the form itself.

1. Define the offer in the form

In the Omnisend form’s discount settings, select “Unique.” Define what qualifies for the discount, whether there is a minimum order value, which offers it can combine with, and when it expires. To show the code straight away, add a discount item to the form’s “Success Message” and select the offer set up in the form. Generating unique codes in these forms is supported only for Shopify stores.

2. Display the form’s code in the email

In the Welcome automation email, insert the “Discount code” personalization field: [[event.discount_code]]. It displays the code passed on by the form. If you leave in a separate email discount block that generates its own code, you can end up with two different codes again.

If you have several forms, check which signups trigger this automation. A signup from another form that does not generate a discount may leave this field empty. It is better to show that contact a different version of the email than to promise a code and deliver none.

3. Run two test signups before launch

Suppose a store offers 10% off orders of €60 or more. This is an example, not a recommended discount. Use two new email addresses in separate browser sessions, preferably in a test store.

  1. Signup A. Record the code displayed after signup. The welcome email should show the same code.
  2. Signup B. Repeat the check. B should get a different code from A, but B’s on-screen and email codes should match.
  3. Checkout. Try a qualifying cart and a nonqualifying cart, for example below €60. Check how the code behaves alongside promotions that are active at the time. If the offer should apply only to a first order, test separately while signed in as a returning customer. A unique code does not, by itself, prove that eligibility is limited by order history.
  4. Reuse. If you promise single use, place a test order in the test store and try using the same code again.

What should you check if previously issued codes stop working?

If you removed the linked collection, the form may still show pre-generated codes that are no longer valid. Link the discount to an active collection or change the eligibility rule, then repeat both signups. If you deleted the Omnisend-created discount in Shopify itself, the codes it already issued are invalid. Omnisend says the parent discount may be recreated automatically the next day, but this does not restore old codes.

Sources: Omnisend’s guide to signup form discounts and Shopify’s discount combination rules.

Request an email automation audit