Update your Shopify Checkout to retrieve the NIF for shipments to the Canary Islands
Shipments to the Canary Islands are subject to customs, and a tax identifier, called NIF, is required. This article focuses on how to update your Shopify Checkout in order to retrieve the NIF effortlessly as soon as the destination is part of the Canary Islands.
For more information about shipments to Canary Islands, read our dedicated article.
This setup is only available for Shopify Plus users as it requires access to Checkout Blocks.
1 - Start creating a new checkout block
- Go to Shopify Admin > Checkout Blocks > Blocks, and click Create Block

- Select bloc type Custom field and select Blank template

2 - Complete the Block name and the Content sections
- In the Block name section, input an internal name, e.g. NIF
- In the Content section, in Fields, click Add custom field, select Text input, and in the modal:
- Tick the Required field checkbox
- In Field label, input what your buyers should see, e.g. "NIF (for shipments to the Canary Islands)"
-
In Key, input es_nif
⚠️ It's critical to input exactly es_nif for Bigblue to be able to read the field
- In Customer error message, optionally input "A valid identification number is required for shipments to Canary Islands"
- In Regular expression, input
(?:^|\s)([[:alpha:]]\d{8}|[[:alnum:]]\d{7}[[:alpha:]])(?:$|\s)

-
In the Content section, in Settings, ensure that your save form fields as Order metafield
⚠️ It's critical to save the custom field as an order metafield for Bigblue to be able to read it

3 - Complete the Display rules section
- In the Display rules section, click Add display rule, and in the modal, select Shipping province

- In the Display rules section, click on Select a province and in the modal, search for Spain, show the full list, and select Las Palmas and Santa Cruz de Tenerife

4 - Double check, save and publish
- Ensure the settings are right, kindly pay extra-attention to those parts:
- the field key is es_nif,
- the form field is saved as an order metafield,
- the display rules ensure that the field only shows for the two provinces in Spain corresponding to the Canary Islands.

- Save all changes

- Activate the checkout block
5 - Test the setup
We recommend testing the setup (by creating a fake order) to ensure it's working as expected:
- at checkout, test a few addresses to ensure that the block is only displayed for the Canary Islands
- at checkout, also test a few NIF to ensure the format constraints are correct
- in Bigblue, check the order page to ensure the NIF appears in the customer details' part
If you need assistance, please contact our support team.