|
getShippingOptionsAndRatesFromExternalService (Integer numberOfUniqueItems) { final Integer SuccessfulHttpRequest = 200; ShippingOptionsAndRatesFromExternalService[] shippingOptions = Http http = new Http(); HttpRequest request = new HttpRequest(); // To access the service below, you may need to add request.setEndpoint( request.setMethod('GET'); HttpResponse response = http.send(request); |
Several sample Apex files using this service were deployed into orgs using the Salesforce Commerce CLI. If you use any of the samples in your org, replace them as soon as possible, because the samples will no longer work once the service is decommissioned.
To get the latest samples, which have removed all references to this service and instead mock up external service responses as static responses, navigate to the following repos and pull the latest changes:
https://github.com/forcedotcom/commerce-on-lightning/
If you deployed any of the samples to your development or production orgs, please redeploy the updated samples. And if you used any of these samples as the basis for your own classes, please refactor your classes to remove any references to the decommissioned Heroku service.
If you would like to enable an external service, update the sample classes and deploy your own copy of the Heroku service. The Heroku service can now be deployed, modified, or updated from this public repo.
https://github.com/forcedotcom/commerce-heroku-sample-response
1. Update the Apex class.
2. Replace the example reference (https://example.com) with your Heroku URL.
3. Add the host to Setup > Security > Remote Site Settings.
4. Update useHTTPService to true.
000396217

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 are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security 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 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.