Splunk® SOAR (On-premises)

Administer Splunk SOAR (On-premises)

The classic playbook editor will be deprecated in early 2025. Convert your classic playbooks to modern mode.
After the future removal of the classic playbook editor, your existing classic playbooks will continue to run, However, you will no longer be able to visualize or modify existing classic playbooks.
For details, see:

Create custom fields to filter events

Create custom fields that can be added to containers in . You can use custom fields to match your business processes, or to help filter containers, events, or cases for extra attention. For example, you might add a custom field named Department and assign it a list of values for each department in your organization (for example, IT Ops, Sales, and Business).

Custom fields are searchable. For more information on using the search feature, see Search within in Use .

Using custom fields in playbooks requires special coding, as described in Update and read custom field values later in this article. Custom field names described here require additional special handling, so plan your naming convention carefully:

  • names containing characters other than letters, numbers, or underscores (_)
  • names starting with a space

When choosing a name for a new custom function, do not use the same name as a field that already exists in Splunk SOAR, like name or severity.

Create a custom field

To create a custom field, follow these steps:

  1. From the Home menu select, Administration.
  2. Select Event Settings, then Custom Fields.
  3. Select Add Field.
  4. Enter a field name.
  5. Select a field type. If you choose select, provide additional values in the Values field. These values are presented to the user in a drop-down list when working in a container.
  6. (Optional) Select Require on Resolve to make the field required before a container can be closed or resolved.
  7. (Optional) Select Add Field to add additional fields.
  8. Select Save Changes.

Edit custom fields

To edit a custom field, follow these steps:

  1. From the Home menu, select Administration.
  2. Select Event Settings, then Custom Fields.
  3. Find the item you want to edit and make your changes. In the Values field for select types, you can enter an additional value or select the X icon to remove existing values.
  4. Optionally select Require on Resolve, if appropriate.
  5. Select Save Changes.

Delete a custom field

You can remove a custom field entirely. To remove a custom field, follow these steps:

  1. From the Home menu, select Administration.
  2. Select Event Settings, then Custom Fields.
  3. Locate the field you want to remove.
  4. Select the circled x ( ⓧ ) icon at the end of the field's entry.
  5. Select Save Changes.

Update and read custom field values

To update custom field values in containers, use the following code examples with the container.update API :

Update a custom field value

Example code to update a custom field value from a container.

    outputs = {}
    
    # Write your custom code here...
    container = {"id": container_id}
    update = {
        "custom_fields": {
            field_name: field_value,
        },
    }

    # Make the HTTP request
    success, message = phantom.update(container, update)
    
    assert success, message
    
    # Return a JSON-serializable object
    assert json.dumps(outputs)  # Will raise an exception if the :outputs: object is not JSON-serializable
    return outputs


Read a custom field value

While not technically an update function, reading a custom field value also uses the container.update API.

Example code to read (get) a custom field value from a container.

   outputs = {}
    
    # Write your custom code here...
    container = phantom.get_container(container_id)
    custom_fields = container.get("custom_fields", {})
    outputs["field_found"] = field_name in custom_fields
    outputs["field_value"] = custom_fields.get(field_name)
    
    # Return a JSON-serializable object
    assert json.dumps(outputs)  # Will raise an exception if the :outputs: object is not JSON-serializable
    return outputs
Last modified on 17 June, 2024
Create custom severity names and control severity inheritance   Filter indicator records in

This documentation applies to the following versions of Splunk® SOAR (On-premises): 5.3.3, 5.3.4, 5.3.5, 5.3.6, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.1.1, 6.2.0, 6.2.1, 6.2.2, 6.3.0, 6.3.1


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters