B Blengi docs

Build your agent

Book a call (Calendly)

Pitchbar can let a visitor book a call without leaving the page β€” both from your public pricing page and from inside the chat widget mid-conversation. It works with any Calendly scheduling link; no Calendly API key is needed for the booking itself.

What your visitors see

From the visitor's side there is no setup and nothing technical β€” the whole journey happens on your site:

  1. They open the chat and type something like "Can I book a call?" or "I'd like to schedule a demo."
  2. The bot replies with a short line and a Book a call button (in Dutch, "Plan een gesprek").
  3. They tap it and a calendar pops up inside the chat β€” no new page, no leaving the site.
  4. They pick a day and time, enter their name + email, and confirm.
  5. They see Calendly's "You're scheduled" confirmation and get the calendar invite by email, exactly like a normal Calendly booking.

On the pricing page it's the same idea: clicking a plan's Book a call button or Talk to us about Enterprise opens the calendar as a pop-up over the page. If a visitor only asks an ordinary question ("what are your prices?"), no booking button appears β€” it shows up only when they actually ask to book.

The visitor's "is it working?" check
Ask the chat to book a call β†’ a button appears β†’ tapping it shows a calendar inside the chat β†’ you can pick a time and get a confirmation email. The booking also lands back with you (a "Call booked" email), but the visitor never sees that side.

Testing checklist (admin)

After running php artisan migrate on the server, work through this once:

  1. Set the link. Agent β†’ Settings β†’ Book a call β†’ paste your Calendly URL β†’ Save. For the pricing page, set the "Book a call" plan's URL (Admin β†’ Plans) and the Enterprise link (Settings β†’ System β†’ Pricing content).
  2. In-chat booking. Open the agent Playground (or your live site), type "can I book a call?", confirm the button appears, tap it, and confirm the calendar opens inside the chat.
  3. Off switch. Clear the Scheduling link, save, ask again β€” confirm no button appears.
  4. Pricing page. Open /pricing logged out, click the plan / Enterprise links, confirm the in-page pop-up. A ⌘/Ctrl-click should still open a new tab (fallback).
  5. Capture (optional). Settings β†’ System β†’ Calendly bookings: copy the Webhook URL, create a matching webhook subscription in Calendly (invitee.created + invitee.canceled), paste the signing key, save. Book a test call and confirm the owner receives a "Call booked" email (needs mail configured).
  6. Dutch. Switch the language to Nederlands and confirm the button reads "Plan een gesprek" and the labels are translated.

In the chat widget

Set a Scheduling link on the agent's settings page (/app/agents/{id}/settings β†’ Book a call). Paste your Calendly URL and save. From then on, when a visitor types a scheduling request β€” "can I book a call?", "schedule a demo", "set up a meeting" β€” the agent replies with a short confirmation and a Book a call button. Tapping it opens the Calendly calendar as a popup inside the widget, where the visitor picks a date and time.

  • Reliable. Booking intent is matched by phrase, not left to the language model to "decide" to call a tool β€” small models are inconsistent at that, so this path is deterministic.
  • Off when blank. Leave the Scheduling link empty and the booking button never appears β€” the agent answers normally.
  • Lightweight. Calendly's script loads on demand from their CDN the first time someone taps the button, so the widget's size budget is unaffected.
  • Attributed. The booking link carries the conversation id as utm_content, so a completed booking can be traced back to the exact chat (see capture, below).

On the pricing page

A plan whose CTA type is Book a call (Calendly), and the Enterprise footer link when it points at a Calendly URL (see pricing content), both open the scheduler as an in-page popup instead of navigating away. Modified clicks (⌘/Ctrl/middle) still open the link in a new tab, and the plain link is preserved as a no-JS fallback.

Capturing the booking

With just the booking UI, completed meetings live only in your Calendly dashboard. Connect the webhook to pull them back into Pitchbar: every booking is stored, attributed to the exact chat it came from, and the workspace owners get an email β€” "Call booked β€” Tue 3pm with jane@…". Because Calendly's webhook payload is self-contained, this needs no API call back to Calendly; we just verify and store what it sends.

  1. As a super-admin, open Settings β†’ System β†’ Calendly bookings and copy the Webhook URL shown there (/integrations/calendly/webhook).
  2. In Calendly, create a webhook subscription (via their API or dashboard) for the invitee.created and invitee.canceled events, pointing at that URL.
  3. Calendly returns a signing key β€” paste it into the same settings panel and save. (The optional API token field is only needed if you register the subscription programmatically.)

From then on, the endpoint verifies each webhook's Calendly-Webhook-Signature (HMAC-SHA256, with a replay window) and stores the booking. A booking is matched to its conversation through the utm_content the widget passed in, so it lands against the right visitor. Re-delivered webhooks update the existing row and never double-notify; cancellations flip the booking to canceled.

The signing key is required
Until a signing key is saved, the endpoint acknowledges webhooks but processes nothing β€” Pitchbar never acts on a booking it can't verify.
Embed, not a custom picker
Pitchbar shows Calendly's own calendar (live availability) rather than rebuilding a date/time picker from the API. That keeps availability always in sync and is the approach Calendly supports β€” the API is for capturing the result, not for drawing the booking UI.