For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex AgentiX

Use context data in a playbook

Use context data to pass information between playbook tasks in Cortex AgentiX.

In Cortex AgentiX you can use context data (from an issue or case) in playbooks, and you can use playbook tasks to update context data. You can:

  • Use the information stored in the issue context data as task inputs and outputs in a playbook.

    • To access data that is stored in the issue context data, use the keyword issue.

      Example 43.

      To access a the status value in the issue context data, use the following syntax:

      ${issue.status}
    • To access data that is stored in the parent case context data, use the keyword parentIncidentContext.

      Example 44.

      To access the hostname value in the case context data, use the following syntax:

      ${parentIncidentContext.hostname}
  • Set a breakpoint in a playbook that reviews context data after a specific task.

    This is available when using the debugger. As context data may be updated during a playbook run, setting a breakpoint enables you to pause the playbook execution, review the context data, and take action if necessary. Breakpoints can be useful when designing and troubleshooting playbooks. For more information, see Test your playbook.

  • Add a task that writes playbook data to the case context.

    When you add data to the case context, you can use this data to run playbooks on any of the issues that are included in the case.

    To write playbook data to the case context, use the setParentIncidentContext script in a standard task. For more information, see Add context data to a case.

    Caution

For more information about playbooks, see Playbooks overview.

Context data in sub-playbooks

By default, the context data for sub-playbooks is stored in a separate context key. Consider the following information:

  • When a task in a main playbook accesses context data, it does not have direct access to sub-playbook data.

  • When a task in a sub-playbook accesses context data, it does not have direct access to the main playbook data.

  • If the sub-playbook has been configured to share globally, the sub-playbook context data is available to the main playbook and vice versa.

Last updated

Was this helpful?