Sales Integrations

Stephanie2
Member

State/Province Integration to Salesforce

SOLVE

 

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
Stephanie2
Solution
Member

State/Province Integration to Salesforce

SOLVE

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!

View solution in original post

6 Replies 6
erikblues
Top Contributor

State/Province Integration to Salesforce

SOLVE

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 

0 Upvotes
bradmin
Key Advisor

State/Province Integration to Salesforce

SOLVE

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.
katherineladue
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

State/Province Integration to Salesforce

SOLVE

Hi, I ran across this answer when looking for more info about the SF State and Country field sync with HubSpot. Wanted to ask about this in particular:

 

"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."

 

Is the bolded part above still true? I was working on this for a client and converted their HubSpot State and Country properties into dropdowns, only to go map them in the integration settings and find that the Salesforce fields were still showing up as single-line text fields and were giving me a warning message about mismatched field types. However, the client confirmed that they had enabled and configured the picklists in their SF instance.

 

I mapped the HubSpot dropdown properties to the single-line text fields anyway, and have not gotten any errors yet, but haven't seen anything in documentation that warns you about that particular part of the process, so I just hope that it's actually true?? Can anyone confirm that's how it should be set up?

 

Screenshots attached.

0 Upvotes
bradmin
Key Advisor

State/Province Integration to Salesforce

SOLVE

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.
0 Upvotes
Stephanie2
Member

State/Province Integration to Salesforce

SOLVE

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?

0 Upvotes
Stephanie2
Solution
Member

State/Province Integration to Salesforce

SOLVE

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!