Loading
Prepare for Email to Become the Default Login ExperienceRead More
Configure a REST Data Source Using Named Credentials on a Flexcard (Managed Package)

Configure a REST Data Source Using Named Credentials on a Flexcard (Managed Package)

For the managed package runtime, use Named Credentials to authenticate Apex callouts when configuring a REST data source. A named credential specifies the URL of a callout endpoint and its required authentication parameters in one definition.

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

To create a named credential, see Named Credentials as Callout Endpoints.

Note
Note

For optimal flexibility and easier implementation, use an Integration Procedure as a data source to execute multiple actions in a single server call. See Configure an Integration Procedure Data Source on a Flexcard (Managed Package).

Before You Begin

  1. To configure the data source when creating a Flexcard, navigate to the Select Data Source Type step, select REST, and click Next.
  2. To configure the data source from the SetUp Panel in the Flexcard Designer, click Setup, and select REST from the Data Source Type dropdown.
  3. Select Named Credential from the REST type dropdown.
  4. From the Named Credential dropdown, select a Named Credential created from Setup > Named Credential in your org.
  5. Enter a relative path in the Endpoint field to get what you need from the API, such as My_Payroll_System/paystubs?format=json.
  6. Select a method type from the Method dropdown:
    • Select GET to requests data specified by the parameters of the URL.

    • Select POST to send JSON data.

      • Enter the JSON data to send in the JSON Payload field.

    Note
    Note

    You can use Context Variables to pass inherited values with either method. See Flexcards Context Variables (Managed Package).

  7. (Optional) To add any request headers, click + Add New next to Headers to add any request headers.
    Note
    Note

    Most third-party APIs expect various headers such as tokens, public keys, and content-type.

  8. (Optional) To configure other options common among all data sources, see Flexcards Data Source Properties (Managed Package).
  9. To test data source settings, add test variables that the query can use to return live data, see Test Data Source Settings on a Flexcard (Managed Package).

What’s next: Add elements to the Flexcard. See Add Elements to a Flexcard (Managed Package).

 
Loading
Salesforce Help | Article