Loading
Set Up and Maintain Your Salesforce Organization
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
          Create and Edit Custom Headers

          Create and Edit Custom Headers

          Use custom headers to make unique secure connections to external data sources.

          Required Editions

          Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
          Available in: all editions
          User Permissions Needed
          To view named credentials: View Setup and Configuration
          To create, edit, or delete named credentials: Manage Named Credentials or Customize Applications

          Before you create custom headers, note the following.

          • You can use custom headers in named credentials and external credentials. If you create custom headers for both, a single callout combines them.
          • Headers are sorted by source and sequence number. Headers from named credentials are placed before headers from external credentials.
          • Headers from named credentials overwrite headers from external credentials if the names duplicate.
          • Headers are allowed to have duplicate header names if they’re from the same source.

          To create custom headers:

          1. From Setup, in the Quick Find box, enter Named Credentials, and then select Named Credentials.
          2. Click either Named Credentials or External Credentials.
          3. If you’re creating a custom header, click New. If you’re editing an existing custom header, select Edit from the Actions menu dropdown for that header.
          4. Fill in the fields for the custom header.
            FieldDescription
            Name The name of the custom header for this credential.
            Value

            The value of the header, evaluated as a formula. For more on setting custom header values, see Use API Keys in Custom Headers with Named Credentials, Use Custom Headers for Basic Authentication with Named Credentials, and Use Named Credential Formula Functions in Custom Headers.

            If you’re using a formula in a custom header and you’ve chosen Named Principal as your identity type, don’t use $User in the formula.

            Sequence Number A number that determines the order in which headers are sent out in the callout. Headers with lower numbers are sent out first.
          5. Save the custom header.

          By default, Salesforce generates a standard authorization header for each callout to a named-credential-defined endpoint. After you create a custom header, disable Generate Authorization Header in the associated named credential.

           
          Loading
          Salesforce Help | Article