Create a Web Service Configuration
The web service configuration specifies the credentials and web service profile that B2C Commerce uses when calling a web service.
- Select Administration > Operations > Services.
- On the Services page, click New.
-
On the New Service page, enter a name for the service.
We recommend the naming pattern
cartridge.protocol.service.operation
.For example:
mycartridge.http.payment.get
ormycartridge.ftp.partner.getPriceList
.If service names contain periods, the period-delimited name segments become part of the logging hierarchy. Including the cartridge in the name is useful when you have multiple web service integrations, because it groups logging information and ensures unique service names.
- Select the service type to use for your web service. The type determines the underlying class used to call your web service and adds methods to the methods inherited from the Service class.
- If the web service is available and you want to make calls to it, select Enabled. It isn't enabled by default.
- In the Service Mode list, to make calls to a live web service, select Live. To use the mocked call configured in your service registry to simulate the expected response from the web service, select Mocked.
-
Enter the name of a prefix for the log file for this service.
If you don't enter a prefix, the log name defaults to
main
. All logs are written in the shared log directory to a file namedservice-prefix-internalID-date.log
. If you do not enter a prefix, the file is namedservice-main-serviceID-date
. -
If you want data in the request and response of the web service call to be
logged, select Communication Log Enabled .
If you enable the communications log, Salesforce strongly recommends using the log filtering callback methods to remove private or sensitive data from the log messages.
-
If you want to prevent unfiltered communication logs from being written on
non-production instances, select Force PRD behavior in non-PRD
environments.
If you enable this setting on a non-production instance, communication logs are disallowed unless a filter is configured. If you disable this setting on a non-production instance, communication logs are allowed regardless of whether a filter is configured. This setting has no effect on production instances.
- Select one of the service profiles.
- Select one of the service credentials.
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.