Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Manipulate JSON with the Send/Response Transformations Properties (Managed Package)

          Manipulate JSON with the Send/Response Transformations Properties (Managed Package)

          For the managed package runtime, specify and transform the input and output JSON of Omniscripts or Integration Procedures with the Send and Response Transformation properties. The Send properties transform the input; the Response properties transform the output.

          Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

          The following table outlines the different transformation options:

          Purpose

          Send/Response JSON Path

          Send/Response JSON Node

          Example Path

          Example Result

          Reparenting the node

          path

          node

          {path:{a:b}}

          {node: {a:b}}

          Reparenting the node and adding a nested node

          path

          node1:node2

          {path:{a:b}}

          {node1:{node2:{a:b}}}

          Reparenting the node dynamically using merge field syntax

          (In Summer '19 and later releases)

          path

          %nodename%

          where the value of nodename is node

          {path:{a:b}}

          {node: {a:b}}

          Removing the parent node of an object

          path

          VlocityNoRootNode

          (Not supported in Integration Procedures)

          {path:{a:b}}

          {a:b}

          Specifying the root node to drill down on instead of sending the entire JSON

          path

           

          {path:{a:b}}

          {path:{a:b}}

          1. To reparent the node of a JSON object:
            1. Set the Path to the node you are drilling down on.
            2. Enter the new node name into the JSON Node field.
          2. To reparent the node and add a nested node:
            1. Set the Path to the node you are drilling down on.
            2. Enter the new node name into the JSON Node field, and enter a colon (:).
            3. After the colon, without leaving a space, enter the second JSON node name.
          3. To reparent the node using merge field syntax:
            1. Set the Path to the node you are drilling down on.
            2. In the JSON Node field, enter a merge field that represents the new name, for example %NewNode%.
            3. Use a SetValues action or an input parameter on the Preview tab to test the merge field.

              For example, on the Preview tab, enter a Key of NewNode and a Value of MightyNode, click Execute and then look for MightyNode in the output JSON.

          4. To write to a list item using merge field syntax:
            1. In the Response JSON Node field of a step, enter the path to the list node followed by a pipe character (|) and a merge field that represents the list item number, for example, ListNode|%item%.
            2. Use a SetValues action or an input parameter on the Preview tab to test the merge field.

              For example, on the Preview tab, enter a Key of item and a Value of 2, click Execute, and watch the step output appear as the second item in the list.

              If the step output node and the existing list item node match, the list item value is replaced. If they don't match, the step output node is added as a peer of the existing list item node.

          5. To remove the parent node of an object:
            1. Set your Path to the node you are drilling down on.
            2. Set the Node to VlocityNoRootNode.
          6. To specify the root node:
            1. Set the Path to the node you are drilling down on.
            2. Leave the JSON Node field blank.
          7. To test the result of your transformation, open the Debug console:
            1. Preview the Omniscript in the Omniscript Designer and enter input that you need to transform.
            2. After the action containing the JSON transformation has run, click Debug to open the Debug console.
            3. In the Debug console, expand the action that is sending or receiving the transformed JSON.
            4. Expand the Request to see JSON that has been transformed by the Send JSON Path and Send JSON Node, or expand the Response to see JSON that has been transformed by the Response JSON Path and Response JSON Node.
           
          Loading
          Salesforce Help | Article