---
schema_version: "1"
id: 7558f2482cab393921d9817d1844dda47d67c92a4968ab01b6595d05b30411be
title: Call Standard Context Service Invocable Actions from Flows
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/call_context_service_invocable_actions_from_flow.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.call_context_service_invocable_actions_from_flow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4f3883bb39fe3452cc06362b1785a08ca507ffd1e7aa2ac3b62b088009a9fc82
description: Manage your business application data efficiently by combining the capabilities of Salesforce Flow and Context Service invocable actions.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Call Standard Context Service Invocable Actions from Flows

Manage your business application data efficiently by combining the capabilities of Salesforce Flow and Context Service invocable actions.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Developer</strong>, <strong>Enterprise</strong>, <strong>Professional</strong>, and <strong>Unlimited</strong> editions for Industries clouds where Context Service is enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d611e74">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e74 ">To create a flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d611e74 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e74 ">To invoke a build context:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d611e74 ">
              <p>Context Service Admin</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Context Service Runtime</p>
            </td>

          </tr>
        </tbody>
      </table>

For details about each invocable action, see the Context Definition developer guide.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Standard Invocable Actions">
        <caption>Standard Invocable Actions</caption>
        <colgroup>
          <col style="width:16.420361247947454%">
          <col style="width:40.06568144499179%">
          <col style="width:43.51395730706075%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d611e126">Invocable Actions</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d611e129">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d611e132">Input Values</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Build Context</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Build and cache context data associated with a context definition.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong class="uicontrol">Context Definition ID</strong>: The ID or developer name of the active context
                definition that you want to build the context on.</p>
              <p>(Optional) Record IDs to hydrate specific data into the context.</p>
              <p style="margin-bottom:0;">(Optional) The specific Context Mapping ID or name to be used for context creation.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Persist Context Data</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Store cached context data associated with a context mapping ID in a Salesforce
              record.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong class="uicontrol">Context ID</strong>: The ID of the context instance whose data you want to
                persist.</p>
              <p>(Optional) Record IDs to hydrate specific data into the context to be persisted.</p>
              <p style="margin-bottom:0;">(Optional) The specific Context Mapping ID or name to be persisted.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Query Context Tags</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Query the tag values from an instance that are associated with a context
              definition</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong class="uicontrol">Context ID</strong>: The ID of the context instance you want to query.</p>
              <p style="margin-bottom:0;">(Optional) The Tags List you want to query within the specified context. You can add new
                resources for each tag.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Update Context Attributes</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Update the attributes in the context instance using tags.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong class="uicontrol">Context ID</strong>: The ID of the context instance you want to update.</p>
              <p><strong class="uicontrol">Node Path</strong>: The node path of the attributes you want to update.</p>
              <p style="margin-bottom:0;"><strong class="uicontrol">Updated Values</strong>: The updated values of the attributes in the specified Node
                Path.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Delete Context Cache</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Delete the specified context instance from the in-memory context cache using the
              provided context ID. This action removes the cached data maintained by the context cache
              service without performing any database write operations.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p style="margin-bottom:0;"><strong class="uicontrol">Context ID</strong>: The ID of the context instance you want to delete.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Add Context Records</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Adds or overwrites records in a context instance after it is hydrated.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong class="uicontrol">Context ID</strong>: The ID of the context instance in which to add
                or overwrite records.</p>
              <p><strong>Input Data</strong>: The JSON data containing the records to add
                to the context instance.</p>
              <p><strong>Overwrite Existing Records</strong> (Optional): Indicates
                whether to overwrite existing records. Default is False.</p>
              <p style="margin-bottom:0;"><strong>Tagged Data
                </strong>(Optional): Indicates whether the input data is in a tagged format. Default is
                False.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Invocable Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e126 ">Delete Context Records</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e129 ">Deletes one or more records from a context instance.</td>

            <td data-label="Input Values" class="slds-cell-wrap" style="vertical-align:top;" headers="d611e132 ">
              <p><strong>Context ID</strong>: The ID of the context instance from which records should be deleted. </p>
              <p><strong>Data Paths</strong>: A JSON array of data paths to the records to be deleted in a context
                instance. The dataPath field in an object contains an array of strings representing the
                path to the record.</p>
              <p style="margin-bottom:0;"><strong>Permanent Delete </strong>(Optional): Indicates whether the record is to be permanently
                deleted or not. Default is False.</p>
            </td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-context_service-264-0-0-production-enus/e9dc37f3-cb53-4bc1-be8b-b6873099d0be/images/icon_note.png)

Note

- If an existing Salesforce object’s data values are overridden during the Build Context Data flow, then the Persist Context Data flow doesn’t store these new values in the database.
- You can’t persist compound data type fields to the database. You must persist these fields as individual fields. For example, the Name field of the Contact object is a compound data type because it combines the salutation, the first name, and the last name. You must map and persist each of these fields individually.
- When a context has reference fields and the ID is updated in an active context, the corresponding reference fields are not updated.

1. From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
2. Click **New Flow**.
3. Select **Start From Scratch**, and then click **Next**.
4. Select **Screen Flow**, and then click **Create**.
5. Click ![Add icon for Flow](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-context_service-264-0-0-production-enus/e9dc37f3-cb53-4bc1-be8b-b6873099d0be/context_service/images/context_service_add_icon_flow.png), and then select **Action**.
6. Create and update the action element.
    1. In the category section, select **Context Service**.
    2. Select a context service action.
        
        For example, select Build Context.
    3. Enter a label for the action.
        
        The API name is automatically populated from the label that you enter.
    4. Set input values according to the selected invocable action.
        
        For example, for the Build Context action, select an active Context Definition ID that you want to build the context on.
    5. To store the output of the action to a new resource that the flow can use, in the Advanced section, enable manual assignment for output variables.
    6. Click **Done**.
7. Save your changes.
8. Enter a flow label.
    
    The Flow API Name is automatically populated from the label that you enter.
9. Save your changes.

#### See Also

- [Developer Guide: Context Service Standard Invocable Actions](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/context_service_invocable_actions_parent.htm)