Question

Email Parser Text to Salesforce Picklist

  • 13 January 2021
  • 6 replies
  • 32 views

I have a functioning email parser where it pulls in a field that I need to map to a picklist value in Salesforce.

 

For Example, the email parser will pull in a field “Apple” which I need to map to a Salesforce Picklist value of “Fruit”

 

I tried to build a lookup table through the formatter utility, but it isn’t mapping to the picklist field when the record is created or updated in Salesforce.

 

Any ideas?


6 replies

Userlevel 7
Badge +6

Check this article: https://zapier.com/help/doc/tips-and-tricks-salesforce-triggers-and-actions#i-want-to-select-more-than-one-value-from-the-dropdown-field

@Troy Tessalone thank you so much for the quick reply!

My issue is I can’t get to the picklist value at all.  Here is a screenshot of what I am trying to do, which may be the complete wrong way of going about it.

“Salesforce Picklist Values” I am inserting later in the Zap which should match to a picklist in Salesforce

 

Userlevel 7
Badge +6

Can you provide a screenshot of the Salesforce step picklist field options you are trying to map the data point to?

@Troy Tessalone I actually got it to work!  I had the formatter utility lookup after the “find create record in salesforce” step which was to update the field value.  I recreated a zap with this in front and voila, it texted correctly.

 

Now on to create the same workflow to convert text into a two-letter country code for Salesforce.  Are you aware if there is a template for this in Zapier?  Or do I need to create another Lookup Table with every single country code in it :grimacing:

 

Thank you for the help!

Userlevel 7
Badge +6

Are you aware if there is a template for this in Zapier?

Or do I need to create another Lookup Table with every single country code in it?

No such template exists.

As an alternative you could use a GSheet and a GSheet Lookup Row action, which may be easier to create and maintain than a Formatter Lookup Table.

 

Thanks @Troy Tessalone , I also think it could be done via a javascript lookup with the “code” function.

 

I am getting a syntax error though, so need to troubleshoot further after dinner.

 

 

