Skip to content

Quick start: inbound agent

In about 15 minutes you build a working inbound agent: it greets the caller, asks what they need, looks up an order over HTTP, reads the status back and transfers to a person on request.

The finished example is the scenario Guide demo: order status in the demo account. The same flow, with design notes, is in Recipe: order status line.

The finished demo scenario after auto-layout

Before you start. You need a console user who may edit scenarios and agents (for example the account_admin role) and one free number. Test calls are real calls: dial only your own phone.

  1. Open Build → Scenarios and click + New scenario. The builder opens with four bricks already on the canvas: Start scenario, Outbound call, Inbound call and End scenario.
  2. Click the name button at the top left (it says New scenario). In the menu that opens, edit the name field at the top, type Guide demo: order status and confirm with the check mark.
  3. Click Save draft now and then as you work. The first save gives the scenario its own address.

A new scenario: Start, Outbound call, Inbound call and End

  1. Drag Text-to-speech from the palette on the left onto the canvas.
  2. Connect it: drag from the dot at the right of Inbound call → Success to the header of the new brick. A line appears.
  3. Click the brick. Click the pencil next to its title and rename it Greeting.
  4. Type the message, for example: Hello! You’ve reached the Demo Shop order line. I can check your order status or connect you to a colleague. Click ▶ to hear it, then Save.

The Greeting brick with its text-to-speech message

  1. Drag a Question brick onto the canvas, connect Greeting → Complete to it and rename it Choose topic.
  2. In Question message, type Would you like to check the status of an order, or speak to a colleague?
  3. Under Answers, keep Speech recognition and Intents. Rename the first answer Order status and type several ways people say it, pressing Enter after each: check my order, where is my parcel, order status, has my delivery been shipped.
  4. Click Add answer, name it Operator and add speak to a person, connect me to an operator, a colleague please, talk to someone.
  5. Click Open test cases, type an answer a caller might give in Assumed answer, and click Run tests. The result shows which output the answer would take and the intent scores. If a test misses, add more phrases and run it again.

Testing which answer a phrase matches

Each answer becomes an output on the brick, next to three fallbacks: Invalid (no answer matched), Empty (silence) and Incomplete (for example, the caller hung up).

  1. Drag an HTTP request brick, connect Choose topic → Order status to it and rename it Get order status.
  2. Set Target URL to your order API. The demo uses a public echo service: https://httpbin.org/anything?status=shipped. Set Method to GET.
  3. Under Response data mapping, choose Set new variable and type {{order_status}}. Choose Body, set Path definition to $.args.status and Value if the path is not found to unknown.
  4. Click Open test cases → Run tests. You see the request as curl, the HTTP status, the response and the parsed variables, here {"order_status": "shipped"}. Click Save.

HTTP request test: 200 OK and the parsed variable

  1. Add a Text-to-speech brick after Get order status → Success and rename it Tell order status.
  2. Type Your order status is {{order_status}}. Thank you for calling, goodbye! The variable is highlighted when the name is valid.

A variable inside a text-to-speech message

  1. Add a Call transfer brick and rename it Transfer to operator. Connect both Choose topic → Operator and Get order status → Error to it, so callers also reach a person when the lookup fails.
  2. Set Transfer destination to your operators’ number or SIP address. The demo uses the fictional +12025550100.
  3. Turn on Audio for the client and type Please hold while I connect you to an operator. Click Save.

Call transfer settings

  1. Add a Text-to-speech brick named Reprompt with Sorry, I didn’t catch that. You can say order status, or ask for an operator. Connect Choose topic → Invalid and Empty to it, and its Complete output back to Choose topic. The caller now gets a second chance.
  2. After Tell order status → Complete, add a Goal brick tagged Qualified, then a Business Metric brick with key order_status and value {{order_status}}. Both show up in call results.
  3. Every output must lead somewhere. With Smart connections on (the default), drag an unused output and drop it on an empty part of the canvas: it connects to End scenario and shows a small End tag.
  1. Click Save draft, then Publish. Publishing checks the scenario first: a message such as you have 11 errors in your scenario means some outputs are still unconnected or some bricks are not configured. Bricks with problems carry a red Error badge.
  2. When the check passes you see Scenario published. The scenario is now version v1 and can run on an agent.
  3. To try it yourself, click Test call. It places a real call through the platform, so call only your own phone.
  1. On Scenarios, open the ⋯ menu of the scenario and choose Create agent (or use Agents → New agent).
  2. Pick a free Number, set the Lines (simultaneous calls) and check the name and calling hours, then click the green button at the bottom to create the agent.
  3. Inbound calls to that number now run the scenario.

Creating an agent from the scenario

An agent needs a number that no other agent uses. If the number list shows no free number, ask your workspace administrator for one: see Troubleshooting.

To call people instead of waiting for them, continue with Quick start: outbound calls.