SalesforceCommerceCloud / b2c-crm-sync

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.
https://salesforcecommercecloud.github.io/b2c-crm-sync/
BSD 3-Clause "New" or "Revised" License
65 stars 45 forks source link

[BUG] ...INVALID_PERSON_ACCOUNT_OPERATION: account cannot be converted to person-account. #169

Open ankeetasingh opened 2 years ago

ankeetasingh commented 2 years ago

Hi,

Not sure if this is a bug or this may be a configuration issue on SFDC with the package but I am not sure. Appreciate any help regarding this.

WE have installed the B2C CRM Sync. We have configured Person for Account Contact Model and set the PersonAccount Record Type Developer Name. When an account is created in SFCC Storefront, we are getting flow error

Error element recUpd_PersonAccountRecordType (FlowRecordUpdate).
The flow tried to update these records: 0014C00000iUsm5QAC. This error occurred: INVALID_PERSON_ACCOUNT_OPERATION: account cannot be converted to person-account. You can look up ExceptionCode values in the [SOAP API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#).

Screen Shot 2022-05-20 at 3 53 39 PM

Screenshots image

Your local environment details:

Your remote environment details:

Could you help with this please?

Thank you!

ankeetasingh commented 2 years ago

Additional finding:

After looking at B2C Commerce: Process: Create Or Update Contact flow, it looks like the standard account is created first and then the record type is changed to person account based on the default configuration. The person account (account and contact lives in same account record) behaves differently and the standard account (account and contact are different records).

Screen Shot 2022-06-05 at 7 33 39 AM

I modified the flow and was successfully able to create the person account

image

What is the process for testing before creating pull request so that we make sure that nothing is broken? There are also alot go subflows. Is there a document/diagram for the b2c-crm-sync process?