Skip to content

Manual

The Manual endpoint is used for sending a task to the Manual queue.

Details

Sending a Task to the Manual queue is done when something expected happens, such as a business rule is triggered, when a Mate is working on a Task. It is the result of an agreement between the business and the automation team, where it is clear that the Mate can not solve the Task and it is needed that an employee takes a look at the Task.

Manual takes a TaskAction objet as argument

    {
        "taskId" : 0,
        "reason" : "(optional) Reason for the move",
        "comment" : "(optional) Will create a comment together with the move",
        "overwriteSecondsSaved" : null,
        "overwriteEntries" : null
    }
  • TaskId: Required - Indicates which Task should be moved
  • Reason: Optional - While not mandatory, it is strongly recommend to give the Task a reason to inform the users why or in what context it was moved.
  • Comment: optional - Will let the Mate leave a Comment.
  • overwriteSecondsSaved: optional - Overwrites the Seconds Saved settings when logging KPI's for this task
  • overwriteEntries: optional - Overwrites the Entries settings when logging KPI's for this task

Use Comment to elaborate

We recommend using Comment together with the move, to elaborate on the reason and provide more information to the user as to what has happened and why the Mate did what it did. In case someone comes asking in the future, it is nice to have some data on what the Mate saw and did.

overwriteSecondsSaved and overwriteEntries is used to overwrite KPI's on the Task. It is the most common scenario that these are not included (undefined) or left as null. It typically only for advanced Mates where KPI's are followed more closely that these become relevant. If overwriteEntries is filled out, and overwriteSecondsSaved is left as null then Anymate will update the KPI's using the default settings for seconds saved pr. entry. If overwriteSecondsSaved is filled out, then that will be the value logged in the KPI's regardless of what overwriteEntries are (however amount of entries is always logged so it can still be relevant later when doing data analysis on the Mates performance). Click here to learn more about KPI's.

Example

The endpoint is found at https://{ClientId}.anymate.app/api/Manual/ The http-request must be submitted as a POST with JSON encoded data.

curl --request POST \
        --url https://{ClientId}.anymate.app/api/Manual/ \
        --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyQ0JGNDY3NEMyMUExRjBCMjhFNzlBNTk5MzAwQjdBIiwid.....' \
        --header 'Content-Type: application/json' \
        --data '{
        "taskId" : 1,
        "reason" : "(optional) Reason for the move",
        "comment" : "(optional) Will create a comment together with the move"
                }'

Using the Anymate .NET SDK, you simply call the Manual function in IAnymateService to send the Task to Manual.

using Anymate;

// code omitted

//Initialize AnymateService
var anymateService = new AnymateService(client_id, client_secret, username, password);

//Create the Task Action
var action = new AnymateTaskAction()
{
    TaskId = taskId,
    Reason = "A reason",
    Comment = "A comment to elaborate on the action"       
};

//Call the Manual endpoint
var actionResponse = anymateService.Manual(action);

Use the Action model to simplify your code

By using the AnymateTaskAction model, you can create the action once and then later in the code determine if the action should go to Solved, Manual, Error or Retry.

Using the Anymate Python SDK, simply invoke the manual function in anymate.client.

import anymate

# code omitted

# Initialize the client
client = anymate.client(client_id, api_secret, username, password)

# Invoke take_next, and get the task as a dict
task = client.take_next("myProcessKey")

# Read the TaskId of the new task
taskId = task['taskId']

# Business Logic omitted

# Move the Task
action_result = client.manual({'taskId': taskId,
                            'reason': 'A Reason',
                            'comment': "Comment describing what happened"})

manual takes a dictionary or object as input.

Using the Anymate UiPath SDK, simply invoke the Manual Task activity.

Manual Task alt >

AnymateClient and TaskId (as int64) are required input. Comment and Reason are optional, however we strongly recommend using them to take full advantage of Anymate.