Use casesRecipes

Catering & Event Orders Agent

Handle corporate and party catering inquiries — headcount-based pricing, dietary requirements, deposit collection via Stripe, and booking confirmation.

DifficultyIntermediate
TrackBuilder Track or Developer Track
ChannelsWeb ChatVoice (Inbound)
IntegrationsGoogle CalendarStripe (deposits)Menu / pricing (knowledge base)

What you'll build

An agent that fields catering inquiries over web chat or inbound voice, calculates per-head pricing from headcount, gathers dietary requirements, checks availability via Google Calendar, and collects a deposit through Stripe — all before handing a confirmed booking to your team.

Prerequisites

  • BimpeAI account with an API key (sk_…)
  • Read Anatomy of a workflow agent first — this recipe skips steps covered there
  • Google Calendar, Stripe, and web chat channel connected in the Console dashboard (see Step 4)
  • Inbound voice phone number connected in the Console dashboard (see Step 4)

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: "catering" });
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="catering")
workflow = page.data[0]
print(workflow.id, workflow.name)

2. Create the agent

const agent = await bimpe.agents.create(
  {
    name: "Catering agent",
    system_prompt:
      "You handle catering and event order inquiries. Collect the event date, headcount, " +
      "dietary requirements, and preferred menu tier. Quote the per-head price from the " +
      "pricing knowledge base. Confirm availability via the calendar integration before " +
      "directing the customer to pay the deposit.",
    agent_workflow_id: workflow.id,
  },
  { idempotencyKey: "create-catering-agent-v1" },
);

console.log(agent.id);
agent = client.agents.create(
    name="Catering agent",
    system_prompt=(
        "You handle catering and event order inquiries. Collect the event date, headcount, "
        "dietary requirements, and preferred menu tier. Quote the per-head price from the "
        "pricing knowledge base. Confirm availability via the calendar integration before "
        "directing the customer to pay the deposit."
    ),
    agent_workflow_id=workflow.id,
    idempotency_key="create-catering-agent-v1",
)

print(agent.id)

3. Add knowledge bases

Three knowledge bases cover pricing, dietary options, and booking policy. The agent pulls from all three when building a quote.

// Per-head pricing tiers
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Catering pricing",
  content:
    "Essential tier (10–30 guests): £18 per head — 2 mains, 1 dessert, soft drinks\n" +
    "Classic tier (10–80 guests): £26 per head — 3 mains, 2 desserts, tea/coffee\n" +
    "Premium tier (10–200 guests): £38 per head — 4 mains, 3 desserts, welcome drink\n" +
    "Minimum booking: 10 guests. Groups over 80 require 14 days notice.",
});

// Dietary options
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Dietary options",
  content:
    "All tiers include vegan and vegetarian options at no extra charge.\n" +
    "Gluten-free alternatives available for all mains (+£2 per head).\n" +
    "Nut-free kitchen available on request — declare at booking.",
});

// Booking policy
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Booking policy",
  content:
    "A 25% deposit is required to confirm the booking.\n" +
    "Deposits are non-refundable within 7 days of the event.\n" +
    "Final headcount must be confirmed 48 hours before the event.\n" +
    "Payment in full is due 24 hours before the event.",
});
# Per-head pricing tiers
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Catering pricing",
    "content": (
        "Essential tier (10–30 guests): £18 per head — 2 mains, 1 dessert, soft drinks\n"
        "Classic tier (10–80 guests): £26 per head — 3 mains, 2 desserts, tea/coffee\n"
        "Premium tier (10–200 guests): £38 per head — 4 mains, 3 desserts, welcome drink\n"
        "Minimum booking: 10 guests. Groups over 80 require 14 days notice."
    ),
})

# Dietary options
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Dietary options",
    "content": (
        "All tiers include vegan and vegetarian options at no extra charge.\n"
        "Gluten-free alternatives available for all mains (+£2 per head).\n"
        "Nut-free kitchen available on request — declare at booking."
    ),
})

