Although it is useful it doesn't address the issue.
In my tenant if I create a new cross walk using API to get entities/SstrZ94
If I then add a new cross walk the response of that will be entities/00tTdkb
If I then retrieve the entity by cross walk id it will continue to be 00tTdkb for about 7 seconds in an inactive training tenant before it becomes SstrZ94.
This is because match and merge is asynchronous. We do not want to continually poll the tenant because that will lead to performance issues.
Another Question: A Reltio employee said that there is a parameter that can be used when creating the entity to have it wait for match merge to complete before responding. I cannot find it in the documentation. Create Entities | Reltio
If there is no parameter then the best option is to use the Events API.
The challenge is the following:
Souce system sends a new cross walk for a new Contact.
I get ENTITIES_CREATED from Events API.
At what time / when should I send that back to the source system for their cross walk as their final Entity ID given that match and merge is asynchronous. There may be a ENTITIES_MERGE 5+ seconds later depending on the size of the tenant queue. There may not be an ENTITIES_MERGE at all because it is a new Contact. How do I know that the match and merge has completed for the cross walk without continuously polling?
------------------------------
Vincent Tran
IMT
------------------------------
Original Message:
Sent: 08-24-2023 01:29
From: Gino Fortunato
Subject: How to wait for final Entity ID for Cross Walk?
Hi Vincent!
Good question. I assume you want the 'final' value because you need to refer to it later in your process. The good news is that this is unnecessary. If you GET and entity by the. ID before it was merged, you get back the same information as if you had the ID of the entity that it was merged into. Is that helpful?
------------------------------
Gino Fortunato
Senior Solution Engineer
Reltio
Original Message:
Sent: 08-22-2023 12:18
From: Vincent Tran
Subject: How to wait for final Entity ID for Cross Walk?
I'm still learning so hopefully my terminology is correct.
When I create a new cross walk using the REST API that should automatically merge to an existing Entity ID, I get a new Entity ID because the match and merge process is asynchronous.
In order to be notified of the final Entity ID we have to use the Reltio Events API.
Is the ENTITY_CREATED event before or after the match and merge process or are there no guarantees.
The ENTITIES_MERGED only triggers when there is a merge.
Can ENTITIES_MERGED ever be published before ENTITY_CREATED or is guaranteed to always be after?
The gap in the API I am confused about is how to know that a record is added and does not get merged because the match and merge process has confirmed it should remain where it is. i.e. a cross walk record is recreated and no automatic merge occurs.
Ideally, we want one message in from the source system into Reltio, and one message out for that transaction to send back. From what I can tell we might have listen for the two events and potentially send up to two messages back.
------------------------------
Vincent Tran
IMT
------------------------------