Create and assign countries and states

  • Updated

In Optimizely Configured Commerce, you can create and assign countries and states.

Create a country

Creating and assigning a country in the Admin Console lets you edit country information and use that country for shipping orders. Use the following steps to create a country and complete the fields to make it active.

  1. Go to Admin Console > Administration > Countries.
  2. Click Add Country.

    Add new country.png

  3. Enter the country's name in the Name field.
  4. Enter the country's abbreviation in the Abbreviation field. This abbreviation should be the same as the ISO alpha-2 Code, which is used in the next field.
  5. Enter the two-letter code in the ISO alpha-2 Code field.
  6. (Optional) Enter the two-letter code in the ISO alpha-3 Code field.
  7. (Optional) Enter the three-digit ISO number in the ISO Number field.
  8. (Optional) Choose the correct measurement system in the Distance Unit of Measure field drop-down list.
  9. Click the Active toggle to indicate whether this country is active or not.
  10. Set the Block Anonymous Traffic toggle to Yes to identify traffic by IP address from this country and then redirect it to the login page if it is not authenticated. This setting helps prevent people who live in countries you do not sell in from accessing your site, such as to scrape product and pricing information for their own purposes.

    You must set the Geo IP Geocoder API URL setting in the Admin Console. Otherwise, you receive a large amount of Application Logs with the error "Failed to determine user's country".

After you create the country, you should assign it to a website, even if you have only one. If the country is already active, and you modify it, you can save the content to accept the changes. 

Assign a country to a website

  1. Go to Admin Console > Websites.
  2. Click Edit for the desired country.
  3. Go to the Country finger tab.

    Countries tab.png

  4. Click Assign Countries.

    Select the country.png

  5. Search for and select the desired country. Click Assign, then Done.
  6. Click Save.

To unassign a country, repeat steps 1-3, then click Unassign

Create a state

Creating and assigning states in the Admin Console lets you modify tax and handling information for each state. Many states are pre-populated in the database and do not need to be manually entered. 

Use the following steps to create a state and complete the field to make it active. You create states within the Countries entity and assign them to a website.

  1. Go to Admin Console > AdministrationCountries.
  2. Click Edit for the desired country.
  3. Go to the States finger tab.
  4. Click Add State.
  5. Enter the state's Name.

    State details.png

  6. Enter the Abbreviation for the state. The abbreviation should be the alpha postal code.
  7. Select whether to make the state Active.
  8. Select whether to make the state Taxable.

    Tax information.png

  9. Enter the state's Tax Code. The tax code must correspond with the ERP's configuration. Generally, the tax code is the same as the abbreviation code.
  10. Enter the state's Tax Rate
    The state tax rate does not include local taxes. The tax rate will apply to all products in this state
  11. Select whether to Tax Freight from this state.
  12. Enter a Handling Amount. This is a global amount collected from each customer in the state.
  13. Click Save.

After you create the state, you should assign it to a website, even if you have only one. 

Assign a state to a website

  1. Go to Admin Console > Websites.
  2. Click Edit for the desired website.
  3. Go to the States finger tab.

    Assign a state.png

  4. Click Assign States.
  5. Search for and select the desired state.
  6. Click Assign, then Done.
  7. Click Save.

To unassign a state, repeat steps 1-3, then click Unassign