Assignment

Last Updated : Jun 12, 2024 |

You can use the Assignment task to update existing cache variables, create new ones, and update the other properties of the next tasks in the workflow.

All Assignment tasks have the default output that Orchestration Manager uses in all cases. If the expression is invalid, the new variable value is ignored, and the variable value for the Assignment task does not change. For example, if you set cache.myVar = 5, and use the expression 100/(cache.myVar-5), the new value cannot be calculated. In this case, the new value is ignored and cache.myVar remains as 5.

You can view the variables used and the new assigned values of the variables in the Assignment task for an instance from the Instances tab in Orchestration Manager. You can also view the current state of all the available variables.

This task is available to only Administrator users.

To assign new values to variables and change the task properties, fill in the following fields:

Field

Description

Destination

The destination point where you save data. You can save data in subsequent tasks as properties or in the cache as cache variables.

To specify the required destination, click the Destination field and select the variable:

  • Cache Variables

  • Task Properties

To create a new cache variable, type a new variable name in Type Custom variable and click the Add Variable icon.

Value

The value that you pass to the destination point. As a value, you can use any data available to the workflow:

  • Cache Variables

  • Global Variables

  • Result Variables

You can also use methods or math operations as the value expression.

For example, the Connect Agent task uses the serviceAttributes cache object for agent matching. You can use the Assignment task to update the serviceAttributes cache object with new queues and attributes and use the updated parameters for matching. The serviceAttributes cache object becomes available in the Cache Variables destination list when you connect the Assignment task with the Connect Agent task. A direct connection between the Assignment task and the Connect Agent task is not mandatory, and you can place other tasks between them.

The destination value serviceAttributes.queues is used to update the queue list. An example of the serviceAttributes.queues is as in the following:
  • [{"queueId": "d6e57655-8835-4a6c-9483-fa1236f568fe","queueName": "Finance","channelId": "Voice","priority": 10}]

The destination value serviceAttributes.attributeList is used to update the attribute list. An example of the serviceAttributes.attributeList is as in the following:

  • ["Language.German"]