Source-id for historical data on a custom field from a form


#1

When getting all contacts using &propertyMode=value_and_history, I get historical data for a specific custom field (example below):

{
  "value": "The Value",
  "source-type": "FORM",
  "source-id": "77dd49a5-c271-4b01-83c5-fd853de57ac6",
  "source-label": "The Value Label",
  "timestamp": 1470692550424,
  "selected": false
}

From that, I would assume that the contact completed a form. I would also assume that the "source-id" value is the ID for the form that was completed. However, when I use that ID to try and find the form, I get no results. Can anyone tell me what that "source-id" value is? Also, how can I find which form was filled out using the historical data returned?


#2

Hi @alexpavia,

That source-id does correspond to the form that the contact submitted. If you're not able to find a form with that ID in your portal, it's possible that the form was deleted. In order to programmatically find the form that corresponds to that ID, you'd need to use the Forms API to pull the form definition:


#3

Hey @Derek_Gervais, thanks for the response. I should have updated this post earlier. I submitted a ticket to support with the same question and was told that the source-id is for the form submission event, not the form itself. Actual response below:

As we suspected, the **source-id** does *not* correspond to a form's ID. Instead, the value is an ID for that particular form submission event for that specific contact. It's not possible to extrapolate the **form-id** from this "submission-id," but it looks like the form names are at least included in the JSON data you sent me.

Any who, I appreciate the follow-up.


#4

Hi @alexpavia,

Thanks for reaching out! Just goes to show that you can learn something new in this forum every day, even if you work at HubSpot!