I have a custom flow where 2 contacts merge if the contact number is same. HubSpot now preserves active workflow enrollment for the primary record when CRM records are merged; only the duplicate record being merged into it is unenrolled.
So I want to know a api where i can check which workflow is enroll with contact so i will again enroll when merged
I am using the API for contact merging, but I have encountered an issue: when the first contact is enrolled in a workflow, it becomes unenrolled after the merge. I would like the workflow to remain automatically enrolled after the merge.
Let me know if you’d like to adjust anything further!
$vidWithEmail = $contactVid[‘vidWithEmail’];
$vidNoEmail = $contactVid[‘vidNoEmail’];
/**** Merge Contacts Api *****/
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => ‘https://api.hubapi.com/contacts/v1/contact/merge-vids/‘.$vidWithEmail.’/’;,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => ‘’,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => ‘POST’,
CURLOPT_POSTFIELDS =>‘{
“vidToMerge”: ‘.$vidNoEmail.’
}’,
CURLOPT_HTTPHEADER => array(
‘Content-Type: application/json’,
'Authorization: Bearer '.HUBSPOT_ACCESS_TOKEN
),
));
Hi @ETeam5,
Thank you for posting to the Community!
I understand that you’re looking for an API to check which workflows a contact is enrolled in, because when you merge contacts, the workflow enrollment is removed from the original contact and you want it to stay automatically enrolled after the merge.
I’d like to tag in some of our Top Contributors to see if they have any suggestions on this -- Hi @louischausse@miljkovicmisa and @HFisher7 Do any of you have any ideas or advice for @ETeam5?
Thank you!
Cassie, Community Manager