Activities

❗️

This is only applicable to the new Agent Studio > Plugin Workspace

What is an activity?

A type of process block that represents an "activity" in a business process. This is typically either taking action in a system or surfacing information.

Activities & Control Flow blocks work hand-in-hand to create conversation plugins that conform to your business processes.

Types of activities

Action Activities

Action Activities can call HTTP, Script, Built-in, or Compound Actions to fetch or update data in your business systems.

Configuration

  • Select an Action: Choose from a dropdown of available actions (HTTP, Script, Built-in, or Compound) configured in your Agent Studio instance.
    • Important: Compound Actions are asynchronous and should be used cautiously mid-process, as they return progress updates to the user instead of data to the plugin.
  • Required Slots: Specify which slots are needed to execute the action. You can select existing slots or create new ones. This informs the AI assistant when to prompt users for input.
  • Input Mapper: Use Moveworks Data Mappers to map slots or outputs from previous activities to the action’s inputs.
  • Output Mapper: Defines the output object of the activity. By default, it captures all data returned by the action. You can "dot walk" (e.g., response.field) to limit the output or use the advanced Moveworks Data Mappers editor for custom output structures.
    • Syntax: In the advanced editor, refer to the action’s payload as response. Note that unmapped response data is excluded from the output.
    • Last Activity: The mapper set up will be presented to the user if this is the last action activity of the process.
  • Confirmation Policy: See Below
  • Execution Behavior (Compound Actions Only):
    • Wait for Completion (Checked): The process pauses until the Compound Action finishes, allowing its output to be used downstream. Recommended for most cases.
    • Fire and Forget (Unchecked): The process continues without waiting for the Compound Action to complete, suitable for notifications where no response is expected.

Activity Confirmation Policies

When enabled, this policy ensures the AI assistant:

  1. Presents all collected slots for the activity.
  2. Requests user consent to proceed.
  3. Allows users to edit slot values before execution.

This guarantees users can review and confirm actions, regardless of their input.

Content Activities

Content Activities display articles, forms, or markdown text to users. They do not require inputs or produce data outputs.

Dynamically Referencing Data

Use Mustache syntax ({{key}}) to reference data from the data bank (e.g., slots or outputs from previous actions) in a Content Activity. No data. prefix is needed.

  • Accessing Array Elements: Use dot notation to reference specific indices (e.g., ticket_list.0 for the first element).
  • Limitations:
    • DSL syntax is not supported within Mustache syntax.

Example: Referencing Data

Your ticket {{ticket_number}} has been processed.

Example: Array Access

For the JSON structure::

{  
  "ticket_list": ["ticket1", "ticket2", "ticket3"]  
}

Use:

First ticket: {{ticket_list.0}}

Troubleshooting Common Issues

  • Compound Action Misuse: If a Compound Action is used mid-process, it may not return data. Move it to the end of the process or use a synchronous action type.
  • Output Mapper Errors: Verify the response path in the Output Mapper. If data is missing, check the action’s response structure or include all necessary fields.