You are here:
Example Simple Custom HTTP Integration in Agentforce Operations
Walk through an end-to-end example of creating a custom HTTP integration that looks up city and state information for a US postal code, and then adding it to a blueprint as an automation task.
Required Editions
| License Required |
|---|
This feature is a workspace that’s external to your Salesforce org and requires an Agentforce Operations license. To purchase an Agentforce Operations license, contact your Salesforce account executive. |
| Role or Access Needed | |
|---|---|
| To manage integrations in Agentforce Operations: | Admin role or Integration Admin role |
| To edit a blueprint in Agentforce Operations: | Admin role, Creator role, or a user with Edit access for the blueprint |
This example uses the at no additional cost Zippopotam.us API, which returns location information for a US postal code. Authentication isn't required. You create the integration and then add it to a blueprint so the lookup runs automatically when a workflow reaches that stage.
The integration sends a GET request to
https://api.zippopotam.us/us/90210 and extracts the city name and state
abbreviation from the response.
See Also
Create the Postal Code Lookup Integration
- In the navigation sidebar, click Admin.
- Click the Integrations tab.
- Click Add integration.
- For Integration Type, select Custom HTTP.
- For Name, enter Postal Code Lookup.
- For Type, select None. This API requires no authentication.
- For Base URL, enter https://api.zippopotam.us.
- For Method, select GET.
- For Path, enter /us/90210.
- Leave Headers, Query parameters, and Body fields blank.
-
For HTTP Response, configure the values to extract from the API response.
- Click + Add value. For the JSON Path expression, enter .places[0]["place name"]. Select the Agentforce Operations field to store the city name. For example, City.
- Click + Add value. For the JSON Path expression, enter .places[0]["state abbreviation"]. Select the Agentforce Operations field to store the state abbreviation. For example, State Abbreviation.
- Click Next.
- For Health check, select Disabled. The Zippopotam.us API doesn't provide a health endpoint.
-
Click Create.
The integration configuration window closes.
- In the integration list, find your new integration.
-
Click the three-dot dropdown list next to the integration and select
Edit.
The integration configuration panel opens.
-
Open the Test HTTP request section and click
Test.
The test results show the city (Beverly Hills) and state abbreviation (CA) extracted from the response. Confirm that the extracted values appear in the fields you selected.
- Close the integration configuration window.
The Postal Code Lookup integration is complete available to use in blueprints.
Add the Postal Code Lookup Integration to a Blueprint
- Create a blueprint or edit an existing blueprint.
- In the blueprint, in the stage where you want the lookup to run, click + Automation.
- Point to Custom HTTP and select Postal Code Lookup.
- For Start, select When the stage starts.
- Click Add.
The Postal Code Lookup automation task is added to the stage. When a workflow reaches this stage, Agentforce Operations automatically calls the postal code API and populates the city name and state abbreviation fields in the workflow.
