Get Clean Country Name
This service streamlines data management by standardizing and cleaning country names in your database. It automatically corrects inconsistencies, removes formatting errors, and ensures all country names conform to a uniform standard.
Service Name: Get Clean Country Name
Service Type: Basic Utility Services
Service Description
You can use this service to get a clean country from a raw country. For example,
- You have a String named rawCountry with the value “AF” The API will return the String with the value “Afghanistan”.
Please note that the request parameters values (in step 2) and Marketo Fields (in step 4) are just examples. You have to enter the values as per your service requirement.
Steps to configure service getCleanCountryName in Marketo
1. Go to Admin and click Webhooks. Click New Webhook.
2. Name and configure your webhook for service getCleanCountryName.

Webhook Name: Name of the webhook. In the above example, the Webhook name is the same as the Service name. Webhook name can be provided as per requirement.
URL: The URL of the service getCleanCountryName. The URL has domain and query parameters that will remain the same. You just have to change the parameter values with Marketo Token. To insert a token, click Insert Token.
Template: It will remain blank.
Request Token Encoding: For the POST method it will remain None, and for GET this field will be disabled and the default value of the field will be Form/URL.
Response type: Select the response format as JSON.
Request Type: The Request Type will remain the same (i.e. GET) as given in the example.
3. Add Authentication Header.

Please note that the auth-key shown above is the original auth-key. So, the same value of auth-key and Content-Type should be used while configuring Webhook as shown.
- Response Mappings: Response Mappings are created via a pairing of a Response Attribute. The Response attribute depends on the output you are returning from the Custom service JavaScript function. It is recommended to return JSON from the custom service so that you can easily map it with the Marketo field.
