Loading
Salesforce now sends email only from verified domains. Read More
Communications Cloud
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
          Configure an HTTP Callout Action in Flows

          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

          1. From Setup, in the Quick Find box, enter Flows and select it.
          2. Open Get Account Invoices in a flow builder.
          3. Add an Action element after the Get Account Number element.
          4. Click Create HTTP Callout.
          5. Configure the external service that connects Salesforce to the HTTP-based API.
            1. For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
            2. For reference, enter a description of what the external service is connected to.
            3. Select the named credential that you created for this external service.
              The URL associated with the credential is automatically populated.
            4. Click Next.
          6. Configure the invocable action that you want to use in Flow Builder or across Salesforce.
            1. Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
            2. Enter /v1/core#GetInvoiceHistoryM as the URL path.
            3. To add query parameter keys for the API you’re calling, click +Add Key.
            4. Enter the key value, and select the data type.
            5. To make the entry of a value mandatory when the action is invoked in a flow, select Require.
            6. Click Next.
          7. 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"
            }
            ]
            }
          8. Save your changes.
          9. To assign API codes, add an Assignment element after the Action element that you created.
          10. Enter a label and an API name.
          11. Select APIErrorMessage as the variable and Invoice API error message as the value.
          12. Transform the Invoices element to get the required output.
            1. Click the Transform Invoices element.
            2. Delete the InvoiceFormat collection variable.
            3. Click Add resource for source data, and select Output from <the Action_element> that you created.
            4. Map the source data to target data as required.
          13. To override and create a flow, click Save as New Flow.
          14. Enter the flow label and flow API name.
          15. Save and activate your flow.

          Configure an HTTP Callout Action in Get Account Balance Flow

          1. From Setup, in the Quick Find box, enter Flows and select it.
          2. Open Get Account Balance in a flow builder.
          3. Add an Action element after the Get Account Number element.
          4. Click Create HTTP Callout.
          5. Configure the external service that connects Salesforce to the HTTP-based API.
            1. For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
            2. For reference, enter a description of what the external service is connected to.
            3. Select the named credential that you created for this external service.
              The URL associated with the credential is automatically populated.
            4. Click Next.
          6. Configure the invocable action that you want to use in Flow Builder or across Salesforce.
            1. Enter a label for HTTP callout, and select the method required by the API that you’re calling.
            2. Enter /v1/core#GetAcctBalanceM as the URL path.
            3. To add query parameter keys for the API you’re calling, click +Add Key.
            4. Enter the key value, and select the data type.
            5. To make the entry of a value mandatory when the action is invoked in a flow, select Require.
            6. Click Next.
          7. 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.
          8. Save your changes.
          9. To assign API codes, add an Assignment element after the Action element that you created.
          10. Enter label and API name.
          11. Select APIErrorMessage as the variable and Invoice API error message as the value.
          12. Transform the Account Balance element to get the required output.
            1. Click the Transform Account Balance element.
            2. Delete the SampleMapping collection variable.
            3. Click Add resource for source data, and select Output from <the Action_element> that you created.
            4. Map the source data to target data as required.
          13. To override and create a flow, click Save as New Flow.
          14. Enter the flow label and flow API name.
          15. Save and activate your flow.

          Configure an HTTP Callout Action in Get Invoice Details Flow

          1. From Setup, in the Quick Find box, enter Flows and select it.
          2. Open Get Invoice Details in a flow builder.
          3. Add an Action element before the Is Invoice Available? element.
          4. Click Create HTTP Callout.
          5. Configure the external service that connects Salesforce to the HTTP-based API.
            1. For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
            2. For reference, enter a description of what the external service is connected to.
            3. Select the named credential that you created for this external service.
              The URL associated with the credential is automatically populated.
            4. Click Next.
          6. Configure the invocable action that you want to use in Flow Builder or across Salesforce.
            1. Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
            2. Enter /api/AriaQuery/objects.php#GetInvoiceInformationM as the URL path.
            3. To add query parameter keys for the API you’re calling, click +Add Key.
            4. Enter the key value, and select the data type.
            5. To make the entry of a value mandatory when the action is invoked in a flow, select Require.
            6. Click Next.
          7. 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.
          8. Save your changes.
          9. To assign API codes, add an Assignment element after the Action element that you created.
          10. Enter a label and an API name.
          11. Select APIErrorMessage as the variable and Invoice API error message as the value.
          12. Transform the Invoice Details element to get the required output.
            1. Click the Transform Invoice Details element.
            2. Delete the SampleMapping collection variable.
            3. Click Add resource for source data, and select Output from <the Action_element> that you created.
            4. Map the source data to target data as required.
          13. To override and create a flow, click Save as New Flow.
          14. Enter the flow label and flow API name.
          15. Save and activate your flow.

          Configure an HTTP Callout Action in Get Invoice Charges Flow

          1. From Setup, in the Quick Find box, enter Flows and select it.
          2. Open Get Invoice Charges in a flow builder.
          3. Add an Action element before the Are Invoice Charges Available? element.
          4. Click Create HTTP Callout.
          5. Configure the external service that connects Salesforce to the HTTP-based API.
            1. For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
            2. For reference, enter a description of what the external service is connected to.
            3. Select the named credential that you created for this external service.
              The URL associated with the credential is automatically populated.
            4. Click Next.
          6. Configure the invocable action that you want to use in Flow Builder or across Salesforce.
            1. Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
            2. Enter /api/AriaQuery/objects.php#GetInvoiceInformationM as the URL path.
            3. To add query parameter keys for the API you’re calling, click +Add Key.
            4. Enter the key value, and select the data type.
            5. To make the entry of a value mandatory when the action is invoked in a flow, select Require.
            6. Click Next.
          7. 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",
                  }
                  ]
                  }
                  ]
                  }
          8. Save your changes.
          9. To assign API codes, add an Assignment element after the Action element that you created.
          10. Enter a label and an API name.
          11. Select APIErrorMessage as the variable and Invoice API error message as the value.
          12. Transform the Invoice Charges element to get the required output.
            1. Click the Transform Invoice Charges element.
            2. Delete the InvoiceChargesFormat collection variable.
            3. Click Add resource for source data, and select Output from <the Action_element> that you created.
            4. Map the source data to target data as required.
          13. To override and create a flow, click Save as New Flow.
          14. Enter the flow label and flow API name.
          15. Save and activate your flow.

          Configure an HTTP Callout Action in Get Payment History Flow

          1. From Setup, in the Quick Find box, enter Flows and select it.
          2. Open Get Payment History in a flow builder.
          3. Add an Action element after the Get Account Number element.
          4. Click Create HTTP Callout.
          5. Configure the external service that connects Salesforce to the HTTP-based API.
            1. For the external service, enter a name that begins with a letter, contains only alphanumeric characters, and doesn't include spaces.
            2. For reference, enter a description of what the external service is connected to.
            3. Select the named credential that you created for this external service.
              The URL associated with the credential is automatically populated.
            4. Click Next.
          6. Configure the invocable action that you want to use in Flow Builder or across Salesforce.
            1. Enter a label for the HTTP callout, and select the method required by the API that you’re calling.
            2. Enter /api/AriaQuery/objects.php#GetPaymentDetailsM as the URL path.
            3. To add query parameter keys for the API you’re calling, click +Add Key.
            4. Enter the key value, and select the data type.
            5. To make the entry of a value mandatory when the action is invoked in a flow, select Require.
            6. Click Next.
          7. 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.
          8. Save your changes.
          9. To assign API codes, add an Assignment element after the Action element that you created.
          10. Enter a label and an API name.
          11. Select APIErrorMessage as the variable and Invoice API error message as the value.
          12. Transform the Account Balance element to get the required output.
            1. Click the Transform Account Balance element.
            2. Delete the SampleMapping collection variable.
            3. Click Add resource for source data, and select Output from <the Action_element> that you created.
            4. Map the source data to target data as required.
          13. To override and create a flow, click Save as New Flow.
          14. Enter the flow label and flow API name.
          15. Save and activate your flow.
           
          Loading
          Salesforce Help | Article