Via Webhooks
The simplest way to run a conversation with Phonic is via webhooks. If you followed the quick start guide, you’ve already had your first webhook conversation!
In this guide we’ll showcase two more important features of webhook conversations. The example code for this guide is available here.
Agent configuration endpoint
Typically, when you create an agent with Phonic you specify default values for its behavior, such as its welcome message and system prompt. With the agent configuration endpoint, you have the option at the start of every conversation to update your agent with conversation-specific information.
This is primarily useful for inbound calls; for example, your endpoint can look up the inbound caller in your CRM and populate your welcome message with the caller information.
Implementing your configuration endpoint is easy:
Post-call analysis endpoint
Upon the completion of each conversation, you can report conversation information, such as the full transcript, system prompt, and start/end timestamps. Implementing this is also easy: