B Blengi docs

API reference

CTA buttons: types & triggers

A CTA is a button the assistant can show under an answer — book a demo, request a quote, open a product page. Each rule has two halves that are deliberately separate: what the button is (its type and target) and when it appears (its trigger). Rules live on Agent → More settings → CTAs.

Types

The type says what the button is for and what a click does. Since card #569:

TypeMeaningClick, when a URL is setClick, without a URL
Book a demoSales demoOpens the URLOpens the in-chat lead form
Request a quotePrice / offer requestOpens the URLOpens the in-chat lead form
Book an appointmentCalendar bookingOpens the URLOpens the in-chat lead form
Contact usGeneral contactOpens the URLOpens the in-chat lead form
Request a callback"Call me back"Opens the URLOpens the in-chat lead form
View a productProduct pageOpens the URLNothing (set a URL)
Buy / orderCheckout or order pageOpens the URLNothing (set a URL)
More informationAny explanatory pageOpens the URLNothing (set a URL)
DownloadBrochure, PDF, price listOpens the URLNothing (set a URL)
CustomAnything else; the label is what you writeOpens the URLNothing (set a URL)

The older values buy, signup, book and link keep working for rules created before this; they behave like Buy / order, Book a demo, Book an appointment and Custom respectively.

Triggers

A rule with no trigger shows after every answer — which is exactly what customers complained about ("the same buttons every time"), so most rules want one. Four kinds, all optional and combinable:

  • Show when… (plain words) — "the visitor shows buying intent or asks about price". After each answer, IntentJudge reads the visitor's message, the answer and every rule's condition, and returns the ones that apply. It selects from what you wrote; it never invents a button. One bounded call per turn (3 seconds, optional), after the answer has streamed, shared with manual quick replies — so it never touches first-token latency. If the model is slow or unsure, the button simply does not show on that turn.
  • Only on pages whose address contains — a hard filter on the visitor's page URL, applied first.
  • Only when the answer contains one of these words — a hard keyword match on the assistant's reply, applied first. Cheaper and stricter than the plain-language rule; use it when you want certainty rather than judgement.
  • Language — only for visitors in that language.

A plain-language rule still has to pass its hard filters first, so "quote → /quote → only when buying intent, only on product pages" is one rule, not three.

Changing a rule

Every rule in the list has an Edit button: it loads the rule back into the form — type, label, URL, trigger, filters — and Save changes writes it back. Adding a trigger to a button that already exists no longer means deleting and retyping it.

Signed context

Any type can forward the conversation context to its URL as a signed payload — see Signed CTA context.