Best way to handle multiple select options


#1

Hi all
We’re new to HubSpot and are going through the setup.

We have a backup application that connects to multiple platforms - Shopify, BigCommerce, QuickBooks, Xero etc…

On each contact I’d like to have a multiple select option that will show which platforms the customer is using - ie. BigCommerce & QuickBooks for example.

In my JavaScript code, I have the following for BigCommerce users:
var _hsq = window._hsq = window._hsq || [];
_hsq.push([“identify”,{
email: “<%= current_account.email %>”,
id: “<%= current_account.id %>”,
lifecyclestage: “customer”,
platforms: “BigCommerce”
}]);

However, if that customer had platforms as BigCommerce and QuickBooks, when they hit this page it is reset to just BigCommerce. (I expected that).

Is there a way to ‘add’ BigCommerce to the list of platforms, rather than replace the entire check list? Or are there other suggestions on how we should handle this.

Mike


#2

Hi @mikepotter,

There’s currently no way to append values to a contact property through the tracking code API. Fields included in the visitor identification function will replace existing values in HubSpot. As a workaround, you can use the contacts API to get the current property value, and then update the contact with the combined value. HubSpot also stores previous values for properties, which you can segment by in lists/workflows.