Define Custom HTTP Headers for OData Connectors
Define and activate custom HTTP headers to pass more request information to the external data source for processing.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience (not for high-data-volume external objects) |
Available in: Developer Edition Available for an extra cost in: Enterprise, Performance, and Unlimited Editions |
| User Permissions Needed | |
|---|---|
| To create and edit external data sources: | Customize Application |
Custom HTTP headers provide context information from Salesforce such as region, org details, or the role of the person viewing the external object. For each OData external data source, define up 10 HTTP headers to request or data. For example, to see who’s making a callout to the external data source, use a formula that resolves to the name of the user.
When naming the custom HTTP header, don’t override the following existing standard header names.
- Content-Type
- Accept
- maxVersionHeader
- versionHeader
- X-HTTP-METHOD
- Content-Length
- X-CSRF-Token (when CSRF-enabled)
- Prefer (when a trigger on the external object is enabled)
- Cookie
- From Setup, enter External Data Sources in the Quick Find box, then select External Data Sources.
- Click the name of an OData 2.0 or 4.0 data source.
- In the External Custom HTTP Headers related list, click New to create a custom HTTP header or Edit to change an existing one.
-
Complete the fields.
Field Description Header Field Name Enter a name that contains at least one alphanumeric character or underscore. It can also include: ! # $ % & ' * + - . ^ _ ` | ~ Header Field Value Create a formula for the Header Field Value using the formula editor. The values in the formula must evaluate to a string. If the formula resolves to null and an empty string, the header isn’t sent. Active To start using the header field right away, select the Active checkbox. Description A text description of the header field’s purpose. Parent The name of the entity that the custom HTTP header is related to. Using a named credential as the parent entity for the custom HTTP header isn’t supported. - Click Save.

