You are here:
Configure an HTTP Callout Action in Flows
HTTP Callout guides you when you enter the details about the HTTP web-based service or REST API endpoint that you’re connecting to. After you complete the configuration, invoke the action in a flow. HTTP Callout assumes that you’re familiar with the API that you want to call.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To open, edit, or create a flow in Flow Builder: | Manage Profiles and Permission Sets |
| To create an external credential, a named credential, and an HTTP callout action: | Customize Application |
Before you configure an HTTP callout action, complete these prerequisites.
- Create an external credential and a named credential so that the external service can connect to the API.
- Prepare a sample API response in JSON format. If a sample doesn’t exist in the API’s documentation, use a third-party API platform to retrieve a response.
Configure an HTTP Callout Action in Get Account Invoices Flow
- From Setup, in the Quick Find box, enter Flows and select it.
- Open Get Account Invoices in a flow builder.
- Add an Action element after the Get Account Number element.
- Click Create HTTP Callout.
-
Configure the external service that connects Salesforce to the HTTP-based API.
- For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
- For reference, enter a description of what the external service is connected to.
-
Select the named credential that you created for this external service.
The URL associated with the credential is automatically populated.
- Click Next.
-
Configure the invocable action that you want to use in Flow Builder or across
Salesforce.
- Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
- Enter /v1/core#GetInvoiceHistoryM as the URL path.
- To add query parameter keys for the API you’re calling, click +Add Key.
- Enter the key value, and select the data type.
- To make the entry of a value mandatory when the action is invoked in a flow, select Require.
- Click Next.
-
Select the sample response method, and click Next.
Connect for Schema is used to hit the end point to get the response and validate the structure of the response, and Use Example Response is used when you have a sample response. After you paste the sample response, the response fields are mapped to the appropriate data structures. Here’s a sample JSON response.
{ "error_code": 0, "error_msg": "OK", "invoice_hist": [ { "invoice_no": 213832664, "outacct_no": 24950774, "billing_group_no": 18925682, "client_billing_group_id": "18925682", "currency_cd": "usd", "bill_date": "2024-09-11", "paid_date": "2024-09-11" } ] } - Save your changes.
- To assign API codes, add an Assignment element after the Action element that you created.
- Enter a label and an API name.
- Select APIErrorMessage as the variable and Invoice API error message as the value.
-
Transform the Invoices element to get the required output.
- Click the Transform Invoices element.
- Delete the InvoiceFormat collection variable.
-
Click
for source data, and select Output from <the
Action_element> that you created.
- Map the source data to target data as required.
- To override and create a flow, click Save as New Flow.
- Enter the flow label and flow API name.
- Save and activate your flow.
Configure an HTTP Callout Action in Get Account Balance Flow
- From Setup, in the Quick Find box, enter Flows and select it.
- Open Get Account Balance in a flow builder.
- Add an Action element after the Get Account Number element.
- Click Create HTTP Callout.
-
Configure the external service that connects Salesforce to the HTTP-based API.
- For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
- For reference, enter a description of what the external service is connected to.
-
Select the named credential that you created for this external service.
The URL associated with the credential is automatically populated.
- Click Next.
-
Configure the invocable action that you want to use in Flow Builder or across
Salesforce.
- Enter a label for HTTP callout, and select the method required by the API that you’re calling.
- Enter /v1/core#GetAcctBalanceM as the URL path.
- To add query parameter keys for the API you’re calling, click +Add Key.
- Enter the key value, and select the data type.
- To make the entry of a value mandatory when the action is invoked in a flow, select Require.
- Click Next.
-
Select the required sample response method, and click Next.
Connect for Schema is used to hit the end point to get the response and validate the structure of the response, and Use Example Response is used when you have a sample response. After you paste the sample response, the response fields are mapped to the appropriate data structures.
- Save your changes.
- To assign API codes, add an Assignment element after the Action element that you created.
- Enter label and API name.
- Select APIErrorMessage as the variable and Invoice API error message as the value.
-
Transform the Account Balance element to get the required output.
- Click the Transform Account Balance element.
- Delete the SampleMapping collection variable.
-
Click
for source data, and select Output from <the
Action_element> that you created.
- Map the source data to target data as required.
- To override and create a flow, click Save as New Flow.
- Enter the flow label and flow API name.
- Save and activate your flow.
Configure an HTTP Callout Action in Get Invoice Details Flow
- From Setup, in the Quick Find box, enter Flows and select it.
- Open Get Invoice Details in a flow builder.
- Add an Action element before the Is Invoice Available? element.
- Click Create HTTP Callout.
-
Configure the external service that connects Salesforce to the HTTP-based API.
- For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
- For reference, enter a description of what the external service is connected to.
-
Select the named credential that you created for this external service.
The URL associated with the credential is automatically populated.
- Click Next.
-
Configure the invocable action that you want to use in Flow Builder or across
Salesforce.
- Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
- Enter /api/AriaQuery/objects.php#GetInvoiceInformationM as the URL path.
- To add query parameter keys for the API you’re calling, click +Add Key.
- Enter the key value, and select the data type.
- To make the entry of a value mandatory when the action is invoked in a flow, select Require.
- Click Next.
-
Select the sample response method, and click Next.
Connect for Schema is used to hit the end point to get the response and validate the structure of the response, and Use Example Response is used when you have a sample response. After you paste the sample response, the response fields are mapped to the appropriate data structures.
- Save your changes.
- To assign API codes, add an Assignment element after the Action element that you created.
- Enter a label and an API name.
- Select APIErrorMessage as the variable and Invoice API error message as the value.
-
Transform the Invoice Details element to get the required output.
- Click the Transform Invoice Details element.
- Delete the SampleMapping collection variable.
-
Click
for source data, and select Output from <the
Action_element> that you created.
- Map the source data to target data as required.
- To override and create a flow, click Save as New Flow.
- Enter the flow label and flow API name.
- Save and activate your flow.
Configure an HTTP Callout Action in Get Invoice Charges Flow
- From Setup, in the Quick Find box, enter Flows and select it.
- Open Get Invoice Charges in a flow builder.
- Add an Action element before the Are Invoice Charges Available? element.
- Click Create HTTP Callout.
-
Configure the external service that connects Salesforce to the HTTP-based API.
- For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
- For reference, enter a description of what the external service is connected to.
-
Select the named credential that you created for this external service.
The URL associated with the credential is automatically populated.
- Click Next.
-
Configure the invocable action that you want to use in Flow Builder or across
Salesforce.
- Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
- Enter /api/AriaQuery/objects.php#GetInvoiceInformationM as the URL path.
- To add query parameter keys for the API you’re calling, click +Add Key.
- Enter the key value, and select the data type.
- To make the entry of a value mandatory when the action is invoked in a flow, select Require.
- Click Next.
-
Select the sample response method, and click Next.
Connect for Schema is used to hit the end point to get the response and validate the structure of the response, and Use Example Response is used when you have a sample response. After you paste the sample response, the response fields are mapped to the appropriate data structures. Here’s a sample JSON response.
{ "error_code": 0, "error_msg": "OK", "starting_record": 0, "total_records": 1, "invoice_details_m": [ { "invoice_no": 213832715, "acct_no": 24950774, "currency_cd": "usd", "invoice_line_m": [ { "line_item_no": 1, "amount": 35, "comments": "Mobile Service", "plan_name": "Blaze Mobile 25GB", "service_name": "Mobile Service", } ] } ] } - Save your changes.
- To assign API codes, add an Assignment element after the Action element that you created.
- Enter a label and an API name.
- Select APIErrorMessage as the variable and Invoice API error message as the value.
-
Transform the Invoice Charges element to get the required output.
- Click the Transform Invoice Charges element.
- Delete the InvoiceChargesFormat collection variable.
-
Click
for source data, and select Output from <the
Action_element> that you created.
- Map the source data to target data as required.
- To override and create a flow, click Save as New Flow.
- Enter the flow label and flow API name.
- Save and activate your flow.
Configure an HTTP Callout Action in Get Payment History Flow
- From Setup, in the Quick Find box, enter Flows and select it.
- Open Get Payment History in a flow builder.
- Add an Action element after the Get Account Number element.
- Click Create HTTP Callout.
-
Configure the external service that connects Salesforce to the HTTP-based API.
- For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
- For reference, enter a description of what the external service is connected to.
-
Select the named credential that you created for this external service.
The URL associated with the credential is automatically populated.
- Click Next.
-
Configure the invocable action that you want to use in Flow Builder or across
Salesforce.
- Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
- Enter /api/AriaQuery/objects.php#GetPaymentDetailsM as the URL path.
- To add query parameter keys for the API you’re calling, click +Add Key.
- Enter the key value, and select the data type.
- To make the entry of a value mandatory when the action is invoked in a flow, select Require.
- Click Next.
-
Select the sample response method, and click Next.
Connect for Schema is used to hit the end point to get the response and validate the structure of the response, and Use Example Response is used when you have a sample response. After you paste the sample response, the response fields are mapped to the appropriate data structures.
- Save your changes.
- To assign API codes, add an Assignment element after the Action element that you created.
- Enter a label and an API name.
- Select APIErrorMessage as the variable and Invoice API error message as the value.
-
Transform the Account Balance element to get the required output.
- Click the Transform Account Balance element.
- Delete the SampleMapping collection variable.
-
Click
for source data, and select Output from <the
Action_element> that you created.
- Map the source data to target data as required.
- To override and create a flow, click Save as New Flow.
- Enter the flow label and flow API name.
- Save and activate your flow.
Did this article solve your issue?
Let us know so we can improve!

