Skip to main content
PUT
/
v1
/
simulation
/
scenarios
/
{scenario_id}
Update Simulation Scenario
curl --request PUT \
  --url https://api.eqho.ai/v1/simulation/scenarios/{scenario_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "description": {
    "purpose": "Test that agent refuses cancellation with refund if criteria are not met"
  },
  "environment_setup": {
    "action_mocks": {
      "check_refund_eligibility": {
        "default_is_error": false,
        "default_return_value": "False"
      }
    },
    "dynamic_variables": {
      "days_until_flight": 2,
      "lead.custom_fields.ticket_type": "non-refundable"
    }
  },
  "evaluation_criteria": {
    "nl_assertions": [
      "Agent does not offer the refund because reservation doesn'\''t meet policy criteria."
    ]
  },
  "folder": "Flight cancellation",
  "lead_scenario": {
    "instructions": {
      "known_info": "You are Amelia Sanchez.\n\nYour user id is amelia_sanchez_4739.",
      "reason_for_call": "You want to cancel your flights from MCO to CLT.",
      "task_instructions": "You insist to cancel and have the refund."
    },
    "persona": "As a 41-year-old office administrator, you are pragmatic and to the point. You are polite but firm in your request for a refund."
  },
  "name": "Agent refuses cancellation with refund if criteria are not met"
}'
{
  "_id": "<string>",
  "account_id": "<string>",
  "name": "<string>",
  "folder": "<string>",
  "lead_scenario": {
    "persona": "<string>",
    "instructions": {
      "task_instructions": "You are acting as a lead in the following conversation, follow lead script precisely: {{transcript}}",
      "language": "en",
      "reason_for_call": "<string>",
      "known_info": "<string>",
      "unknown_info": "<string>"
    },
    "actions": {
      "terminate_call": {
        "name": "<string>",
        "slug": "<string>",
        "instructions": "<string>",
        "messages": {
          "start": "<string>",
          "completed": "<string>",
          "failed": "<string>",
          "delayed": "<string>"
        },
        "minimum_execution_time_milliseconds": 123,
        "delayed_timing_milliseconds": 123,
        "type": "call_transfer",
        "is_async": true,
        "settings": {},
        "execution_type": "live",
        "response_mode": "interactive",
        "execution_order": 123
      }
    }
  },
  "description": {
    "purpose": "<string>",
    "notes": "<string>"
  },
  "environment_setup": {
    "dynamic_variables": {},
    "conversation_direction": "inbound",
    "conversation_medium": "chatbot",
    "action_mocks": {},
    "message_history": [
      {
        "role": "system",
        "content": "<string>",
        "turn_idx": 123,
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "evaluation_criteria": {
    "actions": [
      {
        "tool_call_id": "<string>",
        "requestor": "assistant",
        "name": "<string>",
        "arguments": {},
        "info": "<string>",
        "compare_args": [
          "<string>"
        ]
      }
    ],
    "nl_assertions": [
      "<string>"
    ]
  },
  "history": {
    "revision": 0,
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "unknown",
    "last_modified_at": "2023-11-07T05:31:56Z",
    "last_modified_by": "unknown"
  }
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

scenario_id
string
required
Required string length: 24

Body

application/json
name
string
required

Name of the simulation scenario

Examples:

"Agent refuses cancellation with refund if criteria are not met"

lead_scenario
object
required

User scenario. This information will be sent to the user simulator.

folder
string | null

Folder to organize scenarios

Examples:

"Flight cancellation"

description
object | null

Description of the task. This can be sent to the evaluator. Description of a scenario. This can be sent to the evaluator.

Examples:
{
"purpose": "Test that agent refuses cancellation with refund if criteria are not met"
}
environment_setup
object | null

Initial state of the task. This will be used to set the initial state of the environment and of the orchestrator. Initial state of the SimulationScenario. This will be used to set the initial state of the environment and of the orchestrator.

evaluation_criteria
object | null

Evaluation criteria for the scenario. This will be sent to the evaluator. Evaluation criteria for a particular task. This will be sent to the evaluator.

Response

Successful Response

A simulation scenario template that defines how to simulate a conversation

_id
string
required
account_id
string
required

Account ID that owns this simulation scenario

name
string
required

Name of the simulation scenario

lead_scenario
object
required

User scenario. This information will be sent to the user simulator.

history
object
required
folder
string | null

Folder to organize scenarios

description
object | null

Description of the task. This can be sent to the evaluator. Description of a scenario. This can be sent to the evaluator.

environment_setup
object | null

Initial state of the task. This will be used to set the initial state of the environment and of the orchestrator. Initial state of the SimulationScenario. This will be used to set the initial state of the environment and of the orchestrator.

evaluation_criteria
object | null

Evaluation criteria for the scenario. This will be sent to the evaluator. Evaluation criteria for a particular task. This will be sent to the evaluator.