# `Twilio.Taskrouter.V1.Workspace.WorkflowService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/taskrouter/v1/workspace/workflow_service.ex#L2)

Service for Workflow API operations.

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.Workflow.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `CreateWorkflow` | Tags: TaskrouterV1Workflow

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Configuration` | string | A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `AssignmentCallbackUrl` | string (uri) | The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FallbackAssignmentCallbackUrl` | string (uri) | The URL that we should call when a call to the `assignment_callback_url` fails. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `TaskReservationTimeout` | integer | How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. |

# `delete`

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

Operation: `DeleteWorkflow` | Tags: TaskrouterV1Workflow

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.Workflow.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchWorkflow` | Tags: TaskrouterV1Workflow

# `list`

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

Operation: `ListWorkflow` | Tags: TaskrouterV1Workflow

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `FriendlyName` | string | The `friendly_name` of the Workflow resources to read. |

# `stream`

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

Stream:  (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.Workflow.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateWorkflow` | Tags: TaskrouterV1Workflow

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `AssignmentCallbackUrl` | string (uri) | The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Configuration` | string | A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FallbackAssignmentCallbackUrl` | string (uri) | The URL that we should call when a call to the `assignment_callback_url` fails. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `ReEvaluateTasks` | string | Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `TaskReservationTimeout` | integer | How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
