APIs & Integrations

supergox
Member

Get “contact exists” status in form client-side callback

SOLVE

Hey folks,

 

Doing a custom task which sounds basic but it turned out to be more complex.

 

Basically, we need to check if a user exists in the CRM when a form is submitted and push this info to GTM together with the form submission event. Checked the onFormSubmitted callback payload and there's nothing that indicates if the contact exists.

 

The caveat here is that we can't directly use the Contacts API to query the database - we can't use external endpoints or hs serverless functions.

 

Any ideas how to validate if the contact exists mostly client side?

 

All other input is welcome as well.

1 Accepted solution
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Get “contact exists” status in form client-side callback

SOLVE

Hey @supergox the form endpoints don't check the CRM at all, they just send data to the CRM. The de-duplication and cehcking record IDs happens in the submission pipeline, which only happens HubSpot server side and isn't publicly available. 

The client-side callbacks are only for the forms frontend, they don't handle submissions at all either, they just allow customising the functionality of the form. 

I definitely wouldn't recomend checking if a contact exists client-side either as this would open up your CRM data to be available publicly for anyone to take if they wanted to. 

At the moment the only way to achieve this would be to use the search contacts api

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

1 Reply 1
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Get “contact exists” status in form client-side callback

SOLVE

Hey @supergox the form endpoints don't check the CRM at all, they just send data to the CRM. The de-duplication and cehcking record IDs happens in the submission pipeline, which only happens HubSpot server side and isn't publicly available. 

The client-side callbacks are only for the forms frontend, they don't handle submissions at all either, they just allow customising the functionality of the form. 

I definitely wouldn't recomend checking if a contact exists client-side either as this would open up your CRM data to be available publicly for anyone to take if they wanted to. 

At the moment the only way to achieve this would be to use the search contacts api

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.