Issues on creating contacts


#1

Hi,

I'm using the Offline form api in order to send the data gathered from our online form.
The data flow is the following:
User fills the form on the webpage->data is sent by post to our server, it saves on the DB and also triggers an event that will send info to hubspot-> data is written as array to be sent (email, company, number and stuff)-> hubspot create the contact.
The issue we are having is the following, while creating the array it sets one variable as true that will be used on the hubspot to organize the flow. most of the contacts created come with this variable as true and source as Offline, API. like its supposed to be BUT some random cases come from google as source, so it dont create the variable,(come as nothing) and other cases like www.xxxxxx.com also not creating the variable. WHat could be causing this? from the contact its possible to see that the person created from the original website so it was supposed to pass on the offline, API flow


#3

Hey @GxPinheiro, happy to help. Would you please send over:

  1. An example contact that has the correct (Offline, API) source
  2. An example contact that has the incorrect source
  3. An example request you're making to the specific endpoint you're using.

Can you also please clarify which variable you're referring to that's changing?

Thanks!


#4

1- https://app.hubspot.com/contacts/3453052/contact/19666853
2- https://app.hubspot.com/contacts/3453052/contact/19182501
Is not exactly "incorrect" they are just isolated cases that happens to be different.
3-
private static function createRequest($path, $params, $pathComplement = 'contacts/v1/contact/'){
$api = 'https://api.hubapi.com/'.$pathComplement.''.$path;
$http = Shared_Helpers_Http::getClient( $api, array('timeout'=>3));
$http->setHeaders('Content-Type: application/json');
$http->setRawData( json_encode(($params)) );
return $http;
}

And lastly the variable is called: trial


#5

Got it, thanks for that @GxPinheiro. So to confirm, you're using this endpoint, correct? https://developers.hubspot.com/docs/methods/contacts/create_contact


#6

Thats correct, so in theory all contacts should come with OfflineSources API?


#7

Hi @GxPinheiro, correct -- digging into what might have happened. I'll keep you posted and will let you know if I need any other info. Thanks!


#8

Hey @GxPinheiro, this contact was created via a collected form here: https://app.hubspot.com/forms/3453052/3cd043e1-ebc1-4091-805b-901aa5e54cdd/submissions. Anybody can go to your site and submit a collected form if collected forms are turned on in your settings: https://app.hubspot.com/settings/3453052/marketing/collected-forms.

More about collected forms here: https://knowledge.hubspot.com/articles/kcs_article/collected-forms/use-non-hubspot-forms


#9

Got it, and what about this case?
https://app.hubspot.com/contacts/3453052/contact/19066151?interaction=note


#10

That would also be from a Collected Form.

You can see all collected forms here: https://app.hubspot.com/forms/3453052?collectedFormsId&formType=CAPTURED and filtering for "Non-HubSpot". You'll be able to see associated contacts who've filled out those forms as well.