Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWR B2B Integration classes not executing #299

Open
patrykzak opened this issue Jan 19, 2024 · 6 comments
Open

LWR B2B Integration classes not executing #299

patrykzak opened this issue Jan 19, 2024 · 6 comments

Comments

@patrykzak
Copy link

I have setup LWR B2B store according to the documentation.
I can see below information during script execution:
image
However when I place an order none of those classes are executed.
I am testing it on preview 60.0 api scratch org.
I checked if classes are registered and if they are mapped, all looks fine, but I am not able to see them in the administration tab for the commerce
image
For example in my production org where we use Aura B2B commerce template it looks like this:
image

I am investigating LWR capabilities for commerce, however I am unable to setup integration classes to work as expected.
Please advise

@tarcang
Copy link
Contributor

tarcang commented Jan 19, 2024

I see the confusion. Our extension registration logic is basically register all the classes we want in the scratch org. For B2B Aura, B2C classes should not execute, it uses the b2b flow. The B2B LWR uses the same checkout logic as B2C LWR, so those classes should execute. Here are the classes we register. Please try to register the apex classes manually and see if you still see the same behavior. That way, we can know if the issue is in the extension logic or the plugin logic.

@patrykzak
Copy link
Author

I have removed all records for following sobjects and imported them back again
StoreIntegratedService & RegisteredExternalService
Still the same issue nothing firing except payments interface.

#1 I tried setup with API 59.0 but I get all the time:
"message": "The requested resource does not exist"
"command": "sfdx force:data:record:create -u "***" -s "ShippingConfigurationSet" -v "TargetRecordId=0ZE1m00000008FnGAI" --json --apiversion=59.0"
It says that sobject is valid since api 59.0 but I get below error during query:
sObject type 'ShippingConfigurationSet' is not supported
#2 In apis below 59.0 I will get the same error as the SObject does not exist
#3 I also tried with previous release of this plugin but I also had issues with it.

Can you test from your end with API 60.0?

@patrykzak
Copy link
Author

@tarcang
API 59.0
I managed setup store but I had to build the plugin locally and remove changes from this commit: 07d8ffc, as ShippingConfigurationSet was throwing errors in API 59.0 scratch org, is there any idea what's missing?

"message": "The requested resource does not exist"
"command": "sfdx force:data:record:create -u "***" -s "ShippingConfigurationSet" -v "TargetRecordId=0ZE1m00000008FnGAI" --json --apiversion=59.0"
It says that sobject is valid since api 59.0 but I get below error during query:
sObject type 'ShippingConfigurationSet' is not supported

API 60.0 preview
although integrations are registered and linked to the store, they are not triggered and do not appear in the commerce administration
image

@tarcang
Copy link
Contributor

tarcang commented Jan 25, 2024

@patrykzak API 59.0 doesn't have the ShippingConfigurationSet. Your best bet is probably using https://www.npmjs.com/package/@salesforce/commerce/v/248.1.3 since that is compatible with api 59.

@AVATOR
Copy link

AVATOR commented Feb 19, 2024

@patrykzak I do not have problems with API 60. Try to recreate scratch org.

@patrykzak
Copy link
Author

@AVATOR are you able to connect integrations with classes implementing "sfdc_checkout" and confirm that they are working?
My problem is that with refreshed setup in webstore administration page I can connect classes which are extending 'CartExtension' class, but I am unable to setup old integrations referenced in examples in this repositories with API 60.0
FYI: @tarcang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants