b2c-metadata_skill

This skill helps you define and manage B2C Commerce site metadata XML for custom attributes, objects, and site preferences.
  • TypeScript

20

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill salesforcecommercecloud/b2c-developer-tooling --skill b2c-metadata

  • SKILL.md14.6 KB

Overview

This skill helps you author, validate, and apply Salesforce B2C Commerce metadata XML for custom attributes, custom object types, and site preferences. It focuses on the two primary files—system-objecttype-extensions.xml and custom-objecttype-definitions.xml—and the site preferences XML used inside a site archive. Use this to standardize data shape, expose new Business Manager controls, and configure per-instance settings.

How this skill works

The skill inspects and generates the XML structures B2C Commerce expects: type-extension blocks to add custom attributes to system objects (Products, Orders, Profiles, SitePreferences), custom-type blocks to define new object types, and preferences XML to set site-specific values per instance. It validates attribute types, enum value-definitions, flags (mandatory, localizable, externally-managed, etc.), grouping, and storage/staging options before producing or checking the site-archive layout.

When to use it

  • Adding new custom attributes to products, orders, customers, content, or site preferences.
  • Creating a new custom object type (site-scoped or global) such as store locations or loyalty records.
  • Preparing a site archive for import to Business Manager or CI pipelines.
  • Defining enum values, multi-select sets, or attribute display/grouping for Business Manager UX.
  • Setting environment-specific configuration via preferences.xml for dev/staging/production.

Best practices

  • Keep attribute-ids lowercase, hyphen/underscore free where possible and consistent with API usage.
  • Use value-definitions for enums with stable stored values (lowercase, no spaces) and clear display labels.
  • Set externally-managed-flag for attributes populated by integrations to prevent Business Manager edits.
  • Group related attributes with group-definitions to improve Business Manager usability.
  • Version metadata files in source control and apply via CI to avoid drift across instances.

Example use cases

  • Add a vendorSKU string and productCondition enum to Product via system-objecttype-extensions.xml.
  • Define a StoreLocations custom-type with storeId key, coordinates, phone, and isActive flag.
  • Expose API endpoint and feature toggles as SitePreferences attributes and set values per environment.
  • Create a multi-select productFeatures attribute (set-of-string) for filtered faceting and tagging.
  • Mark attributes as externally-managed when a PIM or ERP system is the single source of truth.

FAQ

Place per-site preferences in sites/MySite/preferences.xml using environment sections (development, staging, production) or all-instances.

How do I define dropdown values for enums?

Use value-definitions with value (stored key, lowercase, no spaces) and display (human label) inside the attribute-definition.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
b2c-metadata skill by salesforcecommercecloud/b2c-developer-tooling | VeilStrat