0

I subscribed to the Event Streams com.twilio.studio.flow.execution.ended I get events successfully. Example event:

'specversion' => '1.0',
'type' => 'com.twilio.studio.flow.execution.ended',
'source' => '/v2/Flows/FWxxx/Executions/FNxxx',
'id' => 'FNxxx',
'dataschema' => 'https://events-schemas.twilio.com/Studio.FlowExecutionEvent/1',
'datacontenttype' => 'application/json',
'time' => '2023-05-17T12:41:27.944Z',
'data' => [
    'date_created' => '2023-05-17T12:41:27.944Z',
    'execution_sid' => 'FNxxx',
    'ended_reason' => 'FLOW_END',
    'started_by' => 'CAxxx',
    'date_updated' => '2023-05-17T12:41:27.944Z',
    'status' => 'ended',
    'flow_revision' => 122,
    'contact_channel_address' => '+xxx',
    'account_sid' => 'ACxxx',
    'flow_sid' => 'FWxxx',
],

My question is about the reason why the flow ends.

  1. If the user hangs up while the flow is running
  2. If the user went through the entire flow to the end
  3. If an error occurred during the execution of the thread and the thread was interrupted.

I always get the same value: data.ended_reason = FLOW_END How can I find out why a flow terminated?

I expect the value of end_reason to be different. And it should describe the reason. For example: FLOW_ERROR, HANG UP

Serj
  • 11
  • 1

0 Answers0