Whenever you save a document in Master Data v2, the platform performs a specific sequence of processes indicated in the image below. In this article, you can learn more about each step in this saving flow.
Add an ID to the document. If the ID doesn't exist in the content, Master Data tries to get the document by index (alternate key). If the document by index does not exist, the platform creates a new ID.
Master Data validates the content with the corresponding JSON schemas if the parameter
_schema exists in the query.
After this step, only one operation could be executed by ID or alternate key.
Get the last version of the document in the database and compare it with the saved content. If there is some change, it moves to the next step.
If you pass the parameter
_where in the query, Master Data will validate this condition at this moment.
Save the document in the database.
Enqueue the operation. Some moments after, the Background Worker will start the background operations (validation with other schemas and indexing).
Updated 4 months ago