0

I get the error when creating the scratch org:

Commerce.settings Not available for deploy for this API version

I'm using a Dev Hub based on an org that has B2B Commerce on Lightning Experience and I'm able to create a sandbox but not a scratch org. I would like to use scratch org to serve as a container for some projects. I'm also using the latest SFDX and the project is set to v52.

Is there some permission or setup that I am missing. Or could it be unsupported as of yet?

Here it is the scratch org definition file (based on b2b-commerce-on-lightning-quickstart):

{
  "orgName": "Jeferson B2B Company",
  "edition": "Developer",
  "features": ["Communities", "B2BCommerce", "OrderManagement", "EnableSetPasswordInApi"],
  "settings": { 
    "lightningExperienceSettings": {
          "enableS1DesktopEnabled": true
      },
      "experienceBundleSettings": {
        "enableExperienceBundleMetadata": true
      },
      "communitiesSettings": {
        "enableNetworksEnabled": true
      },
      "orderManagementSettings": {
        "enableOrderManagement": true
      },
      "orderSettings": {
        "enableOrders": true,
        "enableEnhancedCommerceOrders": true,
        "enableOptionalPricebook": true
      },
      "commerceSettings": {
        "commerceEnabled": true
      }
  }
} 

1 Answer 1

1

The solution is fairly simple: Define the APIVersion as part of the scratch org creation. --apiversion 54.0 Example:

sfdx force:org:create -f config/project-scratch-def-b2b.json -a ci_scratch -s -d 1 --apiversion 54.0
1
  • Thanks Johann, interesting quirk. I wonder why it is not using the API version of the project but fair enough. Commented Feb 17, 2022 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .