APIs & Integrations

PeterJV
Miembro

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hello,

 

We are building a custom ecommerce bridge integration and when creating a new contact with the property "Unsubscribed from all emails" with status true/false, the Hubspot property history shows in the same second of loading the data an entry: "Email Activity" clearing the value to blank stating "Property changed by an update to their email address or interaction with an email message.".

 

I assume it is because we are changing the email address field, however it wasn't being changed, just created/set for the first time.

 

What should we do to correctly load new Contacts?

 

0 Me gusta
6 Respuestas 6
himanshurauthan
Líder intelectual | Partner nivel Elite
Líder intelectual | Partner nivel Elite

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi @PeterJV,

 

This property "Unsubscribed from all emails" {hs_email_optout} is a read-only property, its value cannot be set.

Can you please check the status of your sync or try without this property?

 

Thanks,
Himanshu

Digital Marketing & Inbound Expert In Growth Hacking Technology
PeterJV
Miembro

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi Himanshu,

 

It appears we have managed to set this property on the second attempt of writing the property for a given record. You can review an example in our main account with contact ID 3497314. The first time we load the value it is cleared automatically. The second time we load, the value remains set.

 

Thanks,

 

Peter

0 Me gusta
himanshurauthan
Líder intelectual | Partner nivel Elite
Líder intelectual | Partner nivel Elite

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi @PeterJV,

 

Yes, that can be because, you can update the existing contact's read only property by sending the PATCH request.

so what might be happening here is, in the initial sync - the contact was created but the read-only property was rejected because of the POST request, but in the second time of sync contact was updating using PATCH.

 

So, might be you can send the sync message for new contacts without this read only property but if the contact was already there you can send the property data.

 

Hope this helps.

 

Thanks,
Himanshu

Digital Marketing & Inbound Expert In Growth Hacking Technology
PeterJV
Miembro

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi @himanshurauthan 

 

We're using the ecommerce sync messages API which is PUT only for first create and subsequent update rather than any POST/PATCH requests.

 

Thanks,

 

Peter

0 Me gusta
himanshurauthan
Líder intelectual | Partner nivel Elite
Líder intelectual | Partner nivel Elite

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi @PeterJV , 

For better explanation of how those api's are working someone from the api team can explain it in better way i think.

But yeah, if you want it to work, you need to first create the contact then you can update the read only property.

Hope this helps,
Himanshu

Digital Marketing & Inbound Expert In Growth Hacking Technology
dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

"Unsubscribed from all emails" property cleared after Integration loads a new contact

Hi @PeterJV 

Wondering if  @himanshurauthan  or @MatthewShepherd  have ideas here 😀

0 Me gusta