Twilio.Taskrouter.V1.WorkspaceService (twilio_elixir v0.1.1)

Copy Markdown View Source

Service for Workspace API operations.

Operations: list, create, fetch, update, delete

Summary

Functions

Operation: CreateWorkspace | Tags: TaskrouterV1Workspace

Operation: DeleteWorkspace | Tags: TaskrouterV1Workspace

Operation: FetchWorkspace | Tags: TaskrouterV1Workspace

Operation: ListWorkspace | Tags: TaskrouterV1Workspace

Stream: (lazy auto-pagination).

Operation: UpdateWorkspace | Tags: TaskrouterV1Workspace

Functions

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

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

Operation: CreateWorkspace | Tags: TaskrouterV1Workspace

Required Parameters

ParameterTypeDescription

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

| FriendlyName | string | A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: Customer Support or 2014 Election Campaign. |

Optional Parameters

ParameterTypeDescription

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

| EventCallbackUrl | string (uri) | The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See Workspace Events for more information. This parameter supports Twilio's Webhooks (HTTP callbacks) Connection Overrides. |

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

| EventsFilter | string | The list of Workspace events for which to call event_callback_url. For example, if EventsFilter=task.created, task.canceled, worker.activity.update, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. |

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

MultiTaskEnabledbooleanWhether to enable multi-tasking. Can be: true to enable multi-tasking, or false to disable it. However, all workspaces should be created as multi-tasking. The default is true. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (true), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at Multitasking.
PrioritizeQueueOrderstringValues: FIFO, LIFO

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

| Template | string | An available template name. Can be: NONE or FIFO and the default is NONE. Pre-configures the Workspace with the Workflow and Activities specified in the template. NONE will create a Workspace with only a set of default activities. FIFO will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. |

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

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

Operation: DeleteWorkspace | Tags: TaskrouterV1Workspace

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

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

Operation: FetchWorkspace | Tags: TaskrouterV1Workspace

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

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

Operation: ListWorkspace | Tags: TaskrouterV1Workspace

Query Parameters

ParameterTypeDescription

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

| FriendlyName | string | The friendly_name of the Workspace resources to read. For example Customer Support or 2014 Election Campaign. |

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

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

Stream: (lazy auto-pagination).

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

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

Operation: UpdateWorkspace | Tags: TaskrouterV1Workspace

Optional Parameters

ParameterTypeDescription

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

| DefaultActivitySid | string | The SID of the Activity that will be used when new Workers are created in the Workspace. |

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

| EventCallbackUrl | string (uri) | The URL we should call when an event occurs. See Workspace Events for more information. This parameter supports Twilio's Webhooks (HTTP callbacks) Connection Overrides. |

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

| EventsFilter | string | The list of Workspace events for which to call event_callback_url. For example if EventsFilter=task.created,task.canceled,worker.activity.update, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. |

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

| FriendlyName | string | A descriptive string that you create to describe the Workspace resource. For example: Sales Call Center or Customer Support Team. |

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

MultiTaskEnabledbooleanWhether to enable multi-tasking. Can be: true to enable multi-tasking, or false to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at Multitasking.
PrioritizeQueueOrderstringValues: FIFO, LIFO

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

| TimeoutActivitySid | string | The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. |