Loading
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
          Get or Send Data from or to a Flexcard

          Get or Send Data from or to a Flexcard

          Transfer data from or to a server by calling a data source. When Omnistudio receives the data, it adds it to the JSON data in the card's record object or to a data node that you specify. For example, populate a child Flexcard with data from its parent, or conditionally show messages from an API response.

          1. After you select the data action type, set up data source information.
          2. To skip updating the JSON data, select Ignore Response.
          3. In Response Node, specify where to save the returned data:
            • If the request returns one object, enter record. Omnistudio inserts the data at the root of the card object.

              Returned Data JSON Data
              //One record returned
                                   {
                                   "Type": "Mechanical",
                                   "Subject": "The watchamacallit is too high",
                                   "Status": "Escalated",	
                                   "Priority": "High",
                                   "CaseId": "5003g000007WQHRAA4",
                                   }
                                
              image
              //One array object returned
                                   {
                                   "contacts": [
                                   {
                                   "AccountId": "0013g00000AeI9fAAF",
                                   "Name": "Rose Gonzalez",
                                   "Birthdate": "1968-09-26",
                                   "CreatedDate": "2020-10-15T21:28:48.000+0000",
                                   "Phone": "(512) 757-6000",
                                   "Id": "0033g00000EXVKbAAP"
                                   },
                                   {
                                   "AccountId": "0013g00000AeI9fAAF",
                                   "Name": "Sean Forbes",
                                   "Birthdate": "1947-06-25",
                                   "CreatedDate": "2020-10-15T21:28:48.000+0000",
                                   "Phone": "(512) 757-6000",
                                   "Id": "0033g00000EXVKcAAP",
                                   }
                                   ]
                                   }
              image
            • If the request returns multiple records or to add the data to a new data node, enter an alphanumeric name with no spaces or special characters such as caseList or caseList1.

              Returned Data JSON Data
              //multiple records returned
                                   [
                                   {
                                   "Type": "Mechanical",
                                   "Subject": "The watchamacallit is too high",
                                   "Status": "Escalated",
                                   "Priority": "High",
                                   "CaseId": "5003g000007WQHRAA4"
                                   },
                                   {
                                   "Type": "Structural",
                                   "Subject": "The doodat wasn't properly set up",
                                   "Status": "New",
                                   "Priority": "Medium",
                                   "CaseId": "5003g000007WQHQAA4"
                                   }
                                   ]
                                
              image
            Note
            Note

            For sequential actions, Omnistudio uses the data stored in Response Node.

            To access the data, use the {dataResponseNodeName.dataNode} syntax.

            For example, if the response node name is contactList, then to return an error message from an error data node, enter {contactList.error}.

          4. To confirm your request response, access the action debugger in preview, and then inspect these sections:
            • response: The requested data from the data action.
            • records: The records from the Flexcard's data source and all data actions that appended records to the JSON data.
            • node: The name of the response node that holds the data action records.
            • ignoreResponse: Indicator that you choose not to update the JSON data. If you select Ignore Response, the JSON data shows this parameter and sets it to true.
          5. To confirm that Omnistudio added the records to the JSON data, in preview, expand the cards node, and then search for the response node name.
          Use Cases to Transfer Data by Using Flexcard Actions
          Use Cases to Transfer Data by Using Flexcard Actions
          • Send Account Cases Data to Child Flexcard
            1. On a parent Flexcard, create a data action that retrieves the case information with a response data node called caseList.

            2. On the child Flexcard, in Data Node, enter {record.caseList}.
          • Display Messages from API Response
            1. Include the error message returned from a response in a text element, such as {caseList.error}.

            2. Add a condition on the element so that the Flexcard shows the text element only when an error message exists.

           
          Loading
          Salesforce Help | Article