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

Add context data to an issue

Add context data to an issue.

You can add keys and values to an issue's context data to be used in playbooks or other automations.

To add context data to an issue, run the Set command in CLI, in a script, or in a playbook task. The Set command enables you to set a value under a specific key. For more information about the Set command, see Set.

Use the CLI

Run the !Set command in the issue War Room.

  1. Open an issue and select the War Room tab.

  2. Run the !Set command.

    Example 35. Example

    The following example adds the key and value hello:world to the issue context data.

    !set key="hello" value="world"
Use a script

In the JSON file, add Set to the demisto.executeCommand key.

The following example adds the key and value hello:world to the issue context data.

demisto.executeCommand("Set", {"key":"hello", "value":"world"})
Use a playbook

Use the Set script in a standard task.

Example: An issue's context data contains the following values:

{  
   "Account":
    {
      "firstName": "Bob",
      "lastName": "Jones",
    }
}

For an automation, you need to use the full name value. You can use the Set script to add an new fullName value to the JSON:

addcontextdata.png

Result:

{  
   "Account":
    {
      "firstName": "Bob",
      "fullName": "Bob Jones"
      "lastName": "Jones",
    }
}

Last updated

Was this helpful?