Injecting dynamic variables and user context
Learn how to inject variables and other useful context in conversations
By default, the conversation has information about the current date and time in the receiver’s timezone.
Default variables
By default, the following variables and information are always available in the conversation context.
name | description |
---|---|
agent_id | This is the id of the agent |
execution_id | This is the unique id of the bolna conversation or the call |
call_sid | This is the unique id of the phone call belonging to telephony providers like Twilio , Plivo , Vonage , etc. |
You may use the above information to pass useful info into your systems or use them in the function calls or prompts.
Example using default variables
For example, adding the below content in the prompt using the above default variables will automatically fill in their values.
The above prompt content computes to and is fed as:
Custom variables
Apart from the default variables, you can write your own variables and pass it into the prompt.
Any content written between {}
in the prompt becomes a variable.
For example, adding the below content in the prompt will dynamically fill in the values.
Example using custom variables
You can now pass these values while placing the call:
The above prompt content computes to and is fed as (call_sid
being the default variable gets injected automatically by default):
Was this page helpful?