Salesforce Connector: Transforming Country and State Values

If you are using the BrightTALK Connector for Salesforce, we offer a built-in option to change the default BrightTALK Country and State values to align with the values you are using.  For instance, if our value is "United States" but you need it to be "United States of America", then this guide will show you how you can change that automatically.

Note:  In many Salesforce instances, the State values are derived from the Country.  This means that if you perform any transformation to the Country field, you'll also want to perform a similar transformation on the State field.  

 

Note 2:  If using this method, we strongly recommend against setting a "default" country value for any net new leads, as this will stop this transformation from working.  You can disable the default country value by going to (in Salesforce)  Setup -> Data Management -> State and Country/Territory Pick lists -> "Configure States and Countries" and then changing the "Default Country/Territory" pick list to "--None--."

 

Step 1: Creating temporary custom fields for State and Country

Step 2: Transforming the State and Country Values

Step 3:  Creating Workflows to copy those values to your existing fields

Step 4: (If using custom Country values) How to do manual transformations

 

 

 

 

Step 1: Creating temporary custom fields for State and Country

In order for the transformation to work, we need to create a short delay between when the Lead or Contact enters your Salesforce and when the transformation script runs.  We can do this by creating the following 4 custom fields:

  • On the Lead Record:  "BrightTALK Country" (text field)
  • On the Lead Record: "BrightTALK State"  (text field)
  • On the Contact Record: "BrightTALK Country" (text field)
  • On the Contact Record:    "BrightTALK State" (text field)


Why is this
necessary?  

We need this delay because Salesforce does not let this transformation happen in "real time."  In other words, we cannot change a country or state value at the exact same time a lead/contact is being created.  Without these custom fields, the Connector will attempt to create the lead/contact with a incorrect Country value and  it will be rejected by Salesforce.

Screen_Shot_2019-11-21_at_8.22.26_AM.png

 

 

Step 2: Transforming the Country and State Values 

In order to tell Salesforce that the values need be transformed, you'll first need to go the "Manage Field Mappings" are of your Connector.  This can be done by going to (in Salesforce) "BrightTALK Channels" -> [Your channel] -> "Manage Field Mappings." 


From here, you'll want to update the "Country" and "State" mappings for both leads and contacts to the new "BrightTALK..." fields.  

You'll also notice there are some radio buttons next to the State and Country field.  These are also critical to making the transformation work:

Country Options

  • If you are using two-letter country codes: Select "Alpha 2"

  • If you are using the Full ISO format: Select "Full ISO format."

  • If you are using completely custom values:  Select "Full ISO format."

State Options:

  • If you are using the full State name: Select "Default" 

  • If you are using two-letter State abbreviations:  Select "Alpha 2"

Screen_Shot_2020-06-18_at_8.35.31_AM.png

 

 

Step 3: Creating a Workflow to copy that value to your existing field

Once you have the new fields setup, you'll want to create workflows on both the Lead and Contact to copy the "BrightTALK Country" and "BrightTALK State" fields to your actual Country and State fields.  

 

Here is an example for Country:

 

Screen_Shot_2019-11-21_at_8.27.02_AM.pngScreen_Shot_2019-11-21_at_8.27.50_AM.png

 

Here is an example for State:

Screen_Shot_2020-06-18_at_8.48.54_AM.png Screen_Shot_2020-06-18_at_8.47.46_AM.png

 

So what's actually happening here?

  1. The Connector is writing BrightTALK's Country and State values to the newly created "BrightTALK Country" and "BrightTALK State" fields

  2. The Connector is then transforming the value in those fields to match your field values

  3. The workflows then copy the transformed values to your fields. 

    Note: In the current workflow rules, we are not overwriting any country/state data that may exist in your system.  This may cause issues if you have "default" values for these fields, as noted at the beginning of the article.

    Note 2: If you need to do a historical update (or batch update) to fix these values retroactively, then you'll need to temporarily suspend the logic in the workflow that prevents overwriting existing values.

 

 

 

 

Step 4: How to do manual transformations (optional)

 If you are using custom or non-standard Country values, you will need to complete this Step.  Otherwise, you are permanently done with this process and can move on to more exciting tasks. 

 

What do you mean by "custom" or "non-standard" Country Values?

If you are not using values listed in either "Alpha 2" or "Full ISO format."  then you'll need to complete this step (for instance if you call "United States",  "U.S.A", then that would be considered a custom value).

 

Here's how to use custom Country Values:

From the "Setup" area of your Salesforce, go to  Develop -> Custom Settings -> and click "Manage" next to "BrightTALK Country Codes."

Now find the Country you wish to update and click "Edit."

From this screen update the "Country Full ISO" value to your custom value.   DO NOT change the "Name" value.

Screen_Shot_2020-06-18_at_9.05.47_AM.png

Click "Save" and then repeat for each Country you need to update.  

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request