Flash Sale & Promo Notification Agent
Push time-limited deals to a contact list over WhatsApp or outbound voice, then handle the inbound spike of orders and questions.
What you'll build
An agent that broadcasts flash sale notifications over WhatsApp and outbound voice, then fields the resulting inbound replies and order requests without missing a beat.
Customer journey
Your marketing team sends a WhatsApp broadcast (or scheduled script) announcing a flash sale. Customers reply with questions; the agent answers from the promo knowledge base. For VIP segments, an outbound call can deliver the offer personally.
See Deploying and testing channels for connect and test steps per channel.
Prerequisites
- BimpeAI account with an API key (
sk_…) - Read Anatomy of a workflow agent first — this recipe skips steps covered there
- A contact list (CSV or CRM export) and your promotional offer copy ready
Steps
1. Find or create the workflow
import { BimpeAI } from "@bimpeai/sdk";
const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });
const page = await bimpe.workflows.list({ scope: "public", search: "promo notification" });
const workflow = page.data[0];
console.log(workflow.id, workflow.name);import os
from bimpeai import BimpeAI
client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])
page = client.workflows.list(scope="public", search="promo notification")
workflow = page.data[0]
print(workflow.id, workflow.name)Or build a new workflow from scratch with workflows.create instead of finding one. name and system_prompt are required; it returns the new Workflow whose id you bind the agent to. See Anatomy of a workflow agent for the full set of optional fields like rules and flows.
const workflow = await bimpe.workflows.create({
name: "Flash sale agent",
system_prompt: "You notify customers about time-limited deals and handle inbound order requests.",
});
console.log(workflow.id);workflow = client.workflows.create(
name="Flash sale agent",
system_prompt="You notify customers about time-limited deals and handle inbound order requests.",
)
print(workflow.id)2. Create the agent
const agent = await bimpe.agents.create(
{
name: "Flash sale agent",
description: "Notifies customers about time-limited deals and handles inbound order requests.",
workflow_id: workflow.id,
},
{ idempotencyKey: "create-flash-sale-agent-v1" },
);
console.log(agent.id);agent = client.agents.create(
name="Flash sale agent",
description="Notifies customers about time-limited deals and handles inbound order requests.",
workflow_id=workflow.id,
idempotency_key="create-flash-sale-agent-v1",
)
print(agent.id)3. Add knowledge bases (optional)
Knowledge bases are optional; an agent whose workflow and integrations already cover everything it needs to say can skip this step. This recipe uses one to ground the agent in the details it must quote accurately.
Add the promotional catalogue so the agent can answer product and pricing questions during the inbound spike.
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "Flash sale catalogue",
content: `
SALE ENDS: Sunday 23:59 UTC
Blue running shoes | Was £65 | NOW £39
White trainers | Was £55 | NOW £33
Black yoga mat | Was £30 | NOW £18
Free delivery on orders over £50.
`,
});client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "Flash sale catalogue",
"content": (
"SALE ENDS: Sunday 23:59 UTC\n"
"Blue running shoes | Was £65 | NOW £39\n"
"White trainers | Was £55 | NOW £33\n"
"Black yoga mat | Was £30 | NOW £18\n"
"Free delivery on orders over £50."
),
})4. Connect channels and integrations (dashboard)
Channels and your CRM are connected in the dashboard
The API cannot create channel connections, but integrations can now be configured through it; see Configuring integrations. Connect your messaging and voice channels on the Deploy screen and your CRM on the Integrations screen of the Console dashboard. The SDK lists what is active but cannot modify channel connections.
- In the Console dashboard, pick your agent from the switcher at the top, then open Deploy.
- Under Messaging & Chat, click Connect on the WhatsApp card and follow the prompts to link your WhatsApp Business number.
- Under Voice, click Set up on the Telephony card — it is an add-on with usage-based pricing. Provision or link a number under Team settings → Phone numbers, then set the agent's voice and greeting under Settings → Voice.
- (Optional) Open Integrations, find your CRM, and click Connect so the agent can sync contact lists and tag notified customers.
Connect WhatsApp
Customers message your WhatsApp Business number for support and transactions.
- Open the Deploy screen in the Console dashboard and select your agent.
- Under Messaging & Chat, click Connect on the WhatsApp card.
- Follow the prompts to link your WhatsApp Business number.
- Once connected, customers can message your business number and the agent replies within WhatsApp's 24-hour session window.
Full reference: Deploying and testing channels.
Connect Telephony (outbound)
Your system calls customers for reminders, alerts, or follow-ups.
- Open Deploy and click Set up on the Telephony card.
- Under Team settings → Phone numbers, request or link an outbound-capable number and assign it to this agent.
- Under Settings → Voice, set the outbound voice and greeting.
- Place calls with
calls.makeandis_test_call: false, or trigger calls from your backend when events fire.
Full reference: Deploying and testing channels.
Also on Instagram and Messenger: the same Deploy → Connect flow applies. Testers use the Deploy panel links or getTestCode deep links for each network. Instagram · Messenger
5. Test your agent
Before going live, exercise the agent on a test channel. Fetch the test code (created on first request), then test on WhatsApp — share the deep link or start message with a human tester, or inject a message from your server.
Test WhatsApp
Human tester: fetch the test code with agents.getTestCode (or use the Deploy panel). Share the deep link or start <code> message with a tester.
SDK injection: call conversations.send with is_test_channel: true and the matching channel_type.
Full reference: Deploying and testing channels.
Test Telephony (outbound)
Test call: use calls.make(agentId, { destination, is_test_call: true }) — test telephony consumes no live minutes.
Confirm channels.telephony.is_enabled from getTestCode before placing live calls.
Full reference: Deploying and testing channels.
const { channels } = await bimpe.agents.getTestCode(agent.id);
// A tester opens channels.whatsapp.url, or sends channels.whatsapp.start_message
// to channels.whatsapp.phone_number, to open a 24-hour test window.
console.log(channels.whatsapp.start_message, channels.whatsapp.url);
// Or inject a test message yourself:
await bimpe.conversations.send(agent.id, {
message: "Are the blue running shoes still £39? Can I get two pairs?",
channel_type: "whatsapp",
channel_user_id: "<tester-whatsapp-number>",
is_test_channel: true,
});test_code = client.agents.get_test_code(agent.id)
# A tester opens .url, or sends .start_message to .phone_number, to open a 24-hour window.
print(test_code.channels.whatsapp.start_message, test_code.channels.whatsapp.url)
# Or inject a test message yourself:
client.conversations.send(
agent.id,
message="Are the blue running shoes still £39? Can I get two pairs?",
channel_type="whatsapp",
channel_user_id="<tester-whatsapp-number>",
is_test_channel=True,
)To exercise the phone path too, place a test call with bimpe.calls.make(agent.id, { destination, is_test_call: true }) (Python: client.calls.make(agent.id, {"destination": ..., "is_test_call": True})).
See Test your agent for the other test channels and the pause-AI rule.
6. Go live
Trigger notifications from your own scheduler (cron, queue worker). Inbound WhatsApp replies appear as conversations you can monitor via the SDK:
const controller = new AbortController();
for await (const event of bimpe.conversations.messages.stream(agent.id, conversationId, {
signal: controller.signal,
})) {
console.log(event.role, event.message);
}for msg in client.conversations.messages.stream(agent_id, conversation_id):
print(msg.role, msg.message)Full example
import { BimpeAI } from "@bimpeai/sdk";
const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });
// 1. Find workflow
const page = await bimpe.workflows.list({ scope: "public", search: "promo notification" });
const workflow = page.data[0];
// 2. Create agent
const agent = await bimpe.agents.create(
{
name: "Flash sale agent",
description: "Notifies customers about time-limited deals and handles inbound order requests.",
workflow_id: workflow.id,
},
{ idempotencyKey: "create-flash-sale-agent-v1" },
);
// 3. Add promo catalogue
await bimpe.agents.knowledgeBases.create(agent.id, {
type: "text",
name: "Flash sale catalogue",
content: `
SALE ENDS: Sunday 23:59 UTC
Blue running shoes | Was £65 | NOW £39
White trainers | Was £55 | NOW £33
Black yoga mat | Was £30 | NOW £18
`,
});
// 4. Channels are connected in the Console dashboard (WhatsApp + outbound voice)
// 5. Stream inbound WhatsApp replies
const controller = new AbortController();
const conversations = await bimpe.conversations.list(agent.id, { channel: "whatsapp" });
const conv = conversations.data[0];
if (conv) {
for await (const event of bimpe.conversations.messages.stream(agent.id, conv.id, {
signal: controller.signal,
})) {
console.log(event.role, event.message);
}
}import os
from bimpeai import BimpeAI
client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])
# 1. Find workflow
page = client.workflows.list(scope="public", search="promo notification")
workflow = page.data[0]
# 2. Create agent
agent = client.agents.create(
name="Flash sale agent",
description="Notifies customers about time-limited deals and handles inbound order requests.",
workflow_id=workflow.id,
idempotency_key="create-flash-sale-agent-v1",
)
# 3. Add promo catalogue
client.agents.knowledge_bases.create(agent.id, {
"type": "text",
"name": "Flash sale catalogue",
"content": (
"SALE ENDS: Sunday 23:59 UTC\n"
"Blue running shoes | Was £65 | NOW £39\n"
"White trainers | Was £55 | NOW £33\n"
"Black yoga mat | Was £30 | NOW £18"
),
})
# 4. Channels are connected in the Console dashboard (WhatsApp + outbound voice)
# 5. Stream inbound WhatsApp replies
conversations = client.conversations.list(agent.id, channel="whatsapp")
if conversations.data:
conv = conversations.data[0]
for msg in client.conversations.messages.stream(agent.id, conv.id):
print(msg.role, msg.message)Deploy and go live
Go-live checklist
- Store your API key in
BIMPEAI_API_KEY(server-side only). - Confirm Product catalogue appears in
integrations.listor is connected in the dashboard. - Confirm Customer contact list appears in
integrations.listor is connected in the dashboard. - Verify WhatsApp is connected on the Deploy screen (
agents.channels.listshows it enabled). - Verify Telephony (outbound) is connected on the Deploy screen (
agents.channels.listshows it enabled). - Set Escalation Email under Settings → Agent if humans must take over.
- Switch the agent to
livewithupdateLiveStatus/update_live_status. - Monitor the Conversations screen (or stream via SDK) after launch.
After go-live
Run the setup script once before the sale window. Use your own scheduler to trigger broadcast notifications via conversations.send.
Variations
- Schedule the notification batch within a specific time window by wrapping
conversations.send(create-or-send by channel) in a timed queue worker. - A/B test two promo scripts by creating two workflows with different
system_promptvalues, binding an agent to each, and splitting your contact list. - Connect your CRM on the Integrations screen to automatically tag customers who respond or convert.
Fitness & Wellness Class Booking
Let members browse class schedules, view trainer profiles, choose a membership tier or pay per session, and book — over WhatsApp and web chat.
Food Delivery Dispatch Agent
Accept orders over WhatsApp, coordinate with your POS and logistics provider, and send customers real-time delivery updates.