Twilio.Studio.V1.Flow.ExecutionService (twilio_elixir v0.1.1)

Copy Markdown View Source

Executions of Studio flows

Operations: list, create, fetch, update, delete

Summary

Functions

Triggers a new Execution for the Flow

Delete the Execution and all Steps relating to it.

Retrieve a list of all Executions for the Flow.

Stream: Retrieve a list of all Executions for the Flow. (lazy auto-pagination).

Update the status of an Execution to ended.

Functions

create(client, flow_sid, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Studio.V1.Flow.Execution.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Triggers a new Execution for the Flow

Operation: CreateExecution | Tags: StudioV1Execution

Required Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| From | string (phone-number) | The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable {{flow.channel.address}}. For SMS, this can also be a Messaging Service SID. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| To | string (phone-number) | The Contact phone number to start a Studio Flow Execution, available as variable {{contact.channel.address}}. |

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Parameters | string | JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in Parameters={"name":"Zeke"}, a widget in your Flow can reference the variable {{flow.data.name}}, which returns "Zeke". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. |

delete(client, flow_sid, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Delete the Execution and all Steps relating to it.

Operation: DeleteExecution | Tags: StudioV1Execution

fetch(client, flow_sid, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Studio.V1.Flow.Execution.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieve an Execution

Operation: FetchExecution | Tags: StudioV1Execution

list(client, flow_sid, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieve a list of all Executions for the Flow.

Operation: ListExecution | Tags: StudioV1Execution

Query Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| DateCreatedFrom | string (date-time) | Only show Execution resources starting on or after this ISO 8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| DateCreatedTo | string (date-time) | Only show Execution resources starting before this ISO 8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm. |

stream(client, flow_sid, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), String.t(), map(), keyword()) :: Enumerable.t()

Stream: Retrieve a list of all Executions for the Flow. (lazy auto-pagination).

update(client, flow_sid, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Studio.V1.Flow.Execution.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Update the status of an Execution to ended.

Operation: UpdateExecution | Tags: StudioV1Execution

Required Parameters

ParameterTypeDescription
StatusstringValues: active, ended