Skip to main content

Use AI agents to perform activities

You can use AI agents to perform tasks. For example, you might configure an AI agent to suggest inputs for the fields on an activity form so that users only need to check the details before submitting. Equally, you might use an AI agent to perform tasks without any user input or supervision, such as generating reports, summarizing content, creating new cases, or closing or reopening existing cases.

To use an AI agent to perform activities, you need to:

  • Give the agent access to the case that has the activity. By default, agents only have access to their initial case, such as the particular support ticket or order case on which the agent activity was performed, or the page used to display the chatbot.
  • Grant the agent rights to perform the activity.
Tip:

When an agent is able to perform an activity (i.e. when it has activity rights and is in the context of the case), it has access to any data that is included in the activity form. For example, granting an AI agent rights on an Edit customer details form activity, gives the agent access to any attribute values that are mapped into the form fields when the activity starts. If you have granted the agent rights on a dataset, it may also use that information to perform the activity.

Give agents access to cases

By default, agents only have access to their initial case, such as the particular support ticket from which the agent activity was performed. To give AI agents access to additional cases:

  • Specify one or more global cases in the agent activity that initiates the agent conversation. An agent can perform activities (and access the data contained in those activity forms) from global cases without first switching to the context of those cases.
  • Enable context switching from the agent settings.
    • To same attribute allows the agent to switch to any cases that have the same value in the specified platform attribute. For example, you might have a Customer ID platform attribute that is used on both Support ticket and Invoice cases. An agent with access to a support ticket case would be able to switch to all other support ticket and invoice cases that are associated with the same customer.
    • To any case allows the agent to switch to any case for which it has the case ID. This includes:
      • Any cases identified in an attribute on the initial case or a global case.
      • Cases listed in datasets on which the agent has rights (and on which the user has rights if you have required user rights in the AI conversation widget settings).
      • Any case IDs that the user provides to the agent (for example, by copying the case ID from the URL of the case view).

Grant agents activity rights

Before you can grant rights to an agent, you must create one or more AI agent roles. The rights that you grant to the agent role determine whether the activity is mandatory or optional, and whether the agent can perform the activity autonomously or only with oversight by a user.

To grant an agent rights to perform an activity:

  1. From the activity page, select the Rights tab and click Edit rights.
  2. Select the Agent tab. The available rights are listed.
  3. Use the relevant picklist to select the agent role(s) to which you want to grant the rights:
    • Execute: The agent performs the mandatory task autonomously (i.e. without user input or oversight).
    • Request: The agent performs the optional activity autonomously.
    • Suggest execute: The agent provides values for the mandatory task but cannot submit the activity form.
    • Suggest request: The agent provides values for the optional activity but cannot submit the activity form.

If you grant an agent execute rights, you also need to trigger the task from another activity, as you would for tasks performed by users.

Tip:

Suggest rights are useful if you want to keep "a human in the loop". If you grant Suggest rights to an agent, you also need to grant Execute or Request rights to a user role so that a user can review the suggestions and submit the activity form.

Execute the activity

The rights that you grant the AI agent determine how and when the agent performs the activity, and whether you need to generate the task first.

When performing an activity or suggesting values for an activity, the AI agent is driven by the prompt and context specified in its configuration, together with the input (and any input files) provided in the agent activity that initiated the agent. The AI agent may also use information available from the activity form (via mappings) and any datasets to which you have granted it rights.

You can add triggers, mappings, and conditional logic to activities designed to be performed by agents, in the same way as for activities performed by users. For example, when a form activity to update the status of a support ticket is submitted, you could use an execute trigger to perform a Send email system service casetype activity that sends the status update to relevant parties.

Mandatory tasks

If you have granted the agent Execute or Suggest execute rights, the agent can only perform the activity once the mandatory task has been generated. To generate a mandatory task, add an Execute trigger to another activity, as you would for tasks performed by users. You can use an Execute trigger to generate a task when another activity is performed, at a particular point in time, or when certain conditions are met. For more information, see Chain activities together.

Once the mandatory task has been generated, the AI agent will try to perform the activity or suggest values for it using the information available to it. If the agent requires additional information, it may indicate this in the chat.

Optional activities

If you have granted the agent Request or Suggest request rights, there is no need to generate the task. The agent will try to perform the activity in accordance with its prompt and the input to the agent activity. Users can also ask an agent to perform an optional activity. For example, a user might ask an agent to update the details of a support ticket with the conclusion for their conversation.

View activities performed by agents

When an agent performs or suggests values for an activity, the details are recorded in the AI conversation case and displayed in the AI conversation widget. If the agent was granted Suggest rights, users with rights to perform the activity can open the activity form and either approve the suggestions or make changes before submitting the task.

Optional activities that have been suggested by an AI agent are included in the Optional tasks on current case including suggested dataset. You can use this default dataset (or another dataset that is based on it) to display suggested tasks in a grid, template, or tile widget. For more information about displaying data from a dataset, see Use datasets in your application.