EditContact call automatically


#1

Hello,

I have create one api for edit the ContactData, but that api is called by default in every time
whenever i start my server and edit contact api called by default and its continue called and update the data.


#3

Hi @avinash,

If I understand you correctly, your code is calling this endpoint every time you start your server. What should it be doing?

I will likely not be able to advise specifically on how to alter your code, but could you set up some trigger for conditions when the endpoint should be called?


#4

Hello,

Thanks for your quickly response.

i am create the webhook on add the integration
that time i am use the this api

yield createWebhook1(userData,"contact.propertyChange",'firstname');

here createWebhook1 is function and this function called when i am add the intergration and here webhook created successfully

if(webhookData[0].subscriptionType==="contact.propertyChange"){
yield editContactWebhook(webhookData,objectId);
}

Here i am check the condition than if and condition is true than editContactWebhook will called

and In editContactWebhook function i have uppdate the data
and last i will send the reponse if its successfully.

resolve(true) // send the response from the editContactWebhook function

but once this function called editContactwebhook function called continuesly

Thanks


#5

Hi, @avinash.

Please correct me if I misunderstand:

  1. Your app listens for when a contact's firstname changes through a webhook subscription.
  2. If you receive a notification with "subscriptionType": "contact.propertyChange", then you trigger the editContactWebhook function.

My question is: Does editContactWebhook update data in HubSpot or your system? If it updates the contact's firstname in HubSpot, this will create a loop.