const isoCountries = {
'AF' : {
name: 'Afghanistan',
},
'AX' : {
name: 'Aland Islands',
},
'AL' : {
name: 'Albania',
},
'DZ' : {
name: 'Algeria',
},
'AS' : {
name: 'American Samoa',
},
'AD' : {
name: 'Andorra',
},
'AO' : {
name: 'Angola',
},
'AI' : {
name: 'Anguilla',
},
'AQ' : {
name: 'Antarctica',
},
'AG' : {
name: 'Antigua And Barbuda',
},
'AR' : {
name: 'Argentina',
},
'AM' : {
name: 'Armenia',
},
'AW' : {
name: 'Aruba',
},
'AU' : {
name: 'Australia',
},
'AT' : {
name: 'Austria',
},
'AZ' : {
name: 'Azerbaijan',
},
'BS' : {
name: 'Bahamas',
},
'BH' : {
name: 'Bahrain',
},
'BD' : {
name: 'Bangladesh',
},
'BB' : {
name: 'Barbados',
},
'BY' : {
name: 'Belarus',
},
'BE' : {
name: 'Belgium',
},
'BZ' : {
name: 'Belize',
},
'BJ' : {
name: 'Benin',
},
'BM' : {
name: 'Bermuda',
},
'BT' : {
name: 'Bhutan',
},
'BO' : {
name: 'Bolivia',
},
'BA' : {
name: 'Bosnia And Herzegovina',
},
'BW' : {
name: 'Botswana',
},
'BV' : {
name: 'Bouvet Island',
},
'BR' : {
name: 'Brazil',
},
'IO' : {
name: 'British Indian Ocean Territory',
},
'BN' : {
name: 'Brunei Darussalam',
},
'BG' : {
name: 'Bulgaria',
},
'BF' : {
name: 'Burkina Faso',
},
'BI' : {
name: 'Burundi',
},
'KH' : {
name: 'Cambodia',
},
'CM' : {
name: 'Cameroon',
},
'CA' : {
name: 'Canada',
},
'CV' : {
name: 'Cape Verde',
},
'KY' : {
name: 'Cayman Islands',
},
'CF' : {
name: 'Central African Republic',
},
'TD' : {
name: 'Chad',
},
'CL' : {
name: 'Chile',
},
'CN' : {
name: 'China',
},
'CX' : {
name: 'Christmas Island',
},
'CC' : {
name: 'Cocos (Keeling) Islands',
},
'CO' : {
name: 'Colombia',
},
'KM' : {
name: 'Comoros',
},
'CG' : {
name: 'Congo',
},
'CD' : {
name: 'Congo, Democratic Republic',
},
'CK' : {
name: 'Cook Islands',
},
'CR' : {
name: 'Costa Rica',
},
'CI' : {
name: 'Cote D\'Ivoire',
},
'HR' : {
name: 'Croatia',
},
'CU' : {
name: 'Cuba',
},
'CY' : {
name: 'Cyprus',
},
'CZ' : {
name: 'Czech Republic',
},
'DK' : {
name: 'Denmark',
},
'DJ' : {
name: 'Djibouti',
},
'DM' : {
name: 'Dominica',
},
'DO' : {
name: 'Dominican Republic',
},
'EC' : {
name: 'Ecuador',
},
'EG' : {
name: 'Egypt',
},
'SV' : {
name: 'El Salvador',
},
'GQ' : {
name: 'Equatorial Guinea',
},
'ER' : {
name: 'Eritrea',
},
'EE' : {
name: 'Estonia',
},
'ET' : {
name: 'Ethiopia',
},
'FK' : {
name: 'Falkland Islands (Malvinas)',
},
'FO' : {
name: 'Faroe Islands',
},
'FJ' : {
name: 'Fiji',
},
'FI' : {
name: 'Finland',
},
'FR' : {
name: 'France',
},
'GF' : {
name: 'French Guiana',
},
'PF' : {
name: 'French Polynesia',
},
'TF' : {
name: 'French Southern Territories',
},
'GA' : {
name: 'Gabon',
},
'GM' : {
name: 'Gambia',
},
'GE' : {
name: 'Georgia',
},
'DE' : {
name: 'Germany',
},
'GH' : {
name: 'Ghana',
},
'GI' : {
name: 'Gibraltar',
},
'GR' : {
name: 'Greece',
},
'GL' : {
name: 'Greenland',
},
'GD' : {
name: 'Grenada',
},
'GP' : {
name: 'Guadeloupe',
},
'GU' : {
name: 'Guam',
},
'GT' : {
name: 'Guatemala',
},
'GG' : {
name: 'Guernsey',
},
'GN' : {
name: 'Guinea',
},
'GW' : {
name: 'Guinea-Bissau',
},
'GY' : {
name: 'Guyana',
},
'HT' : {
name: 'Haiti',
},
'HM' : {
name: 'Heard Island & Mcdonald Islands',
},
'VA' : {
name: 'Holy See (Vatican City State)',
},
'HN' : {
name: 'Honduras',
},
'HK' : {
name: 'Hong Kong',
},
'HU' : {
name: 'Hungary',
},
'IS' : {
name: 'Iceland',
},
'IN' : {
name: 'India',
},
'ID' : {
name: 'Indonesia',
},
'IR' : {
name: 'Iran, Islamic Republic Of',
},
'IQ' : {
name: 'Iraq',
},
'IE' : {
name: 'Ireland',
},
'IM' : {
name: 'Isle Of Man',
},
'IL' : {
name: 'Israel',
},
'IT' : {
name: 'Italy',
},
'JM' : {
name: 'Jamaica',
},
'JP' : {
name: 'Japan',
},
'JE' : {
name: 'Jersey',
},
'JO' : {
name: 'Jordan',
},
'KZ' : {
name: 'Kazakhstan',
},
'KE' : {
name: 'Kenya',
},
'KI' : {
name: 'Kiribati',
},
'KR' : {
name: 'Korea',
},
'KW' : {
name: 'Kuwait',
},
'KG' : {
name: 'Kyrgyzstan',
},
'LA' : {
name: 'Lao People\'s Democratic Republic',
},
'LV' : {
name: 'Latvia',
},
'LB' : {
name: 'Lebanon',
},
'LS' : {
name: 'Lesotho',
},
'LR' : {
name: 'Liberia',
},
'LY' : {
name: 'Libyan Arab Jamahiriya',
},
'LI' : {
name: 'Liechtenstein',
},
'LT' : {
name: 'Lithuania',
},
'LU' : {
name: 'Luxembourg',
},
'MO' : {
name: 'Macao',
},
'MK' : {
name: 'Macedonia',
},
'MG' : {
name: 'Madagascar',
},
'MW' : {
name: 'Malawi',
},
'MY' : {
name: 'Malaysia',
},
'MV' : {
name: 'Maldives',
},
'ML' : {
name: 'Mali',
},
'MT' : {
name: 'Malta',
},
'MH' : {
name: 'Marshall Islands',
},
'MQ' : {
name: 'Martinique',
},
'MR' : {
name: 'Mauritania',
},
'MU' : {
name: 'Mauritius',
},
'YT' : {
name: 'Mayotte',
},
'MX' : {
name: 'Mexico',
},
'FM' : {
name: 'Micronesia, Federated States Of',
},
'MD' : {
name: 'Moldova',
},
'MC' : {
name: 'Monaco',
},
'MN' : {
name: 'Mongolia',
},
'ME' : {
name: 'Montenegro',
},
'MS' : {
name: 'Montserrat',
},
'MA' : {
name: 'Morocco',
},
'MZ' : {
name: 'Mozambique',
},
'MM' : {
name: 'Myanmar',
},
'NA' : {
name: 'Namibia',
},
'NR' : {
name: 'Nauru',
},
'NP' : {
name: 'Nepal',
},
'NL' : {
name: 'Netherlands',
},
'AN' : {
name: 'Netherlands Antilles',
},
'NC' : {
name: 'New Caledonia',
},
'NZ' : {
name: 'New Zealand',
},
'NI' : {
name: 'Nicaragua',
},
'NE' : {
name: 'Niger',
},
'NG' : {
name: 'Nigeria',
},
'NU' : {
name: 'Niue',
},
'NF' : {
name: 'Norfolk Island',
},
'MP' : {
name: 'Northern Mariana Islands',
},
'NO' : {
name: 'Norway',
},
'OM' : {
name: 'Oman',
},
'PK' : {
name: 'Pakistan',
},
'PW' : {
name: 'Palau',
},
'PS' : {
name: 'Palestinian Territory, Occupied',
},
'PA' : {
name: 'Panama',
},
'PG' : {
name: 'Papua New Guinea',
},
'PY' : {
name: 'Paraguay',
},
'PE' : {
name: 'Peru',
},
'PH' : {
name: 'Philippines',
},
'PN' : {
name: 'Pitcairn',
},
'PL' : {
name: 'Poland',
},
'PT' : {
name: 'Portugal',
},
'PR' : {
name: 'Puerto Rico',
},
'QA' : {
name: 'Qatar',
},
'RE' : {
name: 'Reunion',
},
'RO' : {
name: 'Romania',
},
'RU' : {
name: 'Russian Federation',
},
'RW' : {
name: 'Rwanda',
},
'BL' : {
name: 'Saint Barthelemy',
},
'SH' : {
name: 'Saint Helena',
},
'KN' : {
name: 'Saint Kitts And Nevis',
},
'LC' : {
name: 'Saint Lucia',
},
'MF' : {
name: 'Saint Martin',
},
'PM' : {
name: 'Saint Pierre And Miquelon',
},
'VC' : {
name: 'Saint Vincent And Grenadines',
},
'WS' : {
name: 'Samoa',
},
'SM' : {
name: 'San Marino',
},
'ST' : {
name: 'Sao Tome And Principe',
},
'SA' : {
name: 'Saudi Arabia',
},
'SN' : {
name: 'Senegal',
},
'RS' : {
name: 'Serbia',
},
'SC' : {
name: 'Seychelles',
},
'SL' : {
name: 'Sierra Leone',
},
'SG' : {
name: 'Singapore',
},
'SK' : {
name: 'Slovakia',
},
'SI' : {
name: 'Slovenia',
},
'SB' : {
name: 'Solomon Islands',
},
'SO' : {
name: 'Somalia',
},
'ZA' : {
name: 'South Africa',
},
'GS' : {
name: 'South Georgia And Sandwich Isl.',
},
'ES' : {
name: 'Spain',
},
'LK' : {
name: 'Sri Lanka',
},
'SD' : {
name: 'Sudan',
},
'SR' : {
name: 'Suriname',
},
'SJ' : {
name: 'Svalbard And Jan Mayen',
},
'SZ' : {
name: 'Swaziland',
},
'SE' : {
name: 'Sweden',
},
'CH' : {
name: 'Switzerland',
},
'SY' : {
name: 'Syrian Arab Republic',
},
'TW' : {
name: 'Taiwan',
},
'TJ' : {
name: 'Tajikistan',
},
'TZ' : {
name: 'Tanzania',
},
'TH' : {
name: 'Thailand',
},
'TL' : {
name: 'Timor-Leste',
},
'TG' : {
name: 'Togo',
},
'TK' : {
name: 'Tokelau',
},
'TO' : {
name: 'Tonga',
},
'TT' : {
name: 'Trinidad And Tobago',
},
'TN' : {
name: 'Tunisia',
},
'TR' : {
name: 'Turkey',
},
'TM' : {
name: 'Turkmenistan',
},
'TC' : {
name: 'Turks And Caicos Islands',
},
'TV' : {
name: 'Tuvalu',
},
'UG' : {
name: 'Uganda',
},
'UA' : {
name: 'Ukraine',
},
'AE' : {
name: 'United Arab Emirates',
},
'GB' : {
name: 'United Kingdom',
},
'US' : {
name: 'United States',
},
'UM' : {
name: 'United States Outlying Islands',
},
'UY' : {
name: 'Uruguay',
},
'UZ' : {
name: 'Uzbekistan',
},
'VU' : {
name: 'Vanuatu',
},
'VE' : {
name: 'Venezuela',
},
'VN' : {
name: 'Viet Nam',
},
'VG' : {
name: 'Virgin Islands, British',
},
'VI' : {
name: 'Virgin Islands, U.S.',
},
'WF' : {
name: 'Wallis And Futuna',
},
'EH' : {
name: 'Western Sahara',
},
'YE' : {
name: 'Yemen',
},
'ZM' : {
name: 'Zambia',
},
'ZW' : {
name: 'Zimbabwe'
},
};

convertCountryCode = (code) => {
return isoCountries[code].name;
}```

 

Reply