# How to insert coupon codes in automation emails?

In each automation workflow, there is a coupon block designed to generate dynamic coupons.&#x20;

{% hint style="success" %}
A **dynamic coupon** is a unique, automatically generated coupon code in the coupon block that is created within an automation workflow.
{% endhint %}

These dynamic coupons can be seamlessly included in your automated emails to provide personalized offers to customers.

For example, in the Abandoned Cart Recovery workflow, we configure the coupon block to generate and send dynamic coupons to the customers via automated email.

<figure><img src="https://837552055-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDdKRAW4KzC-CNNbvnH%2Fuploads%2FrfiM0csupV8AYOr1sS5v%2Fimage.png?alt=media&#x26;token=01e56d3e-5fbe-441e-bfe9-a81f48410243" alt=""><figcaption><p>Workflow coupon settings</p></figcaption></figure>

> 1. Click on the ‘Coupon’ block
> 2. Select the Coupon type
> 3. Enter the coupon value and set up expiry (Optional: You can enter a minimum order value if you would like to set up a minimum order value required for using the coupon)
> 4. Save.

Now, you have successfully configured the coupon block.

## Inserting Coupon in email block

There are two ways to insert the coupon code,

* Using the coupon code from the Coupon configuration block
* Creating the new coupon code in the email editor

### Using the coupon code from the coupon configuration block:

In the email template, click on the coupon block **`{{retainful_dynamic_coupon}}`**, and you'll find the coupon settings on the right side. In the coupon settings, click on the first option that says '**Use the coupon code generated by the coupon step**.

<figure><img src="https://837552055-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDdKRAW4KzC-CNNbvnH%2Fuploads%2Fkw2Ra0W0Z7aYw76J2pm1%2Fimage.png?alt=media&#x26;token=3dd71e84-61ac-45e5-8b11-200118675169" alt=""><figcaption><p>Confguring Coupon block</p></figcaption></figure>

By doing this, you ensure that the coupon code generated in the coupon block will be sent to customers through this abandoned cart recovery email.

### Creating the new coupon code in the email editor

* **Click on the Coupon Block**: Locate and click on the coupon block that says **`{{retainful_dynamic_coupon}}`** in the email template.
* **Select the "Create a Coupon Rule" Option**: On the right-hand side, under *Coupon Settings*, choose the second option labeled **"Create a Coupon Rule"**.
* **Configure the Coupon Conditions**:
  * Choose the coupon type (Percentage, Fixed amount, Free shipping).
  * Set the value (e.g., 10%).
  * Optionally, specify the validity period (e.g., 6 days).
  * Add additional conditions like minimum order value, sale item exclusions, or product inclusions/exclusions.
* **Save Your Changes**: Once you’ve set the coupon conditions, click on **Save Coupon Settings** to apply the changes.

<figure><img src="https://837552055-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDdKRAW4KzC-CNNbvnH%2Fuploads%2FKp1ySG47mOGAo9xXKfj1%2Fimage.png?alt=media&#x26;token=1585ae50-d451-427d-aaae-b888a2ce9ed4" alt=""><figcaption><p>Coupon conditions</p></figcaption></figure>

This will ensure that your dynamic coupon is properly configured and ready to be used in your automation workflow.

{% hint style="info" %}
**Need More Help in setting up Retainful?** <br>

We’re here to make things easier for you!<br>

* **Email Us:** Reach out anytime at [<mark style="color:orange;">support@retainful.com</mark>](mailto:support@retainful.com)<mark style="color:orange;">.</mark>
* **Schedule a Call:** Still stuck or need a hands-on walkthrough?

\
&#x20;[<mark style="color:orange;">**Book a quick session with our support team**</mark>](https://zcal.co/retainful/onboarding), and we’ll guide you step-by-step.
{% endhint %}
