Send an Instagram discount code DM automatically

An Instagram discount code DM sends a code and a shop link to everyone who comments a keyword such as CODE, replies to a story or mentions you. ReplyRep sends it about three seconds after the comment, so the offer lands while the shopper is still looking. Codes in DMs are not visible in public comments, which keeps them feeling earned.

Updated · 4 min read · By the ReplyRep team

How does sending discount codes by DM work?

You post an offer and ask people to comment a keyword. Each keyword comment fires a DM with the code and a link to the product or a pre-filtered collection. The same automation can answer story replies, and a story mention can trigger a thank-you code for people who tag you in their own story.

For ecommerce brands, the most valuable place to run it is under ads. Questions like "how much?" and "code?" on a sponsored post are the warmest traffic you pay for, and ad comment automation answers them while the shopper is still on the ad.

Why send codes in the DMs instead of the caption?

  • The code feels earned. A code printed in the caption is everyone's. A code sent on request feels like it was for them.
  • It ends up on the checkout page. The DM can link straight to the product with the code beside it, instead of asking people to remember it.
  • Codes travel less. Coupon sites scrape public captions more easily than private messages.
  • You start a conversation. The person who asked for a code can be followed up and shown the matching product.

How do you set up discount code DMs?

  1. 1

    Create the code in your shop

    Decide the discount, the expiry and the minimum spend before you write a word. The DM must match the code's real terms.

  2. 2

    Pick the keyword

    CODE, SALE, or the product name. For a code that should work everywhere, make it a Global Trigger so it answers on every post, story and DM.

  3. 3

    Write the DM with code and link together

    Code on its own line so it is easy to copy, then the link, then one line about the expiry.

  4. 4

    Add a story mention thank-you

    When someone tags you in their story, send a thank-you code. It rewards user content while the story is still live.

  5. 5

    Follow up and suggest

    A follow up before the code expires, and a suggestion after the link for the product most people buy with it.

Discount code DM templates

Post or reel: code plus product linkComment: CODE

Public reply

Sent you something

DM

Here you go, {first_name}: {code} 15% off the linen set until Sunday: {link}

Follow up

Your code ends tonight at midnight. Here's the link again: {link}

Ad comment: price, link and codeComment: PRICE

DM

Hi {first_name}, it's $48, and this code takes 10% off your first order: {code} Shop it here: {link}

Story mention: thank-you code

DM

Thank you for the shout-out, {first_name}. That made our day. Here's 15% off your next order: {code}

For more by niche, see the discount code DM templates.

What should the caption say?

"Comment CODE and I'll DM you 15% off." State the size of the discount in the caption, because it is the reason to comment, and keep the code itself for the DM. If the code expires, say when in both places.

Send your next code by DM

Story mentions, comments and story replies can all send the same code. Start free.

Start free

Which ReplyRep features do you need?

FeatureWhat it does in this playPlan
Comment to DMSends the code when someone comments the keywordEvery plan
Story mention auto replySends a thank-you code when someone tags you in their storySee pricing
Global TriggersOne keyword that works everywhere. Free includes 5 per accountEvery plan
Follow UpA reminder before the code expiresLite and up
Suggest MorePoints to the product people usually addLite and up

What does a discount code DM look like in practice?

Say a candle shop posts a reel of its autumn scent with the caption "Comment CODE for 15% off this week." The keyword is attached to the reel and also set as a Global Trigger, so story replies saying CODE get the same message. Each commenter receives the code on its own line, a link to the scent's product page, and the expiry date. Three days later, a follow up goes to the people who have not clicked: one line, the same link, and the reminder that the code ends Sunday.

Meanwhile anyone who tags the shop in a story gets a thank-you and the same code, and an ad running the same reel answers "how much?" with the price and the link. Three entry points, one offer, one code to track in the shop's discount report.

What should you track?

  • Code redemptions, in your shop's discount report. Use a unique code per campaign so Instagram sales are separable.
  • Average order value for the code against full-price orders.
  • Redemptions after the follow up, to see what the reminder is worth.
  • Ad comment volume, if you run it under sponsored posts.

Common mistakes

  • Sending a code that has expired because the old post is still firing.
  • A DM that says 20% when the code gives 15%.
  • Discounting so often that nobody pays full price on launch day.
  • Linking to the homepage instead of the product the post was about.

@ceramics.by.nadia reports $1.2M in sales from comments. If you sell on Shopify, our guide to Instagram DM automation for Shopify covers links, codes and tracking end to end.

Questions

Frequently asked questions

The DM sends the text you write, so every person gets the same code you put in it. If you need one-time codes, create a campaign code with a usage limit in your shop, or generate single-use codes in your email tool after collecting the address.

Anyone who receives a code can share it. DMs leak less than captions because the code is not on the public page, but set an expiry and a usage cap on anything you would not want circulating.

Yes. Story mentions can trigger a DM, so someone who tags you gets a thank-you and a code while their story is still live. It rewards people for posting about you, and the code gives them a reason to come back and buy again.

Use a code that only appears in that DM, and add UTM tags to the link. Your shop's discount report and your analytics then show DM-driven orders separately from everything else.

Your first automation, live in about four minutes

Free plan, no card, no trial timer. Built on Meta’s official Instagram API.

Start free