For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assign to countries

Show or hide an option set based on the country a customer is browsing from.

Some options are only relevant in certain markets — for example, a delivery-date picker for countries where you offer local delivery, engraving in a language your workshop supports, or a customs declaration field for export orders.

The Countries tab lets you control this with a single include-or-exclude list.

Before you start

  • Make sure you have an option set open in the builder and select Countries in the left sidebar.

  • Country rules are available only on certain plans. If Country restrictions is unavailable, see Compare plans.

  • Country restrictions are off by default, so the option set is shown in all countries.

Steps

1

Turn on Country restrictions

The block expands with two choices and a country selector.

2

Choose Include or Exclude

Choice
Behavior

Include

Show the option set only in the countries you select. Everywhere else, it does not render.

Exclude

Show the option set everywhere except the countries you select.

3

Select countries

Use the country field to search for and select countries. You can select as many as needed, and selected countries appear as removable entries.

4

Save

Select Save. The rule takes effect on the next storefront page load.

The Countries tab with country restrictions enabled, Include selected, and several countries chosen
One switch, one choice, one list — country targeting is deliberately simple.

Worked examples

You want
Set up

A delivery-date picker only where you deliver

Include — your delivery countries

No engraving on exports, because of lead times

Include — your home country only

Everything except two countries you cannot ship personalized goods to

Exclude — those two countries

Local pickup options for one country

Include — that country

A customs declaration field for international orders only

Exclude — your home country

How the country is determined

The country is based on the storefront's localization — specifically, the country or market the visitor is currently browsing. Shopify determines this based on the visitor's location and any country selector provided by your theme.

There are two important things to keep in mind:

  • It uses the browsing country, not the shipping address. The customer has not reached checkout yet, so there is no shipping address for the app to use.

  • Changing the country in your theme's country selector changes which option sets are shown. The change takes effect on the next page load.

If your store uses Shopify Markets, country restrictions work alongside it. Shopify Markets controls pricing and product availability, while this rule controls whether the option set is displayed. They work independently, so a country can be included in an active market but still be excluded by this rule.

Notes

  • Country restrictions narrow the scope of an option set; they never expand it. The product rule still determines which products are in scope.

  • With Include selected and no countries chosen, the option set will not be displayed anywhere. Select at least one country or turn off the restriction.

  • The builder's live preview does not apply country rules. To test them, use your storefront and switch countries using your theme's country selector.

  • Country rules apply to the Online Store. POS orders are placed in person, so country restrictions do not apply to them.

Last updated

Was this helpful?