Applies to: Agents built with the flow-based conversation builder
How do I make my AI agent save a caller's name, email and other answers to the contact?
There are two ways to build an agent: the instructions way (a system prompt) and the flow-based way (a workflow with steps). In the flow-based way, use the Ask and Save step. It asks your questions and saves each answer to the contact.
- Open the agent's conversation flow and add or open an Ask and Save step.
- Add each question you want asked, for example name, email and phone.
- For each question, choose the contact field the answer is saved to. First name, last name and company match to the contact fields automatically.
- For a question with no built-in field, choose create custom field, give it a label (for example Preferred contact method), click create field, and save the answer to it.
- Click Apply.
- Connect the steps by dragging from the green dot on one node to the next, and use the Auto arrange button to tidy the flow.
A question whose answer is not mapped to a contact field is not saved to the contact.
Once Ask and Save saves the answers, you do not need a separate Update Contact step, since it would duplicate the work. To remove a step, hover over it and click delete.
To check whether the caller is already a contact, use the Contact Lookup step, which looks the contact up by phone number and creates a new one if none exists. Make sure the workflow trigger is turned on, because a disabled trigger means the workflow does not run.
A Book appointment step needs a calendar or bookable selected. If you have none, create one under Calendars, in Bookables.