Cert++
Close

Service naming, log prefix and communication logging

Key Takeaway

On Production, communication logs are written only when "Communication Log Enabled" is selected on that instance's service configuration and the service implements filterLogMessage, or both getRequestLogMessage and getResponseLogMessage.

In B2C Commerce, every outbound web service call runs through a service configuration that you create in Business Manager. Three settings on that configuration control how you troubleshoot the integration. The service name builds the logging hierarchy. The log prefix names the log file. Communication Log Enabled records the request and response data of the service call.

Service configuration and service name

You create a service configuration in Business Manager under Administration > Operations > Services. The service name you enter there is the ID your script passes as the first argument to LocalServiceRegistry.createService, along with an object of callbacks. The name in code must match the name in Business Manager.

Salesforce recommends the naming pattern {cartridge}.{protocol}.{service}.{operation}. Two examples are mycartridge.http.payment.get and mycartridge.ftp.partner.getPriceList.

Service credential names follow their own rules. Credential names can't contain spaces and shouldn't include user or password details, for example http.mysite.myservice.cred. You can leave the operation segment out of a credential name so that one credential serves multiple operations run through the same service.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a service configuration, recognize how they are applicable to the development process

0/5

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.