> For the complete documentation index, see [llms.txt](https://docs.personaldiscount.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.personaldiscount.io/discounteo-for-shopify/integrate-discounteo-with-your-email-service-provider/mailchimp/create-a-link-to-apply-discount-automatically.md).

# Create a link to apply discount automatically

Shopify provides the mechanism of [shareable discount links](https://www.shopify.com/blog/shareable-discount-links). In a nutshell, when your customers click such a link, then they are redirected to your store homepage, and the discount is automatically applied at checkout.

When you use an email marketing service other than Mailchimp, then Discounteo gives you a code snippet that already works like the shareable discount link.

If you use Mailchimp, then you'll need to prepare a sharable discount link manually. To do the trick you need to construct the link in your email template as follows: `https://{shop_name}.myshopify.com/discount/*|DSCNT_CODE|*` where `{shop_name}` should be replaced with your shop name.

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2F4UcYmrUrIXFc9XnslkcP%2Femail-template-sharable-discount-link.png?alt=media&amp;token=7d645fd9-46fc-46b1-bac4-2dde75315a58" alt="Shopify shareable discount link in an email template"><figcaption><p>Email template with a shareable Shopify discount link</p></figcaption></figure>

A final email will look for example like this:

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FohYiYFw3j2kVTGk5NI7O%2Fsharable-discount-link-email-annotated.png?alt=media&amp;token=b670b1a0-5fd2-468b-b33e-28609caa3014" alt="Shopify shareable discount link in an email template"><figcaption><p>Discount code in Mailchimp displayed as a shareable Shopify discount link</p></figcaption></figure>

When the link is clicked then the discount will be automatically applied at checkout:

<figure><img src="https://3731721370-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZdVZovthV0SPlgxS6Y%2Fuploads%2FzV97YqhyX0sGERoO1rjv%2Fsharable-discount-link-checkout-annotated.png?alt=media&amp;token=55b699b2-de82-464c-9e5f-5a6e821290fb" alt="Shareable discount link to the Shopify checkout"><figcaption><p>Shareable discount link to a Shopify checkout</p></figcaption></figure>
