b2c-custom-objects
Store and query custom business data using CustomObjectMgr, OCAPI Data API, and Shopper Custom Objects API. Use this skill whenever the user needs to create, read, update, or search custom object instances, build processing queues with status fields, choose between site-scoped and organization-scoped storage, or query custom objects with bool/term filters. Also use when persisting non-standard data -- even if they just say 'store config per site' or 'query my custom data'.
What this skill does
# B2C Custom Objects
Custom objects store business data that doesn't fit into standard system objects. They support both site-scoped and organization-scoped (global) data, with full CRUD operations via Script API and OCAPI.
## When to Use Custom Objects
| Use Case | Example |
|----------|---------|
| Business configuration | Store configuration per site or globally |
| Integration data | Cache external system responses |
| Custom entities | Loyalty tiers, custom promotions, vendor data |
| Temporary processing | Job processing queues, import staging |
## Custom Object Types
Custom objects are defined in Business Manager under **Administration > Site Development > Custom Object Types**. Each type has:
- **ID**: Unique identifier (e.g., `CustomConfig`)
- **Key Attribute**: Primary key field for lookups
- **Attributes**: Custom attributes for data storage
- **Scope**: Site-scoped or organization-scoped (global)
## Script API (CustomObjectMgr)
### Getting Custom Objects
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
// Get a single custom object by type and key
var config = CustomObjectMgr.getCustomObject('CustomConfig', 'myConfigKey');
if (config) {
var value = config.custom.configValue;
}
```
### Creating Custom Objects
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
var Transaction = require('dw/system/Transaction');
Transaction.wrap(function() {
// Create new custom object (type, keyValue)
var obj = CustomObjectMgr.createCustomObject('CustomConfig', 'newKey');
obj.custom.configValue = 'myValue';
obj.custom.isActive = true;
});
```
### Querying Custom Objects
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
// Query with attribute filter
var objects = CustomObjectMgr.queryCustomObjects(
'CustomConfig', // Type
'custom.isActive = {0}', // Query (uses positional params)
'creationDate desc', // Sort order
true // Parameter value for {0}
);
while (objects.hasNext()) {
var obj = objects.next();
// Process object
}
objects.close();
```
### Deleting Custom Objects
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
var Transaction = require('dw/system/Transaction');
Transaction.wrap(function() {
var obj = CustomObjectMgr.getCustomObject('CustomConfig', 'keyToDelete');
if (obj) {
CustomObjectMgr.remove(obj);
}
});
```
### Getting All Objects of a Type
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
// Get all objects of a type
var allConfigs = CustomObjectMgr.getAllCustomObjects('CustomConfig');
while (allConfigs.hasNext()) {
var config = allConfigs.next();
// Process
}
allConfigs.close();
```
## CustomObjectMgr API Reference
| Method | Description |
|--------|-------------|
| `getCustomObject(type, keyValue)` | Get single object by type and key |
| `createCustomObject(type, keyValue)` | Create new object (within transaction) |
| `remove(object)` | Delete object (within transaction) |
| `queryCustomObjects(type, query, sortString, ...args)` | Query with filters |
| `getAllCustomObjects(type)` | Get all objects of a type |
| `describe(type)` | Get metadata about the custom object type |
## OCAPI Data API
### Get Custom Object
```http
GET /s/-/dw/data/v25_6/custom_objects/{object_type}/{key}
Authorization: Bearer {token}
```
**Note:** Use `/s/{site_id}/dw/data/v25_6/custom_objects/...` for site-scoped objects, or `/s/-/dw/data/v25_6/custom_objects/...` for organization-scoped (global) objects.
### Create Custom Object
```http
PUT /s/-/dw/data/v25_6/custom_objects/{object_type}/{key}
Authorization: Bearer {token}
Content-Type: application/json
{
"key_property": "myKey",
"c_configValue": "myValue",
"c_isActive": true
}
```
### Update Custom Object
```http
PATCH /s/-/dw/data/v25_6/custom_objects/{object_type}/{key}
Authorization: Bearer {token}
Content-Type: application/json
{
"c_configValue": "updatedValue"
}
```
### Delete Custom Object
```http
DELETE /s/-/dw/data/v25_6/custom_objects/{object_type}/{key}
Authorization: Bearer {token}
```
### Search Custom Objects
```http
POST /s/-/dw/data/v25_6/custom_object_search/{object_type}
Authorization: Bearer {token}
Content-Type: application/json
{
"query": {
"bool_query": {
"must": [
{ "term_query": { "field": "c_isActive", "value": true } }
]
}
},
"select": "(**)",
"sorts": [{ "field": "creation_date", "sort_order": "desc" }],
"start": 0,
"count": 25
}
```
### Search Query Types
| Query Type | Description | Example |
|------------|-------------|---------|
| `term_query` | Exact match | `{"field": "c_status", "value": "active"}` |
| `text_query` | Full-text search | `{"fields": ["c_name"], "search_phrase": "test"}` |
| `range_query` | Range comparison | `{"field": "c_count", "from": 1, "to": 10}` |
| `bool_query` | Combine queries | `{"must": [...], "should": [...], "must_not": [...]}` |
| `match_all_query` | Match all records | `{}` |
## Shopper Custom Objects API (SCAPI)
For read-only access from storefronts, use the Shopper Custom Objects API. This requires specific OAuth scopes.
### Get Custom Object (Shopper)
```http
GET https://{shortCode}.api.commercecloud.salesforce.com/custom-object/shopper-custom-objects/v1/organizations/{organizationId}/custom-objects/{objectType}/{key}?siteId={siteId}
Authorization: Bearer {shopper_token}
```
### Required Scopes
For the Shopper Custom Objects API, configure these scopes in your SLAS client:
- `sfcc.shopper-custom-objects` - Global read access to all custom object types
- `sfcc.shopper-custom-objects.{objectType}` - Type-specific read access
**Note:** SLAS clients can have a maximum of 20 custom object scopes.
The custom object type must also be enabled for shopper access in Business Manager.
### Searchable System Fields
All custom objects have these system fields available for OCAPI search queries:
- `creation_date` - When the object was created (Date)
- `last_modified` - When the object was last modified (Date)
- `key_value_string` - String key value
- `key_value_integer` - Integer key value
- `site_id` - Site identifier (for site-scoped objects)
## Best Practices
### Do
- Use transactions for create/update/delete operations
- Close query iterators when done (`objects.close()`)
- Use meaningful key values for efficient lookups
- Index frequently queried attributes
- Use site-scoped objects for site-specific data
- Use organization-scoped objects for shared configuration
### Don't
- Store sensitive data without encryption
- Create excessive custom object types
- Use custom objects for high-volume transactional data
- Forget to handle null returns from `getCustomObject()`
- Leave query iterators open (causes resource leaks)
## Common Patterns
### Configuration Store
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
var Site = require('dw/system/Site');
function getConfig(key, defaultValue) {
var configKey = Site.current.ID + '_' + key;
var obj = CustomObjectMgr.getCustomObject('SiteConfig', configKey);
if (obj && obj.custom.value !== null) {
return JSON.parse(obj.custom.value);
}
return defaultValue;
}
function setConfig(key, value) {
var Transaction = require('dw/system/Transaction');
var configKey = Site.current.ID + '_' + key;
Transaction.wrap(function() {
var obj = CustomObjectMgr.getCustomObject('SiteConfig', configKey);
if (!obj) {
obj = CustomObjectMgr.createCustomObject('SiteConfig', configKey);
}
obj.custom.value = JSON.stringify(value);
});
}
```
### Processing Queue
```javascript
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
var Transaction = require('dw/system/Transaction');
// Add to queue
function enqueueRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.