Loading...
Loading...
Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention "integrate open code components", "open source B2B commerce", "add open code components", "forcedotcom/b2b-commerce-open-source-components", or want to add open source commerce components to their store. Copies all components and labels so they become available in Experience Builder.
npx skill4agent add forcedotcom/sf-skills integrating-b2b-commerce-open-code-componentssfdx-project.jsonpackageDirectories[]"default": true<package-dir>sfdx-project.jsonpackageDirectories.tmp/b2b-commerce-open-source-components.tmp/git clone https://github.com/forcedotcom/b2b-commerce-open-source-components .tmp/b2b-commerce-open-source-componentsforce-app/main/default/sfdc_cms__lwcsfdc_cms__label"Open source repository is already cloned. How would you like to proceed?"
- Reuse existing — Use the already cloned repository
- Re-clone — Remove and clone fresh from GitHub
<package-dir>/main/default/digitalExperiences/site/sf org listsf config get target-orgDigitalExperienceBundlesf org list metadata --metadata-type DigitalExperienceBundle --target-org <alias>site/*sf project retrieve start --metadata "DigitalExperienceBundle:site/<storeName>" --target-org <alias><package-dir>/main/default/digitalExperiences/site/<storeName>/force-appfullNameMy_B2B_Store1<package-dir>/main/default/digitalExperiences/site/<store-name>/.tmp/b2b-commerce-open-source-components/.tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/*sfdc_cms__label/*force-app<package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__lwc/sfdc_cms__label/<package-dir>"Components already exist in {store-name}. How would you like to proceed?"
- Overwrite all — Replace all existing components with latest from repo
- Copy only new — Skip existing components, copy only ones not yet present
✅ Integration Complete!
Copied: X components and Y label sets to <store-name>
Next Steps:
1. Deploy: sf project deploy start -d <package-dir>/main/default/digitalExperiences/site/<store-name>
2. Open Experience Builder and use new components from the palette
3. Publish your site when ready"Open source repository is already cloned. How would you like to proceed?"
- Reuse existing — Use the already cloned repository
- Re-clone — Remove and clone fresh from GitHub
"Components already exist in My_B2B_Store1. How would you like to proceed?"
- Overwrite all — Replace all existing components with latest from repo
- Copy only new — Skip existing components, copy only ones not yet present
✅ Integration Complete!
Copied: 45 components and 38 label sets to My_B2B_Store1
Next Steps:
1. Deploy: sf project deploy start -d force-app/main/default/digitalExperiences/site/My_B2B_Store1
2. Open Experience Builder and use new components from the palette
3. Publish your site when ready| Error | Message | Action |
|---|---|---|
| Store not found | "Store '{name}' not found in org." | List stores again |
| Git clone failed | "Failed to clone repository. Check internet connection." | Retry or abort |
| Invalid repo structure | "Repository structure has changed. Expected sfdc_cms__lwc and sfdc_cms__label." | Warn user, abort |
| File copy failed | "Failed to copy files. Check file permissions." | Show error details |
sfdc_cms__lwc/sfdc_cms__label/