Reltio Connect

 View Only
  • 1.  Sample payload for Search Before Create that updates an existing entity

    Posted 05-19-2023 13:13

    Can someone provide a sample payload for SBC (Search Before Create) API call that updates an existing entity?

    I can provide a search filter that returns results for the API call below. But even when it returns results in the matches array, it always creates a new entity. What parameters are required to have Reltio update the matched entities, instead of creating new?

    The documentation leads me to believe that by setting applyIfNoMatches to false, it should update the existing entities when they match the search criteria.

    I also tried options=partialOverride to no avail.

    If this worked, I would assume that it would update the entity's email address with the number 5.

    https://docs.reltio.com/en/explore/get-going-with-apis-and-rocs-utilities/reltio-rest-apis/model-apis/entities-api/search-before-create

    curl --location 'https://{{env}}.reltio.com/reltio/api/{{tenant}}/entities/_conditional?applyIfNoMatches=false&returnMatches=true&filter=equals(type%2C%27configuration%2FentityTypes%2FIndividual%27)%20and%20equals(attributes.Email.Email%2C%20%27acvxzcvx4%40example.com%27)&select=uri%2Cattributes.Email.Email&options=partialOverride' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer {{token}}' \
    --data-raw '[
    {
    "type": "configuration/entityTypes/Individual",
    "attributes": {
    "Email": [
    {
    "value": {
    "Email": [
    {
    "value": "acvxzcvx5@example.com"
    }
    ]
    }
    }
    ]
    }
    }
    ]'

    Response:
    {
    "matches": [
    {
    "uri": "entities/15JovVE",
    "attributes": {
    "Email": [
    {
    "value": {
    "Email": [
    {
    "type": "configuration/entityTypes/Individual/attributes/Email/attributes/Email",
    "ov": true,
    "value": "acvxzcvx4@example.com",
    "uri": "entities/15JovVE/attributes/Email/2Z6mELeW/Email/2Z6mEPum"
    }
    ]
    },
    "ov": true,
    "uri": "entities/15JovVE/attributes/Email/2Z6mELeW"
    }
    ]
    }
    }
    ],
    "applied": [
    {
    "index": 0,
    "object": {
    "uri": "entities/0SbswTi",
    "attributes": {
    "Email": [
    {
    "value": {
    "Email": [
    {
    "type": "configuration/entityTypes/Individual/attributes/Email/attributes/Email",
    "ov": true,
    "value": "acvxzcvx5@example.com",
    "uri": "entities/0SbswTi/attributes/Email/26037SDi/Email/26037WTy"
    }
    ]
    },
    "ov": true,
    "uri": "entities/0SbswTi/attributes/Email/26037SDi"
    }cc
    ]
    }
    },
    "successful": true
    }
    ]
    }


    ------------------------------
    Joseph Hoppe
    ------------------------------


  • 2.  RE: Sample payload for Search Before Create that updates an existing entity

    Reltio Partner
    Posted 05-22-2023 09:25

    Hi Joseph,

    I agree with you as i have provided filter search which returns only 1 entity and when 'applyIfNoMatches' is set to false it is creating a new entity with provided body and if 'applyIfNoMatches' is set to true it does not create any record and returns the matches on 'returnMatches' to ture.

    Also if i provide the same crosswalk information as the record has in the body with 'applyIfNoMatches' as false  and options as partialOverride then the record is updated.
    Finally, If we want to update the same record then we need to provide same crosswalk information with partialOverride or it creates new record with Reltio Crosswalk, and if we need to just get the searches then the body can be None with 'applyIfNoMatches' as false and 'returnMatches' as true.
    These are my findings. Please validate and apply in your use case.



    ------------------------------
    Sheshadri V
    Fresh Gravity
    ------------------------------



  • 3.  RE: Sample payload for Search Before Create that updates an existing entity

    Posted 05-22-2023 14:39

    Based on your response, when the documentation says "update an entity", I now interpret that as: you can update an entity only if the crosswalks, provided in the body of the POST call, match the crosswalks of existing entities in Reltio. If they do, those entities will be updated. 

    My original understanding - that you can use this API call to directly update the entities returned by the search results - is mostly incorrect. That will only work if the provided crosswalks match those crosswalks of existing entities in Reltio.

    Please let me know if that matches your understanding. Thanks!

     



    ------------------------------
    Joseph Hoppe
    ------------------------------



  • 4.  RE: Sample payload for Search Before Create that updates an existing entity

    Reltio Partner
    Posted 05-23-2023 01:14

    Hi Joseph,

    Yes we are on the same page also make sure you specify options as partialOverride and i request you to check with Reltio Support on the understanding as the documentation needs a major update.



    ------------------------------
    Sheshadri V
    Fresh Gravity
    ------------------------------



  • 5.  RE: Sample payload for Search Before Create that updates an existing entity

    Posted 05-23-2023 09:10

    Thank you for your help!!!



    ------------------------------
    Joseph Hoppe
    ------------------------------