Giter VIP home page Giter VIP logo

salesforcecommercecloud / b2c-crm-sync Goto Github PK

View Code? Open in Web Editor NEW
65.0 22.0 45.0 22.54 MB

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.

Home Page: https://salesforcecommercecloud.github.io/b2c-crm-sync/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 55.07% Apex 44.46% HTML 0.47% CSS 0.01%
integration salesforce apex flow b2c commerce sfcc-cartridge order-management service-cloud demandware

b2c-crm-sync's Issues

Address Book Sync without using Salesforce Connect

Is your feature request related to a problem? Please describe.
The problem here is that the only way, by using b2c-crm-sync, to sync b2c address book is to subscribe with the Salesforce Connect licence.

Describe the solution you'd like
A new way to sync this data would be to create custom LWC that renders the address book and allow the core users to view and edit addresses.

[BUG] MAJOR ISSUE IN PRODUCTION: Session been shared in multiple PCs with OOBO

Describe the bug
A clear and concise description of what the bug is.

We have integrated every cartridge on the b2c-crm-sync. We have some agents that are working in production and they are using OOBO normally, but if I'm on the website as a guest I'm able to see the red banner at the top and I'm not even an agent. This only happens in one page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Search-Show page
  2. It will appear the Red Banner at the top from other customers.

Expected behavior
It shouldn't appear customer information in other customers PCs.

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

redbanner
Your local environment details:

  • Node version (node -v): -> v14.17.6
  • NPM version (npm -v) -> 8.1.0
  • SFDX version (sfdx -v) -> sfdx-cli/7.118.1 win32-x64 node-v14.17.6

Additional context
This is happening in Production so this is a major issue. Are you able to join to a call?

redbanner
.

IndividualId.field-meta.xml in objects/Contact/fields may stop installation

Discussed in #44

Originally posted by tzarrsf October 19, 2021
A partner reached out to me with a concern that an update may be required for installation to complete.

He walked me through it indicating that the IndividualId.field-meta.xml in the path master/src/sfdc/base/main/default/objects/Contact/fields may result in errors when the node script is run and installation cannot proceed until an update is made.

I'll carve out some time to take a look at this and post additional details.

Extract the Public Key from the KeyStore Failed

Describe the bug
Extract the Public Key from the KeyStore Failed.

Step 21: npm run crm-sync:sf:cert:publickey:get

Error:
image

I was only able to pass from this issue if I migrate to PKS12 by running this: keytool -importkeystore -srckeystore 00D5f000007Fvkx.jks -destkeystore 00D5f000007Fvkx.jks -deststoretype pkcs12
image

after this if I ran the npm run crm-sync:cert:publickey:get I get a success message

image

but when I tried to validate the retrieve of the AuthToken it fail. So I don't know if my fix was correct.
image

And if I try to import the new .jks file to Salesforce it will ail saying it's corrupted.
image

Expected behavior
Have the extract public key running successfully and the validation too.

Your local environment details:

Node version (node -v): 15.2.1
NPM version (npm -v): 7.24.2s
SFDX version (sfdx -v): sfdx-cli/7.118.1 win32-x86 node-v14.17.6
Your remote environment details:

Salesforce B2C Commerce version: 21.3
Salesforce Core version: [e.g. 52]

Additional context
Add any other context about the problem here.

Multi-cloud unit-tests command failed

After running npm run crm-sync:test:use-cases tests following results are received:

 0 passing (1m)
 8 failing

 1) Authenticating a B2C Customer Profile via the OCAPI Shop API
      "before all" hook for "does not create a SFDC Contact when b2c-crm-sync is disabled for a storefront":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/b2c/authentication.live.test.js:107:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 2) Registering a new B2C Customer Profile via the OCAPI Shop API
      "before all" hook for "does not create a SFDC Contact when b2c-crm-sync is disabled for a storefront":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/b2c/customerRegistration.live.test.js:101:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 3) Progressive resolution B2C Commerce Customer creation scenarios via the B2CContactProcess API
      "before all" hook for "creates a Contact from a B2C CustomerList ID and Email attribute combination":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.create.live.test.js:106:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 4) Progressive resolution of a B2C Commerce Customer error scenarios via the B2CContactProcess API
      "before all" hook for "returns an error if non-identifiers are used without a B2C CustomerList for resolution via the B2CContactProcess service":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.errors.live.test.js:104:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 5) Progressive resolution of a B2C Commerce Customer via the B2CContactProcess API
      "before all" hook for "resolves an existing Contact using LastName and Email -- where the existing Contact does not have a B2C CustomerList":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.resolve.live.test.js:107:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 6) Progressive resolution of a B2C Commerce Customer via the B2CContactProcess API
      "after all" hook for "returns an error when multiple records are resolved by B2C CustomerList and CustomerNo":
    DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at HttpApi.getError (node_modules/jsforce/lib/http-api.js:250:13)
     at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/jsforce/lib/http-api.js:95:22
     at tryCallOne (node_modules/promise/lib/core.js:37:12)
     at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/promise/lib/core.js:123:15
     at flush (node_modules/asap/raw.js:50:29)
     at processTicksAndRejections (internal/process/task_queues.js:77:11)

 7) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
      "before all" hook for "allows direct updates by B2C CustomerList, Email, and LastName":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:103:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

 8) Updating an SFDC Contact representing a B2C Commerce Customer Profile from within SFDC
      "before all" hook for "successfully updates a B2C Commerce Profile with changes initiated from SFDC when integration is enabled":
    Error: DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

     at Context.<anonymous> (test/_use-cases/sfdc/b2cCustomerProfileUpdate.live.test.js:98:19)
     at processTicksAndRejections (internal/process/task_queues.js:95:5)

All 8 use-cases throw the same error:

     DELETE_FAILED: Your attempt to delete Unknown Customer could not be completed because it is associated with the following orders.: 00000216, 00000219
Your attempt to delete Unknown Customer could not be completed because it is associated with the following active orders.: 00000216, 00000219

