Make HTTP Call
Overview
The Make HTTP Call component in Plinqx is a versatile tool designed for outbound integration calls to external systems. It supports various HTTP methods, allowing you to configure the request headers, query parameters, and body as needed for your integration requirements.
Note: Ensure you have configured your named credentials in Salesforce before using this component, as it relies on them for secure API interactions.
Inputs
-
**URL/Endpoint: **Provide the full URL path, including parameters (e.g., https://domain/path).
-
Named Credential:
Select from a dropdown list of all configured and active named credentials in your Salesforce org.
-
HTTP Method:
Choose from a dropdown list of HTTP methods (GET, POST, PATCH, DELETE, HEAD, etc.).
-
Timeout in ms:
Specify the timeout duration for the HTTP callout, if necessary.
-
Params:
A list of key-value pairs representing query parameters to be appended to the URL.
-
Headers:
A list of key-value pairs for setting standard HTTP headers.
-
Body:
The JSON payload to send in the request.
-
Compress Body:
Enable to compress the request body before sending.
-
Set Body as Blob:
Enable to convert the body into a binary large object (blob) before sending.
-
Close Transaction:
Enable to indicate that the callout should run in its own transaction.
Outputs
-
Body:
The response body from the callout.
-
Collection of Headers:
The headers returned in the callout response.
-
Error Message:
Any HTTP error or success message received.
-
Status:
The textual HTTP status returned.
-
Status Code:
The numerical HTTP status code returned.
Example Scenario - Syncing Order Details to External Shipping Service
Scenario Overview:
A Salesforce org needs to send order details to an external shipping service for processing and dispatch. The order information, including shipping address and items, needs to be transmitted securely upon order confirmation.
Implementation with Make HTTP Call Component:
-
Flow Setup for Order Processing:
- Create a Salesforce flow that triggers when an order is confirmed in the org.
-
Adding Make HTTP Call Component:
- Incorporate the Make HTTP Call component to send the order details to the shipping service's API.
-
Configuring Inputs:
-
'URL/Endpoint' is set to the shipping service's API endpoint.
-
'Named Credential' is selected to authenticate the call securely.
-
'HTTP Method' is chosen as POST for sending order data.
-
'Body' contains the JSON payload with the order details.
-
Other inputs like 'Headers' and 'Params' are configured as required by the shipping service's API.
-
-
Executing API Call:
- The flow processes the order confirmation and executes the HTTP call, sending the order details to the shipping service.
-
Handling API Response:
-
The response 'Body' and 'Status Code' are evaluated to confirm successful transmission.
-
Any 'Error Message' received is logged for troubleshooting.
-
Results:
Implementing the Make HTTP Call component allows the Salesforce org to securely and efficiently send order details to the external shipping service. This approach ensures real-time data synchronization, enhancing the efficiency of the order fulfillment process and improving overall customer service.