Skip to main content
This guide explains how to use a Workflow to streamline the process of linking SOC 2 documents to an entity.

Prerequisites

Before getting started:
  • You must have the Edit Workflows permission to create the Workflow, and the Execute Workflow runs permission to run it.

Step 1: Create the Workflow

You can create a Workflow in the Cortex UI or via the Cortex CLI.

Add the Workflow via CLI

You can use the Cortex CLI to add the example Workflow to your workspace. This allows you to quickly set up the example configuration then iterate on it for your own use case. Expand the tile below to learn more:
  1. Save the Workflow example YAML file below:
  1. Use the Cortex CLI to run this command, using the path to your Workflow YAML file: cortex workflows create -f <path-to-your-workflow.yaml>

Step 2: Run the Workflow

  • In the list of Workflows, locate the “Link SOC 2 Documents to Entity” Workflow and click Run.
When you run the Workflow, the following events happen:
  1. The Workflow pauses to collect a response from the user during the User Input block. The user selects an entity, then enters a link type and link URL.
  2. The next step runs, retrieving the entity descriptor.
  3. The JavaScript block runs, which does the following:
    1. It retrieves the entity descriptor from the previous block, and it retrieves the link type and URL from the initial block. It validates that the required inputs exist.
    2. It normalizes the link type. It parses the descriptor string into a JavaScript object.
    3. It creates a new link object with url, name, and type, and it only adds the new link if it doesn’t already exist.
    4. It converts the updated object back to YAML format, and returns { updatedDescriptor } for use in subsequent Workflow blocks.
  4. The “Create or update entity” block runs, updating the entity with the updatedDescriptor output of the previous block.
Last modified on September 28, 2026