Unable to authenticate against the Salesforce instance; please verify your configuration properties

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Your local environment details:

  • Node version (node -v): [e.g. v14.17.5]
  • NPM version (npm -v) [e.g. v6.14.14]
  • SFDX version (sfdx -v) [e.g. sfdx-cli/7.115.1 darwin-x64 node-v14.17.1]

Your remote environment details:

  • Salesforce B2C Commerce version: [e.g. 21.10]
  • Salesforce Core version: [e.g. 52]

Additional context
Add any other context about the problem here.

Error with Validating OOBO User Credentials

Getting Below error
{
error: 'unauthorized_client',
error_description: "Client id 'XXXXXXXXXXXX' has invalid credentials to use grant type 'urn:demandware:params:oauth:grant-type:client-id:dwsid:dwsecuretoken'."
}

I have checked into the code(repos/b2c-crm-sync/lib/_common/request/_createOCAPIAuthRequestDef.js) and found difference in passing the Authorization.
Below is the code
unEncodedPassword = ${environmentDef.b2cUsername}:${environmentDef.b2cAccessKey}:${environmentDef.b2cClientSecret};

But as per https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FOCAPI%2Fcurrent%2Fusage%2FOAuth.html it should be

User Login:User Password:Client Password

Multi-cloud unit-tests command failed

After running npm run crm-sync:test:use-cases tests following results are received:

  0 passing (55s)
  14 failing

  1) Authenticating a B2C Customer Profile via the OCAPI Shop API
       "before all" hook for "does not create a SFDC Contact when b2c-crm-sync is disabled for a storefront":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/b2c/authentication.live.test.js:107:19)

  2) Authenticating a B2C Customer Profile via the OCAPI Shop API
       "after all" hook for "does not allow updates to a SFDC Contact with sync-customers is disabled":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

  3) Registering a new B2C Customer Profile via the OCAPI Shop API
       "before all" hook for "does not create a SFDC Contact when b2c-crm-sync is disabled for a storefront":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/b2c/customerRegistration.live.test.js:101:19)

  4) Registering a new B2C Customer Profile via the OCAPI Shop API
       "after all" hook for "does not allow updates to SFDC Contact via B2C Commerce when sync-customers is disabled":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

  5) Progressive resolution B2C Commerce Customer creation scenarios via the B2CContactProcess API
       "before all" hook for "creates a Contact from a B2C CustomerList ID and Email attribute combination":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.create.live.test.js:106:19)

  6) Progressive resolution B2C Commerce Customer creation scenarios via the B2CContactProcess API
       "after all" hook for "creates a new contact when multiple Contacts are resolved by Email and LastName without a B2C CustomerList":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

  7) Progressive resolution of a B2C Commerce Customer error scenarios via the B2CContactProcess API
       "before all" hook for "returns an error if non-identifiers are used without a B2C CustomerList for resolution via the B2CContactProcess service":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.errors.live.test.js:104:19)

  8) Progressive resolution of a B2C Commerce Customer error scenarios via the B2CContactProcess API
       "after all" hook for "returns an error if a validated Contact has integration disabled":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

  9) Progressive resolution of a B2C Commerce Customer via the B2CContactProcess API
       "before all" hook for "resolves an existing Contact using LastName and Email -- where the existing Contact does not have a B2C CustomerList":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.resolve.live.test.js:107:19)

  10) Progressive resolution of a B2C Commerce Customer via the B2CContactProcess API
       "after all" hook for "returns an error when multiple records are resolved by B2C CustomerList and CustomerNo":
     TypeError: Cannot read property 'conn' of undefined
      at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.resolve.live.test.js:666:92)
      at processImmediate (internal/timers.js:464:21)

  11) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       "before all" hook for "allows direct updates by B2C CustomerList, Email, and LastName":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:103:19)

  12) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       "after all" hook for "allows direct updates by ContactID":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

  13) Updating an SFDC Contact representing a B2C Commerce Customer Profile from within SFDC
       "before all" hook for "successfully updates a B2C Commerce Profile with changes initiated from SFDC when integration is enabled":
     Error: TypeError: Parameter client_id missing or not of type String
      at Context.<anonymous> (test/_use-cases/sfdc/b2cCustomerProfileUpdate.live.test.js:98:19)

  14) Updating an SFDC Contact representing a B2C Commerce Customer Profile from within SFDC
       "after all" hook for "does not process updates to a B2C Commerce Profile with changes initiated from SFDC when integration is disabled":
     Error: getaddrinfo ENOTFOUND undefined
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)

FYI it is the same instance that on weekend had only 5 failing tests as per >> this << reported issue and no changes have been done to end instances. The only change was introduced multiple environments via folder tree as per recommendations under >> this << ticket.

High Vulnerabilities found -

When running npm install step, it reported 76 vulnerabilities (2 low, 69 moderate, 5 high). Is it normal ? I ran npm audit fix. The number and type of vulnerabilities remained same.
I went ahead with the deployment instructions but in step 14 (Deploy the b2c-crm-sync Application Code to Your Salesforce Org) , deployment fails :

npm run crm-sync:sf:org:deploy
....

-- deploying the base meta-data to the specified Salesforce Org; please standby
,----------------------------------------------------------------------.
| |
| |
| 88888888888 88 |
| 88 88 |
| 88 88 |
| 88aaaaa 8b,dPPYba, 8b,dPPYba, ,adPPYba, 8b,dPPYba, 88 |
| 88"“”"” 88P’ “Y8 88P’ “Y8 a8” “8a 88P’ “Y8 88 |
| 88 88 88 8b d8 88 “” |
| 88 88 88 “8a, ,a8" 88 aa |
| 88888888888 88 88 “YbbdP”' 88 88 | | | | | | Oh no! Not one of these :( | | | | It looks like you’ve run into an error or exception. | | Please log an issue via | | https://github.com/SalesforceCommerceCloud/b2c-crm-sync/issues. | | That’s the best way to engage us. Thank you for your support! | | | ----------------------------------------------------------------------'
[
{
“stack”: “DeployFailed: Deploy failed.\n at DeployResultFormatter.display (/Users/neeraj.jain/b2c-crm-sync-master/node_modules/@salesforce/plugin-source/lib/formatters/deployResultFormatter.js:61:19)\n at Deploy.formatResult (/Users/neeraj.jain/b2c-crm-sync-master/node_modules/@salesforce/plugin-source/lib/commands/force/source/deploy.js:127:23)\n at Deploy.run (/Users/neeraj.jain/b2c-crm-sync-master/node_modules/@salesforce/plugin-source/lib/commands/force/source/deploy.js:40:21)\n at processTicksAndRejections (node:internal/process/task_queues:93:5)\n at async Deploy._run (/Users/neeraj.jain/b2c-crm-sync-master/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)“,
“message”: “Deploy failed.“,
“name”: “DeployFailed”,
“exitCode”: 1,
“commandName”: “Deploy”,
“code”: “Error”
}
]

Thanks
Neeraj

Deploy Code Version from CLI failing

Describe the bug

500 Error when trying to create code version

To Reproduce

Follow instructions and create all OCAPI and Webdav config including creating a new API key

Run the following command

npm run crm-sync:test:cli

Output

Creating a Specific Code Version via the CLI
✓ returns true if the code-version was created
✓ returns false if the code-version was not created
-- Error: Request failed with status code 500
-- Retrying request | attempt 1 of 3
-- Error: Request failed with status code 500
-- Retrying request | attempt 2 of 3

Expected behavior

Test should pass without 500 error or have more explanation of what to fix. Setup configuration on multiple sandboxes with multiple API keys and have same results.

Following tests all pass before this error

Calculating the Deployment Path
✓ successfully calculates the deploy path for b2c cartridges

Setting-Up the B2C Deployment Folders
✓ successfully creates the expected deployment folders

Verifying and Creating Deployment Folders
✓ successfully verifies the target directory in the file system
✓ successfully verifies and removes a directory with sub-directories
✓ throws an error if a path to process is not defined

Zipping / Archiving a Specific Directory
✓ successfully generates an archive from a source directory
✓ successfully returns an error if any issues occur when creating the zip-archive

Building OCAPI Urls
✓ successfully creates the getSite Shop Url
✓ successfully creates the getSite Data Url

Authentication via SFCC-CI
✓ succeeds when valid credentials are provided
✓ fails when invalid credentials are provided

Activating a specific Code Version via SFCC-CI
✓ returns true if the code-version was activated
✓ returns false if the code-version was not activated
✓ gracefully fails when an error occurs activating a code version

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

Your local environment details:

  • Node version v14.18.3
  • NPM version 6.14.15
  • SFDX version sfdx-cli/7.132.0 darwin-x64 node-v16.13.1

Your remote environment details:

  • Salesforce B2C Commerce version: 22.1 compat 21.2
  • Salesforce Core version: ??

Update Person Account triggering multiple times

Is your feature request related to a problem? Please describe.
Triggers and flows run multiple times when a person account is updated, this is happening in a production environment with the connector syncing between Commerce and Service. Is it possible to change this behavior with an active connector?

Describe the solution you'd like
They should run only once.

Describe alternatives you've considered
None.

I got error by email every time I update Contact.

Describe the bug
I am setting up following this document
I got error below by email every time I update Contact.

Title:
フロー「B2C Commerce: Platform Event: Process Contact Update」でエラーが発生しました: An Apex error occurred: System.DmlEx...

Body:
エラー要素 ia_persistAndAuditB2CAuthToken (FlowActionCall)。
An Apex error occurred: System.DmlException: Insert failed. First exception on row 0; first error: STRING_TOO_LONG, B2C AuthToken: データ値が大きすぎる: eyJ0eXAiOiJK....omit.....8uB0YYwJqg (max length=80): [Name]

To Reproduce

  1. Update Contact from lightning UI.

Expected behavior
No error email.

Your local environment details:

  • Node version (node -v): v15.2.1
  • NPM version (npm -v): 7.0.8
  • SFDX version (sfdx -v): sfdx-cli/7.132.0 darwin-x64 node-v16.13.1

Your remote environment details:

  • Salesforce B2C Commerce version: 22.1
  • Salesforce Core version: 53

Getting Error while deploying the b2c connector in SFDC Sandbox

Describe the bug
Hi, I am trying to deploy this connector in my Sandbox. I have setup the env file as well with B2C Commerce Configuration Properties and Salesforce Platform Configuration Properties.
While using this command " npm run crm-sync:sf:org:deploy " I am getting the following error With Error Status.

{
"stack": "RequiresDevhubUsernameError: This command requires a dev hub username. Specify it with the -v parameter or with the "sfdx config:set defaultdevhubusername=" command.\n at Function.create (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\core\lib\sfdxError.js:160:16)\n at UserDisplayCommand.assignHubOrg (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:144:44)\n at async UserDisplayCommand.init (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:235:13)\n at async UserDisplayCommand._run (C:\Users\A\Desktop\b2c\b2c-crm-sync\node_modules\@salesforce\command\lib\sfdxCommand.js:80:13)",
"message": "This command requires a dev hub username. Specify it with the -v parameter or with the "sfdx config:set defaultdevhubusername=" command.",
"name": "RequiresDevhubUsernameError",
"exitCode": 1,
"commandName": "UserDisplayCommand",
"code": "Error"
}
]

Your local environment details:
Node version (node -v): v15.2.1
NPM version (npm -v): 7.0.8
SFDX version (sfdx -v) sfdx-cli/7.120.0 linux-x64 node-v15.2.1

[BUG] Error when deploying the b2c-crm-sync Application Code to Salesforce Org

Describe the bug
I ran command following this instruction, then got error even though setting seems to be fine because I got authToken with this command npm run crm-sync:sf:auth:usercreds

To Reproduce

  1. run npm run crm-sync:sf:org:deploy after complete setting in the instruction.

Expected behavior
command run successfully or display more specific hint or action to solve this error.

Screen & Output log
image

[
  {
    "stack": "DeployFailed: Deploy failed.\n    at DeployResultFormatter.display (/Users/***/Desktop/Code/git/b2c-crm-sync/node_modules/@salesforce/plugin-source/lib/formatters/deployResultFormatter.js:61:19)\n    at Deploy.formatResult (/Users/***/Desktop/Code/git/b2c-crm-sync/node_modules/@salesforce/plugin-source/lib/commands/force/source/deploy.js:127:23)\n    at Deploy.run (/Users/***/Desktop/Code/git/b2c-crm-sync/node_modules/@salesforce/plugin-source/lib/commands/force/source/deploy.js:40:21)\n    at processTicksAndRejections (node:internal/process/task_queues:93:5)\n    at async Deploy._run (/Users/***/Desktop/Code/git/b2c-crm-sync/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)",
    "message": "Deploy failed.",
    "name": "DeployFailed",
    "exitCode": 1,
    "commandName": "Deploy",
    "code": "Error"
  }
]

Your local environment details:

  • Node version (node -v): v15.2.1
  • NPM version (npm -v): 7.0.8
  • SFDX version (sfdx -v): sfdx-cli/7.132.0 darwin-x64 node-v16.13.1

Your remote environment details:

  • Salesforce B2C Commerce version: 22.1
  • Salesforce Core version: 53

Documentation for multiple destination environments .env files

I can see that .dotenv is used on the project, but there is no documentation on how to define and switch between at least 2 environments. What exact change should be done and how to trigger deployment to different environments?

If I have multiple CRM orgs and will create:
.env.dev - for development on my personal CC sandbox and CRM org
.env.ci - for CI/CD instance of the another CC sandbox and another CRM org

and will not have .env, what should I update and how to trigger CLI commands?

Getting Error in deploying this package into SFDC

Describe the bug
While using the command: " npm run crm-sync:sf:org:deploy " I am getting this error With Error Status.

[
{
"stack": "TypeError: Cannot read property 'string' of undefined\n at /home/ranosys/Downloads/b2c-crm-sync/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/styled/table.js:285:34\n at Object. (/home/ranosys/Downloads/b2c-crm-sync/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/styled/table.js:314:3)\n at Module._compile (node:internal/modules/cjs/loader:1102:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)\n at Module.load (node:internal/modules/cjs/loader:967:32)\n at Function.Module._load (node:internal/modules/cjs/loader:807:14)\n at Module.require (node:internal/modules/cjs/loader:991:19)\n at require (node:internal/modules/cjs/helpers:92:18)\n at Object. (/home/ranosys/Downloads/b2c-crm-sync/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/index.js:14:36)\n at Module._compile (node:internal/modules/cjs/loader:1102:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)\n at Module.load (node:internal/modules/cjs/loader:967:32)\n at Function.Module._load (node:internal/modules/cjs/loader:807:14)\n at Module.require (node:internal/modules/cjs/loader:991:19)\n at require (node:internal/modules/cjs/helpers:92:18)\n at Object. (/home/ranosys/Downloads/b2c-crm-sync/b2c-crm-sync/node_modules/@oclif/core/lib/command.js:6:18)",
"message": "Cannot read property 'string' of undefined",
"name": "TypeError"
}
]

Your local environment details:

  • Node version (node -v): v15.2.1
  • NPM version (npm -v): 7.0.8
  • SFDX version (sfdx -v) sfdx-cli/7.120.0 linux-x64 node-v15.2.1

Additional context

I am trying to install this connector in an SFDC sandbox.
I have updated the env file with B2C Commerce Configuration Properties and Salesforce Platform Configuration Properties.

Do I need any scratch org configuration as well in this case(Sandbox). And if yes then how I will do that?

Order syncronization

Hi all,
I would like to know if the code handles the order syncronization. The code shows a trigger on order creation but it looks like only customer are syncronized. I do not see order data flowing to the crm

[BUG] Salesforce Deployment Failing (Looks like an error with latest package with "Position_in_UI__c")

Describe the bug
Salesforce deployment failing with error containing "Position_in_UI__c"

To Reproduce
npm run crm-sync:sf:org:deploy

Expected behavior
Deployment to Salesforce is successful with no errors.

Screenshots
image

Your local environment details:

  • Node version (node -v): v15.2.1
  • NPM version (npm -v): 7.0.8
  • SFDX version (sfdx -v): sfdx-cli/7.108.0 win32-x64

Your remote environment details:

  • Salesforce B2C Commerce version: 21.8
  • Salesforce Core version: 52

Additional context
Add any other context about the problem here.

Code Version getting replaced

Hi, we are using b2c-crm-sync connector to connect with Commerce Cloud & Service Cloud.

IN CC, we use Jenkins for code release to staging and new code version id appended with date and time are pushed to staging and replicated to the production
in CRM sync, we have the env file to add the CC code version.

Issue: Everytime the SC run Crm SYNC , sync override the CC code with previous version

we have manually update the code version everytime we there is an release..

Is it possible to add codeversion with wild card so that CRM takes the latest active code

Please provide me if there is any workaround

Deployment to Non-Scratch Org Failed (Metadata API request failed: socket hang up)

Attempting to deploy the CRM Sync to a full sandbox (npm run crm-sync:sf:org:deploy) and receiving error message stated below.

Steps to produce:

  1. Run: npm run crm-sync:sf:org:deploy
  2. Received first error message
  3. Run: sfdx force:source:deploy -p "./src/sfdc/base" to resolve first error message

Node version (node -v): v16.13.0
NPM version (npm -v): 8.1.0
SFDX version (sfdx -v): sfdx-cli/7.127.0 darwin-x64 node-v16.13.0

Error message:

[
{
"stack": "MetadataTransferError: Metadata API request failed: socket hang up\n at MetadataApiDeploy. (/Users/luigifrascarelli/b2c-crm-sync/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:88:31)\n at Generator.throw ()\n at rejected (/Users/luigifrascarelli/b2c-crm-sync/node_modules/@salesforce/source-deploy-retrieve/lib/src/client/metadataTransfer.js:6:65)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\nDUE TO:\nError: socket hang up\n at connResetException (node:internal/errors:691:14)\n at TLSSocket.socketOnEnd (node:_http_client:471:23)\n at TLSSocket.emit (node:events:402:35)\n at endReadableNT (node:internal/streams/readable:1340:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)",
"message": "Metadata API request failed: socket hang up",
"name": "MetadataTransferError"
}
]

npm run crm-sync:sf:org:deploy
Screen Shot 2022-01-05 at 11 10 41 AM

Received first error message after sfdx force:source:deploy -p "./src/sfdc/base"
Screen Shot 2022-01-05 at 10 59 48 AM

New error message
Screen Shot 2022-01-05 at 10 53 54 AM

Add Data Mappings to the Documentation

Please add default data mappings table to the readme. This is helpful for existing implementations that may need to map values into service from external systems beyond b2c commerce.

Error while running deploy step to standard org with PersonAccounts enabled

Describe the bug
While executing the following command from the documentation https://github.com/SalesforceCommerceCloud/b2c-crm-sync#deploy-the-b2c-crm-sync-application-code-to-your-salesforce-org I receive the following error

  ,----------------------------------------------------------------------.
  |                                                                      |
  |                                                                      |
  |  88888888888                                                   88    |
  |  88                                                            88    |
  |  88                                                            88    |
  |  88aaaaa      8b,dPPYba,  8b,dPPYba,   ,adPPYba,   8b,dPPYba,  88    |
  |  88"""""      88P'   "Y8  88P'   "Y8  a8"     "8a  88P'   "Y8  88    |
  |  88           88          88          8b       d8  88          ""    |
  |  88           88          88          "8a,   ,a8"  88          aa    |
  |  88888888888  88          88           `"YbbdP"'   88          88    |
  |                                                                      |
  |                                                                      |
  |                      Oh no! Not one of these :(                      |
  |                                                                      |
  |         It looks like you've run into an error or exception.         |
  |                       Please log an issue via                        |
  |   https://github.com/SalesforceCommerceCloud/b2c-crm-sync/issues.    |
  |    That's the best way to engage us. Thank you for your support!     |
  |                                                                      |
  `----------------------------------------------------------------------'
 
[
  {
    "stack": "DeployFailed: Deploy failed.\n    at /Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:71:31\n    at async SourceDeployCommand.execLegacyCommand (/Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n    at async SourceDeployCommand.run (/Users/choinierec/projects/b2c-crm-sync/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:32:16)\n    at async SourceDeployCommand._run (/Users/choinierec/projects/b2c-crm-sync/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)",
    "message": "Deploy failed.",
    "name": "DeployFailed",
    "actions": [
      "Check the order of your dependencies and ensure all metadata is included."
    ],
    "exitCode": 1,
    "columns": [
      {
        "key": "problemType",
        "label": "TYPE"
      },
      {
        "key": "filePath",
        "label": "PROJECT PATH"
      },
      {
        "key": "error",
        "label": "PROBLEM"
      }
    ],
    "data": [
      {
        "columnNumber": "16",
        "lineNumber": "770",
        "error": "Could not resolve list view column: ACCOUNT.RECORDTYPE (770:16)",
        "fullName": "Contact.Non_B2C_Commerce_Customer_Profiles",
        "type": "ListView",
        "filePath": "src/sfdc/base/main/default/objects/Contact/listViews/Non_B2C_Commerce_Customer_Profiles.listView-meta.xml",
        "problemType": "Error",
        "height": 1
      },
      {
        "error": "lookupPhoneDialogsAdditionalFields ACCOUNT.PHONE1 not found",
        "fullName": "Contact",
        "type": "CustomObject",
        "filePath": "src/sfdc/base/main/default/objects/Contact/Contact.object-meta.xml",
        "problemType": "Error",
        "height": 1
      }
    ],
    "commandName": "SourceDeployCommand",
    "code": "Error"
 }
]
```

**To Reproduce**
Steps to reproduce the behavior:
1. Use full sandbox (non-scratch org)
2. Have PersonAccounts enabled
3. Follow all instructions up to the deploy step
4. Run `npm run crm-sync:sf:org:deploy`

**Expected behavior**
Deploy should succeed

**local environment details**

Node version v14.18.3
NPM version 6.14.15
SFDX version sfdx-cli/7.132.0 darwin-x64 node-v16.13.1
Your remote environment details:

Salesforce B2C Commerce version: 22.1 compat 21.2
Salesforce Core version: ??

Deployment to Service Cloud scratchorg is failing [BUG] ...

Hi all!

We followed the steps present in the CRM-sync tutorial, up until the npm run crm-sync:sf:org:deploy command, present in the 14th item of the Setup Instructions for the Salesforce Customer 360 Platform.

We verified that the credentials for the Commerce Cloud and Scratch org are correct. We ran the verify commands and everything seems to be ok, but once we run the deploy command this errors shows up:

Screenshot 2021-09-20 at 11 43 26

Do you know what the issue could be?

Thank you!

[BUG] Contact.IndividualId - fullName must end with: __c or __kav or __x or __b or __e or __p or __mdt or __dll or __dlm

Describe the bug
Getting an error when I try to deploy to Salesforce on the field "Contact.IndividualId". The error is "fullName must end with: __c or __kav or __x or __b or __e or __p or __mdt or __dll or __dlm"

To Reproduce
run the "npm run crm-sync:sf:org:deploy" command

Expected behavior
The deployment is successful with out any errors

Screenshots
image

Your local environment details:
node version: v15.2.1
npm version: 7.0.8
sfdx version: sfdx-cli/7.131.0 win32-x64 node-v16.13.1

Your remote environment details:

  • B2C Commerce version: 21.8
  • Salesforce Core version: 53

As a temporary solution, could someone please let me know if I add "__c" at the end for the field in the code base and deploy, will the solution still work on B2C Commerce side without any issues?

PersonAccount and Account Object mapping

Is your feature request related to a problem? Please describe.
We can't write on the Account object's fields (by the flow invoked by SFCC creation/update) instead of on those on the Contact (with PersonAccounts)

Describe the solution you'd like
A way to update the Account fields associated with the PersonAccount created by the SFCC connector on SFDC

Describe alternatives you've considered
Contact fields (linked to PersonAccount) update, but it's not the best solution

Multi-cloud unit-tests 5 failing

After running npm run crm-sync:test:use-cases tests on the org with person accounts setup following results are received:

  42 passing (26m)
  5 failing

  1) Progressive resolution B2C Commerce Customer creation scenarios via the B2CContactProcess API
       creates a Contact that includes additional non-resolution specific field values:

       -- expected the Contact object to have the property Description
      + expected - actual

      -false
      +true

      at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/test/_use-cases/_common/_validateContactProperties.js:31:16
      at Array.forEach (<anonymous>)
      at _validateContactProperties (test/_use-cases/_common/_validateContactProperties.js:28:23)
      at Object._executeAndVerifyB2CProcessResult [as executeAndVerifyB2CProcessResult] (test/_use-cases/_common/_executeAndVerifyB2CProcessResult.js:30:5)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.create.live.test.js:248:18)

  2) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       allows direct updates by B2C CustomerList, Email, and LastName:

       -- expected the Contact object to have the property Description
      + expected - actual

      -false
      +true

      at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/test/_use-cases/_common/_validateContactProperties.js:31:16
      at Array.forEach (<anonymous>)
      at _validateContactProperties (test/_use-cases/_common/_validateContactProperties.js:28:23)
      at Object._executeAndVerifyB2CProcessResult [as executeAndVerifyB2CProcessResult] (test/_use-cases/_common/_executeAndVerifyB2CProcessResult.js:30:5)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:155:25)

  3) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       allows direct updates by B2C CustomerID:

       -- expected the Contact object to have the property Description
      + expected - actual

      -false
      +true

      at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/test/_use-cases/_common/_validateContactProperties.js:31:16
      at Array.forEach (<anonymous>)
      at _validateContactProperties (test/_use-cases/_common/_validateContactProperties.js:28:23)
      at Object._executeAndVerifyB2CProcessResult [as executeAndVerifyB2CProcessResult] (test/_use-cases/_common/_executeAndVerifyB2CProcessResult.js:30:5)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:195:25)

  4) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       allows direct updates by B2C CustomerList ID and B2C CustomerNo:

       -- expected the Contact object to have the property Description
      + expected - actual

      -false
      +true

      at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/test/_use-cases/_common/_validateContactProperties.js:31:16
      at Array.forEach (<anonymous>)
      at _validateContactProperties (test/_use-cases/_common/_validateContactProperties.js:28:23)
      at Object._executeAndVerifyB2CProcessResult [as executeAndVerifyB2CProcessResult] (test/_use-cases/_common/_executeAndVerifyB2CProcessResult.js:30:5)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:236:25)

  5) Progressive resolution of a B2C Commerce Customer update scenarios via the B2CContactProcess API
       allows direct updates by ContactID:

       -- expected the Contact object to have the property Description
      + expected - actual

      -false
      +true

      at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/test/_use-cases/_common/_validateContactProperties.js:31:16
      at Array.forEach (<anonymous>)
      at _validateContactProperties (test/_use-cases/_common/_validateContactProperties.js:28:23)
      at Object._executeAndVerifyB2CProcessResult [as executeAndVerifyB2CProcessResult] (test/_use-cases/_common/_executeAndVerifyB2CProcessResult.js:30:5)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/_use-cases/sfdc/b2cContactProcess.update.live.test.js:275:25)

Deployment to Non-Scratch Org Failed

Describe the bug
I'm configuring the B2C CRM Sync in a Non-Scratch Org and while Im making the deployment it gives an exception that tells me to report on github.

To Reproduce
Steps to reproduce the behavior:

  1. Run: npm run crm-sync:sf:org:deploy

Expected behavior

Should make the deployment of meta-data

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

Your local environment details:

  • Node version (node -v): 15.2.1
  • NPM version (npm -v): 7.24.2s
  • SFDX version (sfdx -v): sfdx-cli/7.118.1 win32-x86 node-v14.17.6

Your remote environment details:

  • Salesforce B2C Commerce version: 21.3
  • Salesforce Core version: [e.g. 52]

Additional context
Add any other context about the problem here.

[BUG] ...SocketTimeoutException:Read timed out

Describe the bug
Hi,
When I'm trying for the first time (after a long period of not creating customers/orders like one day) to syncronize a customer or an order (I've implemented the part with syncing orders), I'm receiving in the callback from ServiceCloud a timeout exception. The Contact is saved in Service Cloud, but when it returns in Commerce cloud it does not save the Salesforce Account Id and Salesforce Contact Id because the result has "SocketTimeoutException:Read timed out" as a response. The others that I'm entering after the first one are working as they should without timeout.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Create from storefront a new customer (first record that day) and create one customer
  2. Checking in Commerce cloud in BM for that customer it has null values for Salesforce Account Id and Contact id fields and in Salesforce response text the value "Tue, 16 Nov 2021 09:20:44 GMT: Status 0 (Read timed out): SocketTimeoutException:Read timed out"

Expected behavior
The values in Salesforce Account Id and Contact id fields should be filled with the values from Service Cloud and in the response text should be something like "Tue, 16 Nov 2021 10:33:29 GMT: Successfully exported to Salesforce Org during the "login" logic."

Your local environment details:

  • Node version (node -v): [v15.2.1]
  • NPM version (npm -v) [v7.0.8]
  • SFDX version (sfdx -v) [sfdx-cli/7.115.1 win32-x64 node-v14.17.5]

Your remote environment details:

  • Salesforce B2C Commerce version: [e.g. 21.10]
  • Salesforce Core version: [e.g. 52]

Password Reset

Is your feature request related to a problem? Please describe.
A Not a problem, feature request

Describe the solution you'd like
A Provide users in core, OMS/Service Cloud, the ability to reset passwords in B2C Commerce

Describe alternatives you've considered
Only alternative is to log into Business Manager and do it.

Additional context
There is an OCAPI API available to reset passwords.

Provide guidance on how to "fix" duplicate rule mappings for Customers implementing b2c-crm-sync with PersonAccounts.

Issue Summary

When deploying PersonAccounts -- the Contact: B2C Commerce: Standard Person Accounts duplicate rule's fieldMappings can sometimes be rendered out of order. This seems to be a bug with the platform, as the meta-data mapping definition doesn't deviate from the format used for the Contact duplicate rule.

Incorrect Field Mapping Order

image

In this image the fields are in the wrong order; they should be rendered in the following order.

Correct Field Mapping Order

image

As of this writing, there is no fix for this issue. The issue seems to occur intermittently and inconsistently. Thankfully, this issue can be resolved manually by adjusting the field mappings.

Issue Resolution Instructions

  1. Edit the Contact: B2C Commerce: Standard Person Accounts duplicateRule.
  2. Scroll down the bottom half of the display and find the Conditions Heading. The mapped fields should be visible underneath this heading.
  3. Update the field mappings so to reflect the following fields in this order:
  • B2C Customer ID not equal to
  • B2C CustomerList ID not equal to
  • B2C Customer No not equal to
  • EmailAddress not equal to
  • LastName not equal to
  • B2C CustomerList ID equal to

The first five fields should be set to not equal to an empty string. We want these field mappings to evaluate fields where these values are populated. For the last field (B2C CustomerList ID) -- we want this field mapping to evaluate when the field is not populated.

  1. Ensure the filter-logic field contains the following fieldMapping rules logic:
1 OR (2 AND 3) OR (2 AND 4 AND 5) OR (2 AND 4) OR (4 AND 5 AND 6)

The filter logic defines in what sequence filters should be processed -- and maps the fieldNumber (ex. 1, 2, 3, etc.) to the fields described above. Another way to think about this filter logic is:

  • First match on B2C Customer ID for fields that are not null
  • Then match on B2C CustomerList ID and B2C Customer NO for fields that are not null
  • Then match on B2C CustomerList ID, Email, and LastName for fields that are not null
  • Then match on B2C CustomerList ID and Email for fields that are not null
  • Lastly match on B2C CustomerList ID, Email, and LastName where Email and LastName are not null and B2C CustomerList ID is null

The combination of the fieldMappings and filter logic is how duplicate rules evaluate matches. Customers can extend the rules by adding new fields and filter logic conditions to the rules definition.

  1. Click the Save button to save your changes.

Typo in README - Create Your B2C Commerce Client ID Allowed Scopes

Describe the bug
Documentation update - in the README.md, in the Create Your B2C Commerce Client ID section, the Allowed Scopes mentioned are:

mail
roles
tennantFilter
profile

tennantFilter has a typo (there should not be a double n - it should be "tenantFilter". Confirmed this in the OCAPI documentation here: https://documentation.b2c.commercecloud.salesforce.com/DOC2/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Faccount_manager%2Fb2c_account_manager_add_api_client_id.html

Screenshots

image

image

Wishlists federation support

Is your feature request related to a problem? Please describe.
b2c-crm-sync, as of today, is providing customer federation. Now that the B2C customer has a record in core, it would add a lot of value to provide personalized and behavioral B2C Commerce data within the Core Platform. The customer's address book has been synced, now is time for Wishlists

Describe the solution you'd like
Having wishlists synced the same way as the Address book would make sense. This would mean supporting both Salesforce Connect and custom LWC solutions, so that everyone, depending on his/her license, can leverage this feature.

Error deploying sync to SF Sandbox (npm run crm-sync:sf:org:deploy)

Describe the bug
We are attempting to deploy this solution to a sandbox (no scratch orgs) and are running into an error when executing the npm run crm-sync:sf:org:deploy command.

Error message is (screenshot included):
_[
{
"stack": "TypeError: Cannot read properties of undefined (reading 'string')\n at /Users/luigifrascarelli/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/styled/table.js:285:34\n at Object. (/Users/luigifrascarelli/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/styled/table.js:314:3)\n at Module._compile (node:internal/modules/cjs/loader:1097:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)\n at Module.load (node:internal/modules/cjs/loader:975:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Module.require (node:internal/modules/cjs/loader:999:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object. (/Users/luigifrascarelli/b2c-crm-sync/node_modules/@oclif/core/node_modules/cli-ux/lib/index.js:14:36)\n at Module._compile (node:internal/modules/cjs/loader:1097:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)\n at Module.load (node:internal/modules/cjs/loader:975:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Module.require (node:internal/modules/cjs/loader:999:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object. (/Users/luigifrascarelli/b2c-crm-sync/node_modules/@oclif/core/lib/command.js:6:18)",
"message": "Cannot read properties of undefined (reading 'string')",
"name": "TypeError"
}
]

CRM-SYNC | v0.9.0 | crm-sync:sf:deploy: END_

Node version (node -v): v15.2.1
NPM version (npm -v): 7.0.8.
SFDX version (sfdx -v): sfdx-cli/7.127.0 darwin-x64 node-v16.13.0

Screen Shot 2021-11-24 at 1 44 07 PM

No active scratch orgs found

Your local environment details:

Node version (node -v): [v16.13.1]
NPM version (npm -v) [8.3.0]
SFDX version (sfdx -v) [sfdx-cli/7.132.0 win32-x64 ]
Your remote environment details:

Salesforce B2C Commerce versi
org-error
on: [ 21.3
org-error1
]

SFDX : Deploy failed

The following error was produced on the RCG IDO Summer '21 Org (non-scratchOrg environment) generated by Q Central after executing the following CLI command: npm run crm-sync:sf:org:deploy

[
  {
    "stack": "DeployFailed: Deploy failed.\n    at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:71:31\n    at async SourceDeployCommand.execLegacyCommand (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n    at async SourceDeployCommand.run (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:32:16)\n    at async SourceDeployCommand._run (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)",
    "message": "Deploy failed.",
    "name": "DeployFailed",
    "actions": [
      "Check the order of your dependencies and ensure all metadata is included."
    ],
    "exitCode": 1,
    "columns": [
      {
        "key": "problemType",
        "label": "TYPE"
      },
      {
        "key": "filePath",
        "label": "PROJECT PATH"
      },
      {
        "key": "error",
        "label": "PROBLEM"
      }
    ],
    "data": [
      {
        "error": "In field: QuickAction - no QuickAction named NewContact found",
        "fullName": "Account-B2C%3A Account%28Support%29 Layout",
        "type": "Layout",
        "filePath": "src/sfdc/base/main/default/layouts/Account-B2C%3A Account%28Support%29 Layout.layout-meta.xml",
        "problemType": "Error",
        "height": 1
      },
      {
        "error": "Your org doesn't have access to component runtime_sales_social:socialPanel.",
        "fullName": "B2C_Account_Record_Page",
        "type": "FlexiPage",
        "filePath": "src/sfdc/base/main/default/flexipages/B2C_Account_Record_Page.flexipage-meta.xml",
        "problemType": "Error",
        "height": 1
      },
      {
        "error": "Your org doesn't have access to component runtime_sales_social:socialPanel.",
        "fullName": "Account_Record_Page",
        "type": "FlexiPage",
        "filePath": "src/sfdc/base/main/default/flexipages/Account_Record_Page.flexipage-meta.xml",
        "problemType": "Error",
        "height": 1
      }
    ],
    "commandName": "SourceDeployCommand",
    "code": "Error"
  }
]

image

Social Accounts & Contacts must be enabled

Social Accounts and Contacts must be enabled for the deployment to success, as the standard Account & Contact Lightning pages expect the associated page elements to be available, this should be added to the deployment instructions if possible

Salesforce connect not showing addresses on the contact related list[BUG] ...

Describe the bug
Following the setup instructions and the final steps to configure external data source for customer address sync, validate and sync is successful but the contact record in SF does not show the customer addresses that are there in commerce cloud.

To Reproduce
Steps to reproduce the behavior:

  1. Go to External data sources, Click on 'B2C_Customer_Address_Book' , click 'validate and sync', select B2C_CustomerAddress table and click Sync.
  2. Once the Sync is successful, Open a contact record that is synched with SF core. Click on Related list
  3. Related list is missing the customer address.

Expected behavior
Contact record in salesforce core should show the addresses in the related list.

Screenshots
image

Your local environment details:

  • Node version (node -v): 15.2.1
  • NPM version (npm -v) : 7.0.8
  • SFDX version (sfdx -v) sfdx-cli/7.129.0 darwin-x64 node-v16.13.0

Your remote environment details:

  • Salesforce B2C Commerce version: 22.1
  • Salesforce Core version: 53

Additional context
Add any other context about the problem here.

Issue deploying duplicate rules (npm run crm-sync:sf:duplicaterules)

Following the steps laid out in the readme file, we hit an error trying to deploy duplicate rules. We attempted to manually configure the duplicate rules in Salesforce core, however we do not see the B2C Commerce: Standard PersonAccount rule in setup. How do we access or enable the B2C Commerce:Standard PersonAccount rule? Does Order Management need to be enabled to access the Commerce Cloud matching and duplicate rules?
Screen Shot 2021-12-01 at 5 26 59 PM

Here is the error from the CLI command npm run crm-sync:sf:duplicaterules
Screen Shot 2021-12-01 at 5 32 56 PM

Install project dependency

Describe the bug
This is the first time attempting to install the b2c-crm-sync to a sandbox environment. Following the steps, we are stuck on which project dependencies are needed to proceed. We installed the default.js and package.json but are not able to deploy to the sandbox.

Your local environment details:

  • Node version (node -v): v15.2.1
  • NPM version (npm -v): 7.0.8.
  • SFDX version (sfdx -v): sfdx-cli/7.127.0 darwin-x64 node-v16.13.0

Screen Shot 2021-11-22 at 5 26 58 PM
.

Error authenticating with auth code due to: grant type not supported

Getting following error on the following URL: http://localhost:1717/OauthRedirect?code=aPrxGfV7WpWWFnEHqst_Stl_FyuCAgbsneQ6zSM2DJPi228_A_tXCg8ztb1cPKimwp8ENHaGvg%3D%3D&state=5e464f1da81b

Error authenticating with auth code due to: grant type not supported

This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.

when trying to execute sfdx auth:web:login -r http://login.salesforce.com

at the same time in the console getting following message:

ERROR running auth:web:login: Invalid client credentials. Verify the OAuth client secret and ID. Error authenticating with auth code due to: grant type not supported

SFDX : Deploy failed

The following error was produced on the non-scratchOrg environment after executing the following CLI command: npm run crm-sync:sf:org:deploy

please note it's a different CC sandbox and CRM org to what was reported under -> #14

[
  {
    "stack": "DeployFailed: Deploy failed.\n    at /Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/lib/source/sourceApiCommand.js:71:31\n    at async SourceDeployCommand.execLegacyCommand (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n    at async SourceDeployCommand.run (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:32:16)\n    at async SourceDeployCommand._run (/Users/osapishchuk/IdeaProjects/b2c-crm-sync/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)",
    "message": "Deploy failed.",
    "name": "DeployFailed",
    "actions": [
      "Check the order of your dependencies and ensure all metadata is included."
    ],
    "exitCode": 1,
    "columns": [
      {
        "key": "problemType",
        "label": "TYPE"
      },
      {
        "key": "filePath",
        "label": "PROJECT PATH"
      },
      {
        "key": "error",
        "label": "PROBLEM"
      }
    ],
    "data": [
      {
        "columnNumber": "0",
        "lineNumber": "0",
        "error": "The sharing calculation you requested can't be processed right now, because it interferes with another operation already in progress. Please try again later. (0:0)",
        "type": "",
        "filePath": "N/A",
        "problemType": "Error",
        "height": 1
      }
    ],
    "commandName": "SourceDeployCommand",
    "code": "Error"
  }
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.