This is my situacion, Im sending lead info from my webpage to hubspot using python. the thing is, some properties doesnt need to be overwrited.
E.g. someone is looking product in my website, so he sends a request and i receive it and send it to hubspot, then he goes to other option that he likes it too and sends a request with the second option and its the same as the first request, what i hoping to see in hubspot its 1 contact with a field that says tha he likes option 1 and 2.
Theres one las ting to get in mind, not all properties gonna be appended, in the above case, i need that email, phone, cityt, etc be overwritted in each request
Is there some doc that i can look for, or theres somethin im missing that is overwriting each time that a contact sends a request?
I wrote this real quick, but it retrieves the properties of the contact and checks if it includes the new value. If not, it adds the value and updates the contact. If you use an API key instead of a private app token, remove the 'authorization' header and add the API key to the URL.
I wrote this real quick, but it retrieves the properties of the contact and checks if it includes the new value. If not, it adds the value and updates the contact. If you use an API key instead of a private app token, remove the 'authorization' header and add the API key to the URL.
Like Dennis said, you might want to use a checkbox or even a multiselect. If you go for a multiselect, you need a function to check if the option is present, and if not, add it. You could also go for a single-line text, but in that case, you would also need to first retrieve the contact and the property you want to append a value to and add the value instead.
I am not great with Python, but could share some NodeJS examples.
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
I wrote this real quick, but it retrieves the properties of the contact and checks if it includes the new value. If not, it adds the value and updates the contact. If you use an API key instead of a private app token, remove the 'authorization' header and add the API key to the URL.
You can patch that property, but when you patch it, you will need to include all checked options in the new request. If you only include the newest, the older one will be removed.
Ohhh thanks, ill try it and if it workz im gonna accept it as Solution, but, just to be clear, at the end of the day im gonna see in hubspot something like this?(where you see lists "[]" its mean that the info in that field needs to be append):
name: jhon last_name: perez city: virgia beach state: VA project_names: ["12x30 barn", "18x22 metal garage", "12 x 25 carport"]