# Booking policy
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Booking policy",
    "content": (
        "A 25% deposit is required to confirm the booking.\n"
        "Deposits are non-refundable within 7 days of the event.\n"
        "Final headcount must be confirmed 48 hours before the event.\n"
        "Payment in full is due 24 hours before the event."
    ),
})

4. Connect channels and integrations (dashboard)

Channels, voice, and integrations are configured in the dashboard

The API cannot create channel connections or integrations. Inbound voice, web chat, Google Calendar, and Stripe are all connected in the Console dashboard. There is no voice value in the SDK channel filter — voice conversations are handled through the voice phone number you configure in the dashboard.

  1. Open Console dashboardAgents → select your agent.
  2. Under Channels, enable the web chat widget and paste the embed snippet into your catering website.
  3. Under Channels, connect an inbound voice phone number. The dashboard handles carrier connection and call routing.
  4. Under Integrations, connect Google Calendar for real-time availability checks.
  5. Under Integrations, connect Stripe to collect deposits at the end of the booking flow.

5. Verify and go live

const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));
integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])

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: "catering" });
const workflow = page.data[0];

// 2. Create agent
const agent = await bimpe.agents.create(
  {
    name: "Catering agent",
    system_prompt:
      "You handle catering inquiries. Collect event date, headcount, dietary requirements, " +
      "and preferred menu tier. Quote the per-head price, confirm availability, and direct " +
      "the customer to pay the 25% deposit.",
    agent_workflow_id: workflow.id,
  },
  { idempotencyKey: "create-catering-agent-v1" },
);

// 3. Add knowledge bases
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Catering pricing",
  content:
    "Essential tier: £18 per head (10–30 guests)\n" +
    "Classic tier: £26 per head (10–80 guests)\n" +
    "Premium tier: £38 per head (10–200 guests)",
});

await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Dietary options",
  content:
    "Vegan and vegetarian included. Gluten-free +£2 per head. Nut-free on request.",
});

await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Booking policy",
  content: "25% deposit required to confirm. Non-refundable within 7 days of event.",
});

// 4. Verify integrations and channels (configured via dashboard)
const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Agent ID:", agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));

// 5. Stream incoming web chat inquiries
const controller = new AbortController();

for await (const event of bimpe.conversations.messages.stream(
  agent.id,
  "<conversation_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="catering")
workflow = page.data[0]

# 2. Create agent
agent = client.agents.create(
    name="Catering agent",
    system_prompt=(
        "You handle catering inquiries. Collect event date, headcount, dietary requirements, "
        "and preferred menu tier. Quote the per-head price, confirm availability, and direct "
        "the customer to pay the 25% deposit."
    ),
    agent_workflow_id=workflow.id,
    idempotency_key="create-catering-agent-v1",
)

# 3. Add knowledge bases
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Catering pricing",
    "content": (
        "Essential tier: £18 per head (10–30 guests)\n"
        "Classic tier: £26 per head (10–80 guests)\n"
        "Premium tier: £38 per head (10–200 guests)"
    ),
})

client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Dietary options",
    "content": "Vegan and vegetarian included. Gluten-free +£2 per head. Nut-free on request.",
})

client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Booking policy",
    "content": "25% deposit required to confirm. Non-refundable within 7 days of event.",
})

# 4. Verify integrations and channels (configured via dashboard)
integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Agent ID:", agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])

# 5. Stream incoming web chat inquiries
for event in client.conversations.messages.stream(agent.id, "<conversation_id>"):
    print(event.role, event.message)

Deploy

Store your API key in BIMPEAI_API_KEY. Confirm that Google Calendar and Stripe appear in integrations.list before going live — an unconnected Stripe integration means deposit collection will fail. Update the pricing knowledge base at the start of each season using knowledgeBases.update.

Variations

  • Send a booking confirmation message server-side using conversations.messages.send once the deposit clears.
  • Restrict the agent to corporate bookings of 20 or more guests by adding that constraint to system_prompt.
  • Add a seasonal menu knowledge base entry and swap it in quarterly without touching the agent configuration.

On this page