Skip to content

Instantly share code, notes, and snippets.

@W3BGUY
Last active November 10, 2021 16:54
Show Gist options
  • Save W3BGUY/ff3438a919b3041f84d5cb660d7ca9ea to your computer and use it in GitHub Desktop.
Save W3BGUY/ff3438a919b3041f84d5cb660d7ca9ea to your computer and use it in GitHub Desktop.
#Jitterbit #Country Codes Conversion - #ISO3166-1 Alpha-2 format to #NetSuite format
$countryCodeDict=Dict();
AddToDict('countryCodeDict','AF','_afghanistan');
AddToDict('countryCodeDict','AX','_alandIslands');
AddToDict('countryCodeDict','AL','_albania');
AddToDict('countryCodeDict','DZ','_algeria');
AddToDict('countryCodeDict','AS','_americanSamoa');
AddToDict('countryCodeDict','AD','_andorra');
AddToDict('countryCodeDict','AO','_angola');
AddToDict('countryCodeDict','AI','_anguilla');
AddToDict('countryCodeDict','AQ','_antarctica');
AddToDict('countryCodeDict','AG','_antiguaAndBarbuda');
AddToDict('countryCodeDict','AR','_argentina');
AddToDict('countryCodeDict','AM','_armenia');
AddToDict('countryCodeDict','AW','_aruba');
AddToDict('countryCodeDict','AU','_australia');
AddToDict('countryCodeDict','AT','_austria');
AddToDict('countryCodeDict','AZ','_azerbaijan');
AddToDict('countryCodeDict','BS','_bahamas');
AddToDict('countryCodeDict','BH','_bahrain');
AddToDict('countryCodeDict','BD','_bangladesh');
AddToDict('countryCodeDict','BB','_barbados');
AddToDict('countryCodeDict','BY','_belarus');
AddToDict('countryCodeDict','BE','_belgium');
AddToDict('countryCodeDict','BZ','_belize');
AddToDict('countryCodeDict','BJ','_benin');
AddToDict('countryCodeDict','BM','_bermuda');
AddToDict('countryCodeDict','BT','_bhutan');
AddToDict('countryCodeDict','BO','_bolivia');
AddToDict('countryCodeDict','BQ','_bonaireSaintEustatiusAndSaba');
AddToDict('countryCodeDict','BA','_bosniaAndHerzegovina');
AddToDict('countryCodeDict','BW','_botswana');
AddToDict('countryCodeDict','BV','_bouvetIsland');
AddToDict('countryCodeDict','BR','_brazil');
AddToDict('countryCodeDict','IO','_britishIndianOceanTerritory');
AddToDict('countryCodeDict','BN','_bruneiDarussalam');
AddToDict('countryCodeDict','BG','_bulgaria');
AddToDict('countryCodeDict','BF','_burkinaFaso');
AddToDict('countryCodeDict','BI','_burundi');
AddToDict('countryCodeDict','KH','_cambodia');
AddToDict('countryCodeDict','CM','_cameroon');
AddToDict('countryCodeDict','CA','_canada');
AddToDict('countryCodeDict','KY','_caymanIslands');
AddToDict('countryCodeDict','CF','_centralAfricanRepublic');
AddToDict('countryCodeDict','TD','_chad');
AddToDict('countryCodeDict','CL','_chile');
AddToDict('countryCodeDict','CN','_china');
AddToDict('countryCodeDict','CX','_christmasIsland');
AddToDict('countryCodeDict','CC','_cocosKeelingIslands');
AddToDict('countryCodeDict','CO','_colombia');
AddToDict('countryCodeDict','KM','_comoros');
AddToDict('countryCodeDict','CD','_congoDemocraticPeoplesRepublic');
AddToDict('countryCodeDict','CG','_congoRepublicOf');
AddToDict('countryCodeDict','CK','_cookIslands');
AddToDict('countryCodeDict','CR','_costaRica');
AddToDict('countryCodeDict','CI','_coteDIvoire');
AddToDict('countryCodeDict','HR','_croatiaHrvatska');
AddToDict('countryCodeDict','CU','_cuba');
AddToDict('countryCodeDict','CW','_curacao');
AddToDict('countryCodeDict','CY','_cyprus');
AddToDict('countryCodeDict','CZ','_czechRepublic');
AddToDict('countryCodeDict','DK','_denmark');
AddToDict('countryCodeDict','DJ','_djibouti');
AddToDict('countryCodeDict','DM','_dominica');
AddToDict('countryCodeDict','DO','_dominicanRepublic');
AddToDict('countryCodeDict','TL','_eastTimor');
AddToDict('countryCodeDict','EC','_ecuador');
AddToDict('countryCodeDict','EG','_egypt');
AddToDict('countryCodeDict','SV','_elSalvador');
AddToDict('countryCodeDict','GQ','_equatorialGuinea');
AddToDict('countryCodeDict','ER','_eritrea');
AddToDict('countryCodeDict','EE','_estonia');
AddToDict('countryCodeDict','ET','_ethiopia');
AddToDict('countryCodeDict','FK','_falklandIslands');
AddToDict('countryCodeDict','FO','_faroeIslands');
AddToDict('countryCodeDict','FJ','_fiji');
AddToDict('countryCodeDict','FI','_finland');
AddToDict('countryCodeDict','FR','_france');
AddToDict('countryCodeDict','GF','_frenchGuiana');
AddToDict('countryCodeDict','PF','_frenchPolynesia');
AddToDict('countryCodeDict','TF','_frenchSouthernTerritories');
AddToDict('countryCodeDict','GA','_gabon');
AddToDict('countryCodeDict','GM','_gambia');
AddToDict('countryCodeDict','GE','_georgia');
AddToDict('countryCodeDict','DE','_germany');
AddToDict('countryCodeDict','GH','_ghana');
AddToDict('countryCodeDict','GI','_gibraltar');
AddToDict('countryCodeDict','GR','_greece');
AddToDict('countryCodeDict','GL','_greenland');
AddToDict('countryCodeDict','GD','_grenada');
AddToDict('countryCodeDict','GP','_guadeloupe');
AddToDict('countryCodeDict','GU','_guam');
AddToDict('countryCodeDict','GT','_guatemala');
AddToDict('countryCodeDict','GG','_guernsey');
AddToDict('countryCodeDict','GN','_guinea');
AddToDict('countryCodeDict','GW','_guineaBissau');
AddToDict('countryCodeDict','GY','_guyana');
AddToDict('countryCodeDict','HT','_haiti');
AddToDict('countryCodeDict','HM','_heardAndMcDonaldIslands');
AddToDict('countryCodeDict','VA','_holySeeCityVaticanState');
AddToDict('countryCodeDict','HN','_honduras');
AddToDict('countryCodeDict','HK','_hongKong');
AddToDict('countryCodeDict','HU','_hungary');
AddToDict('countryCodeDict','IS','_iceland');
AddToDict('countryCodeDict','IN','_india');
AddToDict('countryCodeDict','ID','_indonesia');
AddToDict('countryCodeDict','IR','_iranIslamicRepublicOf');
AddToDict('countryCodeDict','IQ','_iraq');
AddToDict('countryCodeDict','IE','_ireland');
AddToDict('countryCodeDict','IM','_isleOfMan');
AddToDict('countryCodeDict','IL','_israel');
AddToDict('countryCodeDict','IT','_italy');
AddToDict('countryCodeDict','JM','_jamaica');
AddToDict('countryCodeDict','JP','_japan');
AddToDict('countryCodeDict','JE','_jersey');
AddToDict('countryCodeDict','JO','_jordan');
AddToDict('countryCodeDict','KZ','_kazakhstan');
AddToDict('countryCodeDict','KE','_kenya');
AddToDict('countryCodeDict','KI','_kiribati');
AddToDict('countryCodeDict','KP','_koreaDemocraticPeoplesRepublic');
AddToDict('countryCodeDict','KR','_koreaRepublicOf');
AddToDict('countryCodeDict','KW','_kuwait');
AddToDict('countryCodeDict','KG','_kyrgyzstan');
AddToDict('countryCodeDict','LA','_laoPeoplesDemocraticRepublic');
AddToDict('countryCodeDict','LV','_latvia');
AddToDict('countryCodeDict','LB','_lebanon');
AddToDict('countryCodeDict','LS','_lesotho');
AddToDict('countryCodeDict','LR','_liberia');
AddToDict('countryCodeDict','LY','_libya');
AddToDict('countryCodeDict','LI','_liechtenstein');
AddToDict('countryCodeDict','LT','_lithuania');
AddToDict('countryCodeDict','LU','_luxembourg');
AddToDict('countryCodeDict','MO','_macau');
AddToDict('countryCodeDict','MK','_macedonia');
AddToDict('countryCodeDict','MG','_madagascar');
AddToDict('countryCodeDict','MW','_malawi');
AddToDict('countryCodeDict','MY','_malaysia');
AddToDict('countryCodeDict','MV','_maldives');
AddToDict('countryCodeDict','ML','_mali');
AddToDict('countryCodeDict','MT','_malta');
AddToDict('countryCodeDict','MH','_marshallIslands');
AddToDict('countryCodeDict','MQ','_martinique');
AddToDict('countryCodeDict','MR','_mauritania');
AddToDict('countryCodeDict','MU','_mauritius');
AddToDict('countryCodeDict','YT','_mayotte');
AddToDict('countryCodeDict','MX','_mexico');
AddToDict('countryCodeDict','FM','_micronesiaFederalStateOf');
AddToDict('countryCodeDict','MD','_moldovaRepublicOf');
AddToDict('countryCodeDict','MC','_monaco');
AddToDict('countryCodeDict','MN','_mongolia');
AddToDict('countryCodeDict','ME','_montenegro');
AddToDict('countryCodeDict','MS','_montserrat');
AddToDict('countryCodeDict','MA','_morocco');
AddToDict('countryCodeDict','MZ','_mozambique');
AddToDict('countryCodeDict','MM','_myanmar');
AddToDict('countryCodeDict','NA','_namibia');
AddToDict('countryCodeDict','NR','_nauru');
AddToDict('countryCodeDict','NP','_nepal');
AddToDict('countryCodeDict','NL','_netherlands');
AddToDict('countryCodeDict','NC','_newCaledonia');
AddToDict('countryCodeDict','NZ','_newZealand');
AddToDict('countryCodeDict','NI','_nicaragua');
AddToDict('countryCodeDict','NE','_niger');
AddToDict('countryCodeDict','NG','_nigeria');
AddToDict('countryCodeDict','NU','_niue');
AddToDict('countryCodeDict','NF','_norfolkIsland');
AddToDict('countryCodeDict','MP','_northernMarianaIslands');
AddToDict('countryCodeDict','NO','_norway');
AddToDict('countryCodeDict','OM','_oman');
AddToDict('countryCodeDict','PK','_pakistan');
AddToDict('countryCodeDict','PW','_palau');
AddToDict('countryCodeDict','PA','_panama');
AddToDict('countryCodeDict','PG','_papuaNewGuinea');
AddToDict('countryCodeDict','PY','_paraguay');
AddToDict('countryCodeDict','PE','_peru');
AddToDict('countryCodeDict','PH','_philippines');
AddToDict('countryCodeDict','PN','_pitcairnIsland');
AddToDict('countryCodeDict','PL','_poland');
AddToDict('countryCodeDict','PT','_portugal');
AddToDict('countryCodeDict','PR','_puertoRico');
AddToDict('countryCodeDict','QA','_qatar');
AddToDict('countryCodeDict','RE','_reunionIsland');
AddToDict('countryCodeDict','RO','_romania');
AddToDict('countryCodeDict','RU','_russianFederation');
AddToDict('countryCodeDict','RW','_rwanda');
AddToDict('countryCodeDict','BL','_saintBarthelemy');
AddToDict('countryCodeDict','SH','_saintHelena');
AddToDict('countryCodeDict','KN','_saintKittsAndNevis');
AddToDict('countryCodeDict','LC','_saintLucia');
AddToDict('countryCodeDict','MF','_saintMartin');
AddToDict('countryCodeDict','VC','_saintVincentAndTheGrenadines');
AddToDict('countryCodeDict','WS','_samoa');
AddToDict('countryCodeDict','SM','_sanMarino');
AddToDict('countryCodeDict','ST','_saoTomeAndPrincipe');
AddToDict('countryCodeDict','SA','_saudiArabia');
AddToDict('countryCodeDict','SN','_senegal');
AddToDict('countryCodeDict','RS','_serbia');
AddToDict('countryCodeDict','SC','_seychelles');
AddToDict('countryCodeDict','SL','_sierraLeone');
AddToDict('countryCodeDict','SG','_singapore');
AddToDict('countryCodeDict','SX','_sintMaarten');
AddToDict('countryCodeDict','SK','_slovakRepublic');
AddToDict('countryCodeDict','SI','_slovenia');
AddToDict('countryCodeDict','SB','_solomonIslands');
AddToDict('countryCodeDict','SO','_somalia');
AddToDict('countryCodeDict','ZA','_southAfrica');
AddToDict('countryCodeDict','GS','_southGeorgia');
AddToDict('countryCodeDict','SS','_southSudan');
AddToDict('countryCodeDict','ES','_spain');
AddToDict('countryCodeDict','LK','_sriLanka');
AddToDict('countryCodeDict','PS','_stateOfPalestine');
AddToDict('countryCodeDict','PM','_stPierreAndMiquelon');
AddToDict('countryCodeDict','SD','_sudan');
AddToDict('countryCodeDict','SR','_suriname');
AddToDict('countryCodeDict','SJ','_svalbardAndJanMayenIslands');
AddToDict('countryCodeDict','SE','_sweden');
AddToDict('countryCodeDict','CH','_switzerland');
AddToDict('countryCodeDict','SY','_syrianArabRepublic');
AddToDict('countryCodeDict','TW','_taiwan');
AddToDict('countryCodeDict','TJ','_tajikistan');
AddToDict('countryCodeDict','TZ','_tanzania');
AddToDict('countryCodeDict','TH','_thailand');
AddToDict('countryCodeDict','TG','_togo');
AddToDict('countryCodeDict','TK','_tokelau');
AddToDict('countryCodeDict','TO','_tonga');
AddToDict('countryCodeDict','TT','_trinidadAndTobago');
AddToDict('countryCodeDict','TN','_tunisia');
AddToDict('countryCodeDict','TR','_turkey');
AddToDict('countryCodeDict','TM','_turkmenistan');
AddToDict('countryCodeDict','TC','_turksAndCaicosIslands');
AddToDict('countryCodeDict','TV','_tuvalu');
AddToDict('countryCodeDict','UG','_uganda');
AddToDict('countryCodeDict','UA','_ukraine');
AddToDict('countryCodeDict','AE','_unitedArabEmirates');
AddToDict('countryCodeDict','GB','_unitedKingdom');
AddToDict('countryCodeDict','US','_unitedStates');
AddToDict('countryCodeDict','UY','_uruguay');
AddToDict('countryCodeDict','UM','_uSMinorOutlyingIslands');
AddToDict('countryCodeDict','UZ','_uzbekistan');
AddToDict('countryCodeDict','VU','_vanuatu');
AddToDict('countryCodeDict','VE','_venezuela');
AddToDict('countryCodeDict','VN','_vietnam');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment