E-commerce Bridge sync - Unsubscibe from all email setting overwritten



When I synchronise contacts for the first time to Hubspot, I set the "Unsubscribe from all email" setting to "true" if applicable for the new contact. But Hubspot overwrites the value with an empty string. You can see this in the property history. How can I prevent Hubspot from overwriting this value?


Hi, @bob.

To clarify, has this occurred with all contacts for whom you synced a true value?

Could you share links to example contacts in your account so that I may take a closer look?


Hi Isaac,

It probably occurred with all contacts I synced. I did not test all of them, because it were 13k new ones :slight_smile:

Examples property history. You can see, that source Email overwrites some email related properties:



Problem is with syncing that the timestamp of the property in my system is always earlier then the sync create date in hubspot. So it does not overwrite the property source Email sets afterwards. I can work around this issue of course, but I was hoping this should not occur as default behaviour.

Thanks in advance for your help!


Thanks for your patience, @bob.

I wonder if this is a loophole in the Ecommerce Bridge. The hs_email_optout property cannot be set or changed via the Contacts API. As I understand it, only the Email API should be able to indirectly modify this property.

While you are able to set hs_email_optout to true via an Ecommerce Bridge sync message, the system resets the value to null.

I am going to share this with my team and we'll investigate what the behavior should be. Apologies for the inconvenience; I hope to have an answer for you soon.


Hey, @bob.

I don't think this behavior can be prevented. I believe this may have been an oversight because no other contact creation method allows you to immediately set hs_email_optout to true. As I mentioned in my last post, the Contacts API does not allow this and imports also cite the property as read-only:

I still plan to check why the Ecommerce Bridge allows you to set the property via a sync message, but it looks like you will have to send subsequent calls to this Email API endpoint to unsubscribe contacts. Thus, for contacts who are opted out, you will first need to send a sync message to create their record and set their property values and then send another call to the Email API to opt them out of all email communication. Apologies for the inconvenience and confusion.