State/Province Integration to Salesforce

SOLVE
Highlighted
Occasional Contributor

 

Hi all!

 

How do you manage state/province selections on your forms?

 

I would kill for some if/then parameters...

 

basically, I only want the state/province for a country to show if the right country is selected.

 I have SF state/province field connected to hubspot created 'state' list.

  • I'm not allowed to clone this field (because it was defined by Hubspot)
  • I can't use it multiple times in a form (if US, show with these 50 options, if Australia, show with these 7 options, etc.)
  • When I try to recreate for each separate states I either get a (you can't pair a dropdown box with a text field) (going straight to the state/country fields, but that's hte field the hubspot created field integrates with 
  • If I try to pair it with the state code field in SF then I get a variation of this error:  

    {“status”:”error”,”message”:”Non-unique Option **bleep** given: ‘AL’ for property ‘mexican_state’ long string of numbers etc.

    • This happens if I have text in the internal field box or if I have the SF abbreviation code.
    • The above error was for my self-created 'mexican state' list. AL isn't one of the abbreviations in that.
    • I also deleted all of the mexican states

Surely I'm not the first person who has ever had to capture state info from different countries. Am I missing something really obvious? Any ideas? This has to be possible.

 

 

 

 

1 Accepted solution

Accepted Solutions
Occasional Contributor

A solution has been found.
1) create a picklist field for each individual province (ie - Canadian Provinces)

2) set up a workflow to copy the field from there and into the state/province hubspot created field

3) success!

5 Replies
Esteemed Advisor

Hi, @Stephanie2. It sounds like what you're really asking is, "Can I have form fields display conditionally when other form field values are selected?"

 

Whether or not you're integrated with Salesforce (with or without state and country picklists enabled), this isn't default functionality. You'd be able to accomplish the conditional criteria you're looking for with custom JavaScript, but this is something you'd need to complete on your own. 

 

Without JavaScript conditionally displaying the state fields dependent on the country chosen, there aren't many great options. Left to their own devices, people submitting that form could easily select nonmatching state and country picklist values, which will result in a sync error and still requires resolution before being able to sync to Salesforce.

 

Otherwise, you may want to consider a country-only picklist and find another way to collect the state information afterwards, or develop country-specific landing pages (if that's a scalable solution).


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
Reply
0 Upvotes
Occasional Contributor

I appreciate the input but I'm still hoping for another solution. 

 

Happy to have separate hubspot properties for each province, but they need to all feed into the state/province field in SF, and I don't understand why that integration isn't working.

 

Anyone else have ideas?

Reply
0 Upvotes
Occasional Contributor

A solution has been found.
1) create a picklist field for each individual province (ie - Canadian Provinces)

2) set up a workflow to copy the field from there and into the state/province hubspot created field

3) success!

Top Contributor

Maybe you wan't to vote for this feature request where we ask for a global sollution for Countries and States?

 

Dependent fields and lists are very useful, but I think that for things like this, where every hubspot user faces the same challenges, hubspot should implement a global solution that works for the CRM backend and frontend (forms).

 

Global Solution for Addresses: Country + State 

Reply
0 Upvotes
Esteemed Advisor

I get it. It's frustrating. The unfortunate part is, it's by design - or, at least, it was at the time it was created. 

 

I was at HubSpot when this functionality was rolled out. The standard Salesforce address fields are all text-based. If you enabled the functionality that enabled state and country picklist in Salesforce, the data type didn't change - it was still parsed as text. The connector had no way of identifying whether the feature was enabled in Salesforce. 

 

The solution in HubSpot was to check the in-app box indicating you're using the functionality in Salesforce. At that point, either the state and country picklist values in HubSpot needed to exactly match state and country picklist values in Salesforce, or it would error. 

 

What I can't speak to is whether Salesforce has changed the original scheme; if enabling state and country picklists allows the data type of the field to change from text to picklist via the API, then HubSpot and other integrations would be able to build more robust solutions.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.