Initiates remote calls to Salesforce and consumes the response from it.
You can configure or customize business logic contracts in Visual Studio Code based Modeler to
invoke remoteApiCallAsync with request payload. These APIs
are governed by Apex REST API limits and support only JSON format response.
Required Editions
Available in: Enterprise and Unlimited Editions where Consumer
Goods Cloud is enabled
Parameters
This method takes a single object as a parameter and consists of these three
parameters.
path - Specify a relative URL path as a string that starts with ‘/’. Required.
method - Specify a HTTP method. Optional. When a method isn’t specified, the request is
considered a GET type of REST request.
data - JSON string to be passed as request to remote call.
Returns
result (promise): The method returns a promise that’s fulfilled with data
from the remote API. If the remote endpoint returns an error, it'll be included in the
response from the promise. If there's an error that prevents the remote API from being
invoked, the promise will be fulfilled with a JSON response that contains two attributes:
success and message. The success attribute is set to false.
In the business logic contract of your customization project, add this code to call the
remotecallAPI:
RemoteCalls.remoteCallApiAsync(<data>)
Sample Code
The definition must contain all mandatory parameters for GET and POST. Here are a few
remoteApiCallAsync sample definitions.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.