Skip to content

[BUG] ... DEV SANDBOX (non-scratch) B2C CRM SYNC DEPLOYMENT ISSUE #281

@RafikTiliouant

Description

@RafikTiliouant

Describe the bug
I can't deploy the package using the "npm run crm-sync:sf:org:deploy" on a personaccounts model using a sandbox (non-scratch org), i'm always facing the same issues at the end of this command :

[
{
"stack": "DeployFailed: Deploy failed. \n at DeployResultFormatter.display (C:\Users\rtiliouant-ext\OneDrive - Lacoste\Documents\Devs\25.05 Release\CSS-1658\b2c-crm-sync-master\node_modules\@salesforce\plugin-source\lib\formatters\deployResultFormatter.js:76:19)\n at Deploy.formatResult (C:\Users\rtiliouant-ext\OneDrive - Lacoste\Documents\Devs\25.05 Release\CSS-1658\b2c-crm-sync-maxt\OneDrive - Lacoste\Documents\Devs\25.05 Release\CSS-1658\b2c-crm-sync-master\node_modules\@salesforce\plugin-source\lib\commands\force\source\deploy.js:36:21)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Deploy._run (C:\Users\rtiliouant-ext\OneDrive - Lacoste\Documents\Devs\25.05 Release\CSS-1658\b2c-crm-sync-master\node_modules\@salesforce\command\lib\sfdxCommand.js:105:40)",
"message": "Deploy failed. ",
"name": "DeployFailed",
"exitCode": 1,
"context": "Deploy"
}
]

Whenever i try to make a force deploy using the sf project deploy start --source-dir "src/sfdc/personaccounts" --ignore-conflicts" to deploy only the personaccounts model, I get these errors related to absent or missing fields (like B2C_Customer_ID__c or B2C_Customer_No__c) that are not in the objects/account file :

