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.
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 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)2. Create the agent
const agent = await bimpe.agents.create(
{
name: "Flash sale agent",
system_prompt:
"You notify customers about time-limited deals and handle inbound order requests. Keep responses short and create urgency around the sale window.",
agent_workflow_id: workflow.id,
},
{ idempotencyKey: "create-flash-sale-agent-v1" },
);
console.log(agent.id);agent = client.agents.create(
name="Flash sale agent",
system_prompt=(
"You notify customers about time-limited deals and handle inbound order requests. "
"Keep responses short and create urgency around the sale window."
),
agent_workflow_id=workflow.id,
idempotency_key="create-flash-sale-agent-v1",
)
print(agent.id)3. Add knowledge bases
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)
Voice and channel connections are dashboard-only
Outbound voice calls are initiated from a phone number provisioned in the Console. WhatsApp and voice channel connections cannot be created through the API. The SDK lists what is already connected.
- Open Console dashboard → Agents → select your agent.
- Go to Channels → connect your WhatsApp Business number.
- Go to Channels → provision or connect an outbound voice number.
- (Optional) Go to Integrations → connect your CRM to sync contact lists and tag notified customers.
5. Go live
Trigger notifications from the dashboard broadcast tool or your own scheduler. 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",
system_prompt:
"You notify customers about time-limited deals and handle inbound order requests.",
agent_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",
system_prompt="You notify customers about time-limited deals and handle inbound order requests.",
agent_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
Store your API key in BIMPEAI_API_KEY. Run the agent setup script once before the sale window opens. Use your own scheduler (cron, queue worker) to trigger broadcast notifications; the agent handles all inbound replies automatically once WhatsApp and voice are connected in the dashboard.
Variations
- Schedule the notification batch within a specific time window by wrapping
conversations.messages.sendin a timed queue worker. - A/B test two promo scripts by creating two agents with different
system_promptvalues and splitting your contact list. - Connect your CRM in the Integrations tab 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.