Skip to content

Commit 59f6748

Browse files
committed
skill nits
1 parent 490ec07 commit 59f6748

3 files changed

Lines changed: 65 additions & 0 deletions

File tree

plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ b2c job import ./my-import --wait
193193

194194
```
195195
site-archive/
196+
├── services.xml # Service configurations (credentials, profiles, services)
196197
├── meta/
197198
│ ├── system-objecttype-extensions.xml # Custom attributes on system objects
198199
│ └── custom-objecttype-definitions.xml # Custom object type definitions
@@ -238,6 +239,27 @@ b2c job import ./my-data --wait --show-log
238239
4. **Keep archives organized** by feature or change type
239240
5. **Version control your metadata** XML files
240241

242+
### Configuring External Services
243+
244+
For service configurations (HTTP, FTP, SOAP services), see the `b2c:b2c-webservices` skill which includes:
245+
- Complete services.xml examples
246+
- Credential, profile, and service element patterns
247+
- Import/export workflows
248+
249+
Quick example:
250+
```bash
251+
# Import service configuration
252+
b2c job import ./services-folder
253+
```
254+
255+
Where `services-folder/services.xml` follows the patterns in the `b2c:b2c-webservices` skill.
256+
241257
## Detailed Reference
242258

243259
- [Metadata XML Patterns](references/METADATA-XML.md) - Common XML patterns for imports
260+
261+
## Related Skills
262+
263+
- `b2c:b2c-webservices` - Service configurations (HTTP, FTP, SOAP), services.xml format
264+
- `b2c:b2c-metadata` - System object extensions and custom object definitions
265+
- `b2c-cli:b2c-job` - Running jobs and monitoring import status

plugins/b2c-cli/skills/b2c-site-import-export/references/METADATA-XML.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ b2c docs schema metadata
1414
b2c docs schema --list
1515
```
1616

17+
## Other Import Formats
18+
19+
For service configurations (HTTP services, credentials, profiles), see the `b2c:b2c-webservices` skill.
20+
1721
## System Object Extensions
1822

1923
### Add String Attribute to Product

plugins/b2c/skills/b2c-custom-api-development/SKILL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,45 @@ To query the Custom API status report, use an Account Manager token with scope:
308308
- HEAD
309309
- OPTIONS
310310

311+
## External Service Configuration
312+
313+
When your Custom API calls external services via `LocalServiceRegistry.createService()`, you must configure the service in Business Manager or import it via site archive.
314+
315+
See the `b2c:b2c-webservices` skill for:
316+
- Service configuration patterns
317+
- Services XML import format (credentials, profiles, services)
318+
- HTTP, FTP, and SOAP service examples
319+
320+
### Calling External Services
321+
322+
```javascript
323+
var LocalServiceRegistry = require('dw/svc/LocalServiceRegistry');
324+
325+
var service = LocalServiceRegistry.createService('my.external.api', {
326+
createRequest: function(svc, args) {
327+
svc.setRequestMethod('GET');
328+
svc.addHeader('Authorization', 'Bearer ' + args.token);
329+
return null;
330+
},
331+
parseResponse: function(svc, client) {
332+
return JSON.parse(client.text);
333+
}
334+
});
335+
336+
var result = service.call({ token: 'my-token' });
337+
```
338+
339+
### Quick Reference
340+
341+
To import a service configuration:
342+
1. Create `services.xml` following the `b2c:b2c-webservices` skill patterns
343+
2. Import: `b2c job import ./my-services-folder`
344+
345+
## Related Skills
346+
347+
- `b2c:b2c-webservices` - Service configuration, HTTP/FTP/SOAP clients, services.xml format
348+
- `b2c-cli:b2c-job` - Running jobs and importing site archives
349+
311350
## Limitations
312351

313352
- Maximum 50 remote includes per request

0 commit comments

Comments
 (0)