Named Credentials
  • 13 Nov 2024
  • 2 Minutes to read
  • Dark
    Light

Named Credentials

  • Dark
    Light

Article summary

To establish a connection between the Relay Salesforce package and the Relay Network platform, configuration of an External Credential and Named Credential is necessary.

Create Relay External Credential

rn-sfdc-external_credentials

Fig 1.

  1. Access your org’s Setup page.

  2. Navigate to SETTINGS → Security → Named Credentials

  3. Click on the External Credentials Fig 1. (1) tab

  4. Click the New Fig 1. (2) button

rn-sfdc-external_credentials-new

Fig 2.

  1. Fill in the New External Credential Dialog as follows

    1. Set the Label field to Relay Network Creds.

    2. Set the Name field to RelayNetworkCreds. This value will be used later so it is important to enter it exactly as is.

    3. Set the Authentication Protocol to Custom.

    4. Click the Save button.

    5. The Relay Network Creds Network Credentials dialog will appear Fig 3.

rn-sfdc-external_credentials-dialog

Fig 3.

  1. Locate the Principals section and click the New button Fig 3. (1) to open the Create Principal dialog

CAUTION

If you ever change the name of the Principal you will have to update your permission set accordingly.

rn-sfdc-external_creds-principal

Fig 4.

  1. Fill in the Create Principal Dialog

    1. Set the Parameter Name field to RelayNetworkPrincipal.

    2. Keep the Sequence Number as 1.

    3. Click the Add button next to Authentication Parameters.

    4. Set the Parameter 1 Name to apikey. This value will be used later so make sure it is entered exactly as stated without spaces.

    5. Set the Parameter 1 Value to the Relay API Key. This value will be provided to you by your Relay Implementation Manager.

    6. Click the Save button.

    7. Locate the Custom Headers section and click on the New button Fig 3. (2)

rb-sfdc-external-custom_header

Fig 5.

  1. Fill in the Create Custom Header dialog (Fig 5.)

    1. Set the Name field to xx-relay-api-key. As this is an HTTP header name, the value must be exactly as specified.

    2. Set the Value field to {!$Credential.RelayNetworkCreds.apikey}. The RelayNetworkCreds value refers to the value entered in Step 5b. Fig 3. (3). The apikey value is from Step 11d.

    3. Leave the Sequence Number value 1.

    4. Click the Save button

Create Relay Names Credential

  1. Click on the Named Credentials tab Fig 1. (3)

  2. Click on the New button to create a new Named Credential

rn-sfdc-new-named_credential

Fig 6.

  1. Fill in the New Named Credential form (Fig 6.) as follows:

    1. Set the Label to Relay Network.

    2. Set the Name to RelayNetwork. It is critical that you enter the name exactly as specified.

    3. Set the URL to one of the following values:

      1. For Relay Staging Environment set the URL to https://api.relaystaging.com

      2. For the Relay Production environment set the URL to https://api.relayzone.com

    4. Set the Enabled for Callout to Enabled.

    5. Authentication

      1. For the External Credentials select Relay Network Creds. This was created in Step 5.

      2. Leave the Client Certificate blank.

    6. Callout Options

      1. Uncheck Generate Authorization Header

      2. Check Allow Formulas in HTTP Header

      3. Uncheck Allow Formulas in HTTP Body

      4. Leave Outbound Network Connection as —None—

    7. Managed Package Access

      1. Leave Allowed Namespaces for Callouts blank.

    8. Click the Save button.

Your named credentials are now configured.


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence