Guide for implementing web service integrations in Salesforce B2C Commerce
View on GitHubSalesforceCommerceCloud/b2c-developer-tooling
b2c
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/main/plugins/b2c/skills/b2c-webservices/SKILL.md -a claude-code --skill b2c-webservicesInstallation paths:
.claude/skills/b2c-webservices/# Web Services Skill
This skill guides you through implementing web service integrations in B2C Commerce using the Service Framework.
## Overview
The Service Framework provides a structured way to call external services with:
| Feature | Description |
|---------|-------------|
| **Configuration** | Service settings managed in Business Manager |
| **Rate Limiting** | Automatic throttling to protect external systems |
| **Circuit Breaker** | Automatic failure handling to prevent cascade failures |
| **Logging** | Communication logging with sensitive data filtering |
| **Mocking** | Test services without external calls |
## Service Types
| Type | Use Case | Protocol |
|------|----------|----------|
| `HTTP` | REST APIs, webhooks | HTTP/HTTPS |
| `HTTPForm` | Form submissions | HTTP/HTTPS with form encoding |
| `FTP` | File transfers (deprecated) | FTP |
| `SFTP` | Secure file transfers | SFTP |
| `SOAP` | SOAP web services | HTTP/HTTPS with SOAP |
| `GENERIC` | Custom protocols | Any |
## Service Framework Components
### Business Manager Configuration
Services are configured in **Administration > Operations > Services**:
1. **Service Configuration** - General settings (enabled, logging, callbacks)
2. **Service Profile** - Rate limiting and circuit breaker settings
3. **Service Credential** - URL and authentication credentials
### Script Components
| Component | Purpose |
|-----------|---------|
| `LocalServiceRegistry` | Creates service instances |
| `ServiceCallback` | Defines request/response handling |
| `Service` | Base service with common methods |
| `Result` | Response object with status and data |
## Basic Pattern
```javascript
'use strict';
var LocalServiceRegistry = require('dw/svc/LocalServiceRegistry');
var myService = LocalServiceRegistry.createService('my.service.id', {
/**
* Configure the request before it is sent
* @param {dw.svc.HTTPService} svc - The service instance
* @param {Object} params - Parameters passed to ser