-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When there are two of anything (Org, Person, Deal ...) in Pipedrive, and the sales team want to merge these two items (whether it be hermes fault or a company singing up twice etc)
- Pipedrive will combine the
hermes_id
PD data fields together, resulting in the value =1234, 2344
. - Then a webhook of the change is sent to hermes.
- ValidationError
each webhook object from pd contains a CURRENT and PREVIOUS objs, hermes uses to check if anything has changed in the webhook before we apply the changes to the Hermes data.
this causes additional errors as we validate the pervious object in order to do the later comparison.
which in turn causes the validationError to happen again, this time on only the PREVIOUS object.
Proposed Solution
- call
handle_duplicate_hermes_ids
only if the hermes_id is a string but only on the CURRENT - only update the objects if there has been a change
Additional thoughts
- we might have to ignore PREVIOUS custom fields if they cause an error, otherwise even after we fix (put to PD) then receive webhook the error will still occur. causing an infinite loop.
Metadata
Metadata
Assignees
Labels
No labels