plooff
AAlokai
•Created by plooff on 11/19/2024 in #🙋|general-help
[Alokai x SFCC] Token issue regarding SFCC custom endpoint call
Hi experts,
We created a custom endpoint on our SFCC instance and everything works fine through postman with the same credentials used in our .env.
The issue comes with the customization we brought to Alokai in the SFCC integration to extend it.
Here is what we've done :
- extended the integration
- installed axios
- retreive the
cookie context.req.cookies['vsf-sfcc-scapi-token'];
- put the token as a Bearer Auth in our request
We used jwt.io to decode the token since it doesn't work and the token seems to have placeholders in it (like __ORG_ID__
or __SLAS_CLIENT_ID__
)
If we generate a new token through context.client.AuthFacade.guestSignIn();
the call works fine but generating a new token at every request is not a valid solution.
So my question is how are we supposed to retrieve the current valid token (I guess there is alredy the mechanism to refresh it if it expires ?). Are we doing the right thing using axios ? Maybe there is already an http client with the correct header for our calls ? If so how are we supposed to retrieve it ?
Thanks for your help.
Kind regards1 replies
AAlokai
•Created by plooff on 10/31/2024 in #🙋|general-help
[Alokai x SFCC] Account creation extension
Hello gurus !
In an alokai project we have the SFCC integration configured and the OOTB project works well.
We want to add some information on
Customer
creation (like phone, gender,...) during the sdk.unified.registerCustomer()
call.
I started following the guide here https://docs.alokai.com/middleware/guides/extensions#creating-an-extension but when implementing the new registerCustomer
method, the SFCCIntegrationContext.api.register()
method expects a CustomerRegisterParams
preventing me from passing additional parameters to the SCAPI call.
What is the best approach ? Should I make my own SCAPI call in my extension or is there a way to extends the SFCCIntegrationContext.api.register()
method ?
Kind regards3 replies
AAlokai
•Created by plooff on 8/6/2024 in #🙋|general-help
How to use a newly created Custom Integration
Hi experts,
I've just created a custom integration using this documentation https://docs.alokai.com/integrations/custom/quick-start and I'm wondering how I can use this custom integration into an existing Alokai project ?
I think I understood that the documentation referes to this github repo https://github.com/vuestorefront/integration-boilerplate but I'm kind of stuck now.
I have already some integrations configured into apps/storefront-middleware/integrations and I guess I need to do something there and also in the apps/storefront-middleware/middleware.config.ts but the documentation does not explain how go further once the custom integration is created.
Can you please explain what's the next step once the custom integration app is created ?
Kind regards
8 replies