Closed syunyama closed 2 years ago
It seems B2C_AuthToken__c.Name is used to store access token which usually have 255 length. https://github.com/SalesforceCommerceCloud/b2c-crm-sync/blob/186302e8b15c537b2330b8923736c5e8d2ed4134/src/sfdc/base/main/default/classes/B2CIAPersistB2CAuthToken_Test.cls#L74
And default length of Text type seems to be 80.
So maybe adding this <length>255</length>
to around this line solve problem?
https://github.com/SalesforceCommerceCloud/b2c-crm-sync/blob/186302e8b15c537b2330b8923736c5e8d2ed4134/src/sfdc/base/main/default/objects/B2C_AuthToken__c/B2C_AuthToken__c.object-meta.xml#L168
And also better to change test case to 255 length string: https://github.com/SalesforceCommerceCloud/b2c-crm-sync/blob/186302e8b15c537b2330b8923736c5e8d2ed4134/src/sfdc/base/main/default/classes/B2CIAPersistB2CAuthToken_Test.cls#L52
Hello @syunyama ,
Thanks for posting this.
It seems you did not configure your B2C API Client correctly.
You should configure it with Access Token Format: UUID
, as explained in the readme here, and not leave the default JWT
value.
Your case is that the access token delivered by the Account Manager is a JWT, which is more than 80 characters long. Using a UUID, the access token length will be less than 80, and the error will go away.
Please let me know if this solves the issue.
@jbachelet Thank you for your quick reply and sorry for my misunderstanding. I confirmed it ran successfully after change to UUID.
Describe the bug I am setting up following this document I got error below by email every time I update Contact.
To Reproduce
Expected behavior No error email.
Your local environment details:
Your remote environment details: