Create a test scenario from a call transcript
API Key Authentication. It should be included in the header of each request.
JSON representation of the conversation transcript
ID of the personality to use in the simulation
ID of the agent to use in the simulation
Assistant ID to use in the simulation
Name for the simulated scenario
Prompt describing the expected outcome of the scenario
Name of the scenario
80Scenario Instructions - format depends on scenario_type:
For scenario_type="instruction":
Plain text instructions describing the scenario behavior.
Example: "You are a customer calling to inquire about your order status. Be polite and provide order number 12345 when asked."
For scenario_type="conditional_actions": JSON-formatted string (stringified) with role and conditions:
{
"role": "A friendly customer calling about an appointment",
"conditions": [
{
"id": 0,
"condition": "FIRST_MESSAGE",
"action": "Hi there, I need to check on my appointment <break time=\"1.5s\" /> [laughter]",
"type": "standard",
"fixed_message": true
},
{
"id": 1,
"condition": "contains \"appointment\" OR contains \"schedule\" OR contains \"help\"",
"action": "Yes, I have an appointment scheduled for tomorrow [laughter] [laughter]",
"type": "standard",
"fixed_message": true
},
{
"id": 2,
"condition": "contains \"confirm\" OR contains \"thank\" OR contains \"anything else\"",
"action": "No that's all, thank you so much <break time=\"1.0s\" /> [laughter]",
"type": "standard",
"fixed_message": true
},
{
"id": 3,
"condition": 2,
"action": "<endcall />",
"type": "action_followup",
"fixed_message": true
}
]
}
Structure:
role: Personality/role descriptionconditions: Array with id (0,1,2...), condition (FIRST_MESSAGE | contains operators with OR/AND | condition id reference), action (text with SSML <break time="1.5s" /> and markers [laughter] or <endcall />), type (standard | action_followup), fixed_message (boolean)Foreign key reference to the AI agent that owns this scenario
Unique identifier for the AI agent
Example: 123
Foreign key reference to the personality used in this scenario
Name of the personality used in this scenario
Example: "Normal Male"
Name of the agent associated with this scenario
Example: "Customer Support Agent"
Expected outcome prompt for the scenario
Example: "The user should be able to complete the order"
Language code for the scenario (ISO language code)
af - Afrikaansar - Arabicbn - Bengalibg - Bulgarianzh - Chinese Simplifiedcs - Czechda - Danishnl - Dutchen - Englishet - Estonianfi - Finnishfr - Frenchde - Germanel - Greekgu - Gujaratihi - Hindihe - Hebrewhu - Hungarianid - Indonesianit - Italianja - Japanesekn - Kannadako - Koreanms - Malayml - Malayalammr - Marathimulti - Multilingualno - Norwegianpl - Polishpa - Punjabipt - Portuguesero - Romanianru - Russiansk - Slovakes - Spanishsv - Swedishth - Thaitr - Turkishta - Tamilte - Teluguuk - Ukrainianvi - Vietnameseaf, ar, bn, bg, zh, cs, da, nl, en, et, fi, fr, de, el, gu, hi, he, hu, id, it, ja, kn, ko, ms, ml, mr, multi, no, pl, pa, pt, ro, ru, sk, es, sv, th, tr, ta, te, uk, vi, null Type of scenario:
instruction: Standard instruction-based scenario where instructions field contains plain textconditional_actions: Conditional action-based scenario where instructions field contains JSONreal_world_smart: Real world smart scenarioreal_world_fixed: Real world fixed scenarioinstruction - Instructionreal_world_smart - Real World Smartreal_world_fixed - Real World Fixedconditional_actions - Conditional Actionsinstruction, real_world_smart, real_world_fixed, conditional_actions List of tags associated with this scenario for categorization
Example: ["tag1", "tag2", "tag3"]
(Deprecated) Foreign key reference to the phone number. Use phone_number field instead. This field is maintained for backward compatibility and will be automatically synced with phone_number.
Details of the phone number used for inbound calls
List of metrics associated with this scenario for evaluation
List of metric names associated with this scenario
Example: ["Metric 1", "Metric 2", "Metric 3"]
The initial message that the AI agent will send when the scenario starts
1000List of tool IDs that are available for use in this scenario
Example: ["TOOL_DTML", "TOOL_END_CALL"]
Test profile ID
Example: 123
Details of the test profile associated with this scenario Example:
{
"id": "<integer>",
"agent": "<integer>",
"name": "<string>",
"information": {
"user_name": "John Doe",
"user_email": "john.doe@example.com",
}
}
Generated values for the agent's dynamic variables for this scenario. Keys are variable names; values are the generated values.
Timestamp when the scenario was created
Timestamp when the scenario was last updated
ID of the user who created this scenario
ID of the user who last updated this scenario
Path of the folder this scenario belongs to