│ Type │ Name │ Problem │ Line:Column │├────────────────┼──────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────┼─────────────┤│ CustomObject │ Account │ In field: defaultCompactLayoutAssignment - no │ ││ │ │ CompactLayout named │ ││ │ │ Account.B2C_Account_Compact_Layout found │ ││ QuickAction │ Account.Disable_B2C_Commerce_Event_Auditing │ Required fields are missing: [Component] │ ││ QuickAction │ Account.Disable_B2C_Commerce_Profile_Integration │ Required fields are missing: [Component] │ ││ QuickAction │ Account.Enable_B2C_Commerce_Event_Auditing │ Required fields are missing: [Component] │ ││ QuickAction │ Account.Enable_B2C_Commerce_Profile_Integration │ Required fields are missing: [Component] │ ││ QuickAction │ Account.Publish_to_B2C_Commerce_Profile │ Required fields are missing: [Component] │ ││ QuickAction │ Account.Sync_with_B2C_Commerce_Profile │ Required fields are missing: [Component] │ ││ ApexClass │ B2CAccountManager │ Invalid type: B2CBaseMeta (8:53) │ 8:53 ││ ApexClass │ B2CAccountManager_Test │ Variable does not exist: B2CMetaFieldMappings │ 38:21 ││ │ │ (38:21) │ ││ Flow │ B2CCommerce_QuickAction_PersonAccount_OrderOnBehalfOf │ sub_launchOOBOExperience (Subflow) - The flow │ ││ │ │ B2CCommerce_QuickAction_Contact_OrderOnBehalfOf │ ││ │ │ doesn't exist. │ ││ Flow │ B2CCommerce_QuickAction_PersonAccount_PasswordReset │ sub_launchPasswordResetExperience (Subflow) - The │ ││ │ │ flow B2CCommerce_QuickAction_Contact_PasswordReset │ ││ │ │ doesn't exist. │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Method does not exist or incorrect signature: void │ 23:25 ││ │ │ createSObject(String, Map<String,Object>) from the │ ││ │ │ type TestDataFactory (23:25) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 52:31 ││ │ │ B2CIACustomerResolution_TestHelper (52:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 52:80 ││ │ │ (52:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_Customer_ID__c on Contact │ 56:22 ││ │ │ (56:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (63:9) │ 63:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 75:35 ││ │ │ (75:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (78:13) │ 78:13 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (90:17) │ 90:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 94:13 ││ │ │ ntactFilterMatches (94:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 98:13 ││ │ │ (98:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 101:51 ││ │ │ (101:51) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 129:31 ││ │ │ B2CIACustomerResolution_TestHelper (129:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 129:80 ││ │ │ (129:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_CustomerList_ID__c on │ 133:22 ││ │ │ Contact (133:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_Customer_No__c on Contact │ 133:22 ││ │ │ (133:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (141:9) │ 141:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 153:35 ││ │ │ (153:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult │ 156:13 ││ │ │ (156:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (168:17) │ 168:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 172:13 ││ │ │ ntactFilterMatches (172:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 175:13 ││ │ │ (175:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 178:51 ││ │ │ (178:51) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 204:31 ││ │ │ B2CIACustomerResolution_TestHelper (204:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 204:80 ││ │ │ (204:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_CustomerList_ID__c on │ 208:22 ││ │ │ Contact (208:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (215:9) │ 215:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 227:35 ││ │ │ (227:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult │ 230:13 ││ │ │ (230:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (242:17) │ 242:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 246:13 ││ │ │ ntactFilterMatches (246:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 249:13 ││ │ │ (249:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 252:51 ││ │ │ (252:51) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 280:31 ││ │ │ B2CIACustomerResolution_TestHelper (280:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 280:80 ││ │ │ (280:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_CustomerList_ID__c on │ 284:22 ││ │ │ Contact (284:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_Customer_ID__c on Contact │ 284:22 ││ │ │ (284:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (292:9) │ 292:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 304:35 ││ │ │ (304:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult │ 307:13 ││ │ │ (307:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (319:17) │ 319:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 323:13 ││ │ │ ntactFilterMatches (323:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 326:13 ││ │ │ (326:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 329:51 ││ │ │ (329:51) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 355:31 ││ │ │ B2CIACustomerResolution_TestHelper (355:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 355:80 ││ │ │ (355:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_CustomerList_ID__c on │ 359:22 ││ │ │ Contact (359:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (366:9) │ 366:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 378:35 ││ │ │ (378:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult │ 381:13 ││ │ │ (381:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (393:17) │ 393:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 397:13 ││ │ │ ntactFilterMatches (397:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 400:13 ││ │ │ (400:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 403:51 ││ │ │ (403:51) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: │ 428:31 ││ │ │ B2CIACustomerResolution_TestHelper (428:31) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CConfigurationManager │ 428:80 ││ │ │ (428:80) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Field does not exist: B2C_CustomerList_ID__c on │ 432:22 ││ │ │ Contact (432:22) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult (439:9) │ 439:9 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: B2CIACustomerResolution │ 451:35 ││ │ │ (451:35) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: B2CIACustomerResolutionResult │ 454:13 ││ │ │ (454:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: resolutionResults (466:17) │ 466:17 ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Invalid type: Flow.Interview.B2CCommerce_Process_Co │ 470:13 ││ │ │ ntactFilterMatches (470:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 473:13 ││ │ │ (473:13) │ ││ ApexClass │ B2CIACustomerResolutionPA_Test │ Variable does not exist: contactFilterMatchFlow │ 476:51 ││ │ │ (476:51) │ ││ ApexTrigger │ B2CProcessPersonAccount │ Variable does not exist: B2CConfigurationManager │ 14:33 ││ │ │ (14:33) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Instance__c (26:9) │ 26:9 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_CustomerList__c (27:9) │ 27:9 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2CIAValidateContactInput (28:9) │ 28:9 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2CIAValidateContactResult (29:9) │ 29:9 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Integration_Field_Mappings__mdt │ 30:9 ││ │ │ (30:9) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Integration_Field_Mappings__mdt │ 31:9 ││ │ │ (31:9) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Integration_Field_Mappings__mdt │ 32:9 ││ │ │ (32:9) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Integration_Field_Mappings__mdt │ 33:9 ││ │ │ (33:9) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: │ 36:9 ││ │ │ B2C_Commerce_ProcessCustomerDetails__e (36:9) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CMetaFieldMappings │ 39:32 ││ │ │ (39:32) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CMetaFieldMappings │ 40:25 ││ │ │ (40:25) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: fieldMappings (43:13) │ 43:13 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_Instance__c (46:27) │ 46:27 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: B2C_CustomerList__c (47:31) │ 47:31 ││ ApexClass │ B2CProcessPersonAccountHelper │ Invalid type: │ 50:28 ││ │ │ B2C_Commerce_ProcessCustomerDetails__e (50:28) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: │ 65:38 ││ │ │ Updated_by_B2C_Platform_Event__pc (65:38) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: │ 68:38 ││ │ │ Updated_by_B2C_Platform_Event__pc (68:38) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_CustomerList__pc │ 76:38 ││ │ │ (76:38) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Customer_No__pc │ 76:87 ││ │ │ (76:87) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 79:31 ││ │ │ (79:31) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Instance__pc (79:90) │ 79:90 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 80:35 ││ │ │ (80:35) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_CustomerList__pc │ 80:98 ││ │ │ (80:98) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Disable_Integration__c │ 90:33 ││ │ │ (90:33) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: │ 90:79 ││ │ │ B2C_Disable_Integration__pc (90:79) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: │ 91:33 ││ │ │ Audit_OCAPI_API_Response__c (91:33) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: │ 91:80 ││ │ │ Audit_OCAPI_API_Response__pc (91:80) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Customer_No__c (92:33) │ 92:33 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Customer_No__pc │ 92:71 ││ │ │ (92:71) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 95:40 ││ │ │ (95:40) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: instanceMap (96:25) │ 96:25 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_Instance__pc (96:58) │ 96:58 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: customerListMap (97:25) │ 97:25 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2C_CustomerList__pc │ 97:62 ││ │ │ (97:62) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 100:41 ││ │ │ (100:41) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: validateContactResult │ 103:21 ││ │ │ (103:21) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 106:40 ││ │ │ (106:40) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: updatedFieldMappings │ 109:21 ││ │ │ (109:21) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CMetaFieldMappings │ 112:44 ││ │ │ (112:44) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CContactManager (118:38) │ 118:38 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: peCollection (122:21) │ 122:21 ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: B2CProcessContactHelper │ 122:38 ││ │ │ (122:38) │ ││ ApexClass │ B2CProcessPersonAccountHelper │ Variable does not exist: peCollection (129:17) │ 129:17 ││ ApexClass │ B2CProcessPersonAccountHelper │ Method does not exist or incorrect signature: void │ 129:53 ││ │ │ publish(List<B2C_Commerce_ProcessCustomerDetails__e │ ││ │ │ >) from the type EventBus (129:53) │ ││ ApexClass │ B2CProcessPersonAccount_Test │ Invalid type: B2C_CustomerList__c (23:9) │ 23:9 ││ ApexClass │ B2CProcessPersonAccount_Test │ Field does not exist: B2C_CustomerList__pc on │ 33:21 ││ │ │ Account (33:21) │ ││ ApexClass │ B2CProcessPersonAccount_Test │ Field does not exist: B2C_Customer_No__pc on │ 33:21 ││ │ │ Account (33:21) │ ││ ApexClass │ B2CProcessPersonAccount_Test │ Field does not exist: B2C_Disable_Integration__pc │ 33:21 ││ │ │ on Account (33:21) │ ││ FlexiPage │ B2C_Account_Record_Page │ Field B2C_CustomerList__pr does not exist. Check │ ││ │ │ spelling. │ ││ CustomMetadata │ B2C_CRMSync_Setting.Default_Configuration │ Custom metadata type B2C_CRMSync_Setting__mdt is │ ││ │ │ not available in this organization. │ ││ Flow │ B2C_Commerce_B2C_Customer_Address_View_Address_Book_Accounts │ Launch_the_View_Address_Book_Contacts_flow │ ││ │ │ (Subflow) - The flow B2C_Commerce_B2C_Customer_Addr │ ││ │ │ ess_View_Address_Book_Contacts doesn't exist. │ ││ MatchingRule │ Contact.B2C_Commerce_Standard_Contacts │ The following fields are invalid: │ 3:20 ││ │ │ B2C_Customer_ID__c. (3:20) │ ││ Layout │ PersonAccount-B2C%3A Person Account %28Support%29 Layout │ In field: field - no CustomField named │ 108:26 ││ │ │ PersonAccount.B2C_CustomerList__pc found (108:26) │ ││ MatchingRule │ PersonAccount.B2C_Commerce_Standard_Person_Account │ The following fields are invalid: │ 3:20 ││ │ │ B2C_Customer_ID__pc. (3:20) │ ││ CompactLayout │ PersonAccount.B2C_PersonAccount_Compact_Layout │ In field: B2C_CustomerList__pc - no CustomField │ 7:21 ││ │ │ named PersonAccount.B2C_CustomerList__pc found │ ││ │ │ (7:21) │

To Reproduce
Steps to reproduce the behavior:
After running the "npm run crm-sync:b2c:verify", i'm trying to deploy using npm run crm-sync:sf:org:deploy

Even when I try a force deply using : sf project deploy start --source-dir "src/sfdc/personaccounts" --ignore-conflicts, i'm getting an error related to missing components (like fields or flows that are not even in the github project).

Expected behavior
A full deployment of the B2C CRM SYNC

Screenshots
If applicable, add screenshots to help explain your problem.

Your local environment details:

  • Node version (node -v): [v22.14.0]
  • NPM version (npm -v) [v10.9.2]
  • SFDX version (sfdx -v) [@salesforce/cli/2.76.7 win32-x64 node-v22.13.1]

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions