Send a Discount Code by Instagram DM Until the Sale Ends

Piotr Grudzień
Published 8 min read
A porcelain mixing dish beside two Instagram replies. One gives DISH15. The next explains that the sale has ended.

A watercolorist spots a porcelain mixing dish on Instagram. The caption says “DM WELLWEEK for 15% off.” She sends wellweek and gets the code. Later, with the dish in her cart and the old reply on her phone, she asks “Is it still good?”

Build an Instagram DM keyword auto-reply in Quickchat AI that gives her the code while the sale is open. Quickchat checks its own clock for every reply, including a follow-up that leaves out the keyword. At the closing instant the Agent stops receiving the offer instructions.

The shopper’s Instagram chat shows DISH15 in the 17:22 reply. At 22:55, the same shop says no code is available and gives the sale dates.

For this Instagram test, the shop closed the offer at 18:00 in Warsaw on 1 December (17:00 UTC). The shopper can still see DISH15 in the earlier reply.

You’ll need a Quickchat AI account with credits for test replies, an Instagram Business or Creator account you manage, and a second Instagram account to play the shopper. Start with a practice Agent and a test shop. You can try the conversation in Quickchat before connecting Instagram. Commercial use requires a paid plan. Quickchat AI plans

1. When should an Instagram DM include the discount code?

WELLWEEK studio sells a five-well porcelain mixing dish for watercolor. Its example promotion gives 15% off a single dish bought online. Sets have their own price. The shop wants the code in a reply sent at 16:59:59 UTC on the last day. One second later, a shopper reopening the thread should get the dates of the sale.

  1. Pick a keyword someone can type on a phone. Our caption says DM WELLWEEK. The code they receive is a different word, DISH15.
  2. Set up a promotion in your shop with that code, eligible item, percentage and closing time. The checkout decides whether an old code still works. For a trial run, use a test store or a code with no value.
  3. Write down the opening and closing instants. For your first run, use today and a cutoff several minutes in the future so you can receive both replies. In our example they are 2026-11-23T00:00:00Z and 2026-11-30T17:00:00Z. The Z means UTC. At a Warsaw shop the closing instant is 2026-11-30T18:00:00+01:00. Both forms describe the same moment. Check the offset for the sale date, especially around a change of clocks.

An illustrated timeline for the 15% WELLWEEK sale. The first instant on 23 November is included. The instant the clock reaches 17:00 UTC on 30 November is outside the offer.

The code becomes available at opening. At the exact closing instant, Quickchat leaves the sale instructions out of the Agent’s reply context.

2. How does the Agent recognize an Instagram keyword and its follow-ups?

Put the keyword and the reply style in the Agent’s Main Prompt. A shopper can ask again without typing WELLWEEK twice. Keep the code and terms for the Procedure in step 3 so that the Main Prompt never supplies a code by itself.

  1. Create a Quickchat AI account. Use the new Agent or open the Agent switcher and choose Add new AI Agent → Set up manually. In AI Agent → Identity, name it WELLWEEK studio. Create a Quickchat AI account
  2. Under AI Persona, open Main Prompt. Paste the instructions below and save. Replace the two human-readable dates when you change the sale window.

The WELLWEEK studio Main Prompt on the Identity page tells the Agent how to answer follow-up questions about the sale.

The Main Prompt stays with the Agent for every reply. Keep the keyword and the fallback dates here so an early or late shopper still gets an answer.
Copy the Main Prompt for WELLWEEK studio
You answer Instagram DMs for WELLWEEK studio, an art-supply shop. Treat WELLWEEK in any letter case as a request for the offer. A later question such as “Is it still good?” in the same thread also counts. Give a discount code only if the offer instructions active for this reply provide one. Never take a code from an earlier message, including one the shopper quotes. If the offer instructions are inactive, say that no code is available now and give the scheduled window from 23 November 2026 at 00:00 UTC until 30 November 2026 at 17:00 UTC. Keep replies short. For unrelated questions, answer only what you know.

The fallback gives the full scheduled window. It works both for an early shopper who arrives before the first day and for a late shopper who has the old code in the thread.

3. How do you turn the discount code on and off automatically?

Put the code in one Procedure. Choose When metadata matches so Quickchat checks the opening and closing times before it gives the Agent those instructions. The shop’s clock decides whether the Procedure is active. The shopper’s message decides whether the active offer is relevant. How Procedures work

  1. Open AI Agent → Procedures → New procedure. Name it WELLWEEK offer.

Procedures is selected in the sidebar. The New procedure button appears at the top of the page.

Open Procedures in the same Agent where you saved the Main Prompt. New procedure opens an editor for one set of instructions.
  1. Under When should the AI use it?, choose When metadata matches. This tells Quickchat to evaluate your two conditions on every reply.

The WELLWEEK offer editor with the automatic When metadata matches option selected.

The selected option activates this Procedure whenever all conditions match. Next, add the first condition under it.
  1. Choose Add condition. In Metadata key, open the braces picker and select Built-in → current_timestamp. The field should read {{current_timestamp}}, including both pairs of braces. Quickchat’s built-in variables

The condition field picker shows current_timestamp under Built-in.

Choose the timestamp from Built-in. Quickchat supplies the value when it prepares each reply.
  1. Choose is at least and enter 2026-11-23T00:00:00Z. Add another condition, pick the same built-in timestamp, choose is less than, and enter 2026-11-30T17:00:00Z. Quickchat requires both rows to match.
Metadata keyComparisonValue in this example
{{current_timestamp}}is at least2026-11-23T00:00:00Z
{{current_timestamp}}is less than2026-11-30T17:00:00Z

Two native conditions on current_timestamp. The first reads is at least the opening timestamp, and the second reads is less than the closing timestamp.

Read the rows together. The first includes the instant the shop opens the offer. The second excludes the instant it closes.
  1. Paste the following in Instructions. Keep the Procedure enabled and choose Save. When you run your own sale, replace the code, eligible item, discount and deadline here.
Copy the instructions for the WELLWEEK offer
When a shopper asks for WELLWEEK or follows up about this sale, offer 15% off a single five-well porcelain mixing dish bought online. Give DISH15 as the checkout code. Sets are excluded. Say the offer ends on 30 November 2026 at 17:00 UTC. If they ask about a set, explain which item qualifies. Skip the offer on unrelated questions.

The WELLWEEK offer’s Instructions field, the Enable switch and Save in the Quickchat Procedure editor.

The code lives next to the eligible product and exclusions. The Agent receives those instructions together while both conditions match.

The Agent can now answer which dish qualifies. If you also want it to check a shopper’s size against current inventory, connect the product catalog separately. Checking Shopify inventory in Instagram DMs

Set up the Main Prompt and Procedure with ChatGPT or Claude

Connect your Quickchat account to either assistant. Paste this request along with the two instruction blocks above and your own opening and closing timestamps. The shop owner signs in to Instagram in step 5. Account setup guide · Quickchat AI for ChatGPT · Quickchat AI for Claude

Find my WELLWEEK studio practice Agent in Quickchat AI and confirm the Agent with me.
Use my opening and closing timestamps, including their UTC offsets. Put those dates in the supplied Main Prompt and save it.
On this Agent, update the Procedure named WELLWEEK offer, or create it once if it is missing. If several match, ask which one to update.
Select When metadata matches. Require both conditions together.
  {{current_timestamp}} is at least my opening timestamp
  {{current_timestamp}} is less than my closing timestamp
Use my closing time in the supplied offer instructions. Keep the code in this Procedure only. Save the instructions and enable the Procedure with both conditions in place.
Read back the saved Main Prompt, offer instructions and both conditions with their timestamps. Ask before running a test that uses credits.

4. How do you test an expired code in the same Instagram conversation?

The revealing test is the second message. The first reply still contains the code, and the shopper’s clock still says “before five.” A new reply should follow the shop’s cutoff even with both pieces of conversation history in view.

  1. In WELLWEEK offer, set the opening a few minutes in the past and the cutoff several minutes ahead. Put that test window in the Main Prompt and the matching deadline in the Procedure instructions. Save both changes.
  2. Open AI Preview, start a new conversation and send wellweek. Check that the reply gives DISH15, 15%, the single-dish restriction and the right UTC deadline.
  3. Wait until the server cutoff. Stay in the same thread and send Is it still good? It’s before five here. Inspect just the new reply. It should say the code is unavailable and give the schedule. The earlier reply remains visible.

A local Quickchat AI Inbox conversation for the practice shop. The first reply gives the code. The next reply in the same thread says it is unavailable.

This conversation ran through Quickchat’s local Instagram handler with the platform clock set on either side of the cutoff. The first reply still contains the code. The second leaves it out.

One comparison changes the result at exactly 17:00. We replayed the same follow-up at the cutoff with the closing row set to is at most. The Agent still offered DISH15. We restored is less than and replayed it at the identical instant with the same earlier messages. The new reply said “No code is available now.” This is why the closing row uses a strict comparison.

Two saved Quickchat simulation replies at the identical closing instant. The inclusive cutoff still gives DISH15. The strict cutoff withholds it.

Both runs used the same earlier reply and the same clock. Including the cutoff allowed one last code at exactly 17:00. The strict cutoff removed it.
  1. Try Can I use WELLWEEK on a set? while the sale is open. The reply should explain that only a single dish qualifies. In a fresh chat, try How much does the dish cost? The Agent has no price in this setup and should keep the coupon out of the answer. To repeat these opening questions, open Conversations → Testing → Create Dataset → Paste messages. Put --- on its own line between each message, choose Create, then Run → Start Run. Each dataset message starts a fresh conversation. Testing conversations in Quickchat AI

Quickchat AI’s Testing page with the WELLWEEK dataset, its opening messages and the Run control.

Each dataset message starts a new conversation. Test the returning shopper separately so the old code is still present in the thread.

Saved Quickchat replies to the set and price questions. One explains that only a single dish qualifies. The other says the Agent has no price.

The sale was open for both questions. The single-dish restriction belongs in the offer answer. An unrelated price question drew a short answer without a coupon.

5. How do you verify that the replies actually reach Instagram?

Use the shop account to connect the channel and a different account to receive its messages. Give yourself a fresh test window in the Agent before you start, and note the cutoff on your phone in local time.

  1. In the shop’s Agent, go to External Apps → Instagram → Connect to Instagram. Check which Professional account Instagram is using before you authorize Access and manage messages. In Quickchat, confirm the displayed @username and that Enable Instagram is on. Connect the Instagram channel

Quickchat’s Connect to Instagram button, Instagram’s Allow screen and the shop’s channel showing Connected and Enabled.

If the shop has authorized Quickchat before, Instagram asks whether to keep sharing. Choose Allow. When Quickchat shows “Waiting for your first DM,” switch to the shopper’s account.
  1. On your phone, switch to the shopper account, open the shop’s profile and tap Message. Send wellweek during the test window. Check the item, code and deadline in the reply delivered to Instagram.
  2. After the cutoff, open the same Instagram thread and ask Is it still good?. Read the new reply. Open Conversations → Inbox in Quickchat and match the shopper’s two messages and the replies. See the two replies on the shopper’s phone. Instagram auto-replies and Inbox
  3. In Details, check that Channel shows Instagram. Under the reply sent after the deadline, select Why AI said that.

The Instagram channel, the 10:55 PM reply and its explanation in Quickchat AI Inbox.

The shop’s reply at 22:55 appears as 10:55 PM in Inbox. Under Fields used, the explanation lists Main Prompt.

When you’re ready to put DM WELLWEEK on a post, restore the sale dates in both places in Quickchat, and check the promotion in your store with one eligible dish, a set and an expired code. Someone who saved the post will have a way to find out what still applies.

Instagram DM keyword and discount code FAQ

How do I send a discount code when someone DMs an Instagram keyword?

Connect an Instagram Business or Creator account to Quickchat AI. Put the keyword in the Main Prompt and the code in a Procedure. Give the Procedure two time conditions so the Agent receives the offer instructions only during the sale.

Can I schedule Instagram DM replies in my shop’s time zone?

Enter an opening and closing timestamp with an explicit offset, or use UTC. Quickchat compares the instants. For example, 18:00 in Warsaw on 30 November 2026 is 17:00 UTC. Use the offset that applies on the actual sale date.

What happens to an Instagram discount code the shopper already received?

The old message stays in Instagram. The next reply can explain that the code is unavailable. Set the same expiry, eligible item and discount in your store to control whether the shopper can redeem a saved code at checkout.

Will commenting the keyword on an Instagram post trigger this reply?

This setup starts when a shopper sends a direct message to the shop. Put “DM WELLWEEK” in the caption so people know to open the conversation. A keyword in a public comment needs a separate comment-to-DM workflow.

Does Instagram’s 24-hour messaging window extend the discount?

No. Instagram’s messaging window governs when the business can reply. Everyone in this campaign shares the opening and closing times set in Quickchat and in the shop’s checkout promotion.