cancel
Showing results for 
Search instead for 
Did you mean: 

API Call across Parent Site

Rohit_Sharma
Participant
0 Kudos

Hi Experts,

We have a requirement to Search for a profile in one parent site (A) #Gigya, populate the UID found into another parent site (B) while the user does Registration on the Site B.

Can this be done ? If yes then please share some sample code to make API calls across parent sites.

Thanks,

Rohit

Rohit_Sharma
Participant
0 Kudos

spu230479 - Any expert comments on the question ?

Accepted Solutions (1)

Accepted Solutions (1)

spu230479
Participant
0 Kudos

Hi Rohit if you intend to have a single account in Commerce then you should look to have a single account in CDC rather than 2 different accounts. The challenge you will face is that different data could be stored in CDC account 1 versus CDC account 2 e.g. different address, phone number (especially if different geographies).

I think it would be good to engage with our Consulting team to understand in more detail the use cases why 2 CDC accounts are created. The purpose of having a single account in Commerce and what data is required to be stored in the Commerce site from CDC account 1 and CDC account 2 as it's potential there could be conflicting data on both accounts that Commerce wouldn't be able to resolve into a single account. As Romain suggested depending what the use case is there maybe other ways to achieve this.

Rohit_Sharma
Participant
0 Kudos

Hi spu230479 ,

The business requirement is to have 2 CDC accounts due to the existing Hybris architecture. Is it possible to make Account.Search JS call from one CDC screen to other CDC site for fetching the profile information ? It would be really helpful if you can confirm on this. Data being overridden is a call which the business is OK to accept.

spu230479
Participant

Hi Rohit it's not possible to have an accounts.search via JS to search for an account during registration. This could expose other customers data and allow someone to register/takeover an account simply from just providing the same login ID. This being said what could be possible would be if the user creates their account on site 1 or site 2 at the point of creation to create the account on the other site at the same time (subject to permissions/regulations and consent etc). This way you'd not need to do the search at run time.

Answers (1)

Answers (1)

romaingorrias
Advisor
Advisor
0 Kudos

Hey Rohit,

If I understand correctly, you have 2 isolated sites (not part of the same site group), but you still want to be able to have the same UID for users across those those sites.

I am also going to assume there are perfectly valid business reasons not to have those two sites in the same site group, and that you do not want users registering on site A to be able to use the same account on site B (which is a lost opportunity from a user experience point of view).

Typically the best way to add "external" data on an account during registration would be to use a onBeforeAccountsRegister extension in an ENRICH scenario; except in your case specifically the data you want to change is the UID, which is not a supported scenario (per the Documentation here: https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/4153ec2f70b21014bbc5a10ce40...

So you would have to revert to using Webhooks (https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/417f918270b21014bbc5a10ce4041860.html), and whenever an account is created, have your Webhook endpoint lookup the account on site A, then do a setUID and site B.

All in all this is a pretty heavy solution prone to many breaking points (off the top of my head; any kind of integration scenario from site B that would then have to rely on the proper execution of the webhook endpoint and "recovery" of the site A UID.

If you are dead intent on wanting to keep those user repositories siloed but still need to consolidate their identity in the background, then it might be worth considering Customer Data Platform.

Rohit_Sharma
Participant
0 Kudos

Hi romaingigya ,

Thank you for the prompt response. Yes the business scenario is to have isolated sites to maintain Brand segregation. Business wants to have separate login credentials.

The ask here is as follows: For ex we have two parent sites CDC1 and CDC2 connected to a Hybris instance on the same code base hosting two sites for different geographies. User comes in and Registers on CDC1, the profile is synced to Hybris. Now when the same user comes to CDC2, we want to make an account.search JS call to CDC1 and get the UID for the user from CDC1. Using the same UID we intend to register the account in CDC2. Thus the user will have 2 profiles in CDC1 and CDC2 with the same UID.

Since the sync with Hybris based upon UID, we assume that now the sync will happen automatically via back office configurations.

Thus can we make a account.search JS call from CDC2 registration screen to CDC1 in order to fetch the UID ?

Please suggest if there is a better way to handle this scenario.

Thanks,

Rohit