# Map country fields

Add the fields required for the country of your invoice after mapping your source data to GETS. You need an integration with GETS field mapping and a sample for that country.

> **Before you start**
>
> Complete [Map your fields to GETS](https://docs.complyance.io/one-platform/developer-portal/integration-engine/gets-mapping/) for the selected country and transaction type. Use a sample that includes the country-specific data your invoices will send. Requirements differ by country, document type and scenario.

## Complete the country mapping

1. In **Field Mapping**, open the **Country Mapping** tab. It appears once a country is selected and shows **Country-Specific Fields** with the counts of total, mapped and pending mandatory fields. For an existing integration, choose **Edit Country Mapping**, then select the country and sample payload and choose **Proceed**.
2. Use **Search Field** or the section selector to find a field. Check the **Mandatory** count for fields that still need a match.
3. Match each required country field to its source field. Review the sample value as well as the name: a field can be mapped yet contain a value the country does not accept.
4. Choose **Next** after the mandatory fields are mapped. If **Next** is unavailable, return to the unmatched mandatory fields and supply missing source data in the sample.

Find the exact fields and conditions in [Country extensions](https://docs.complyance.io/api-reference/gets/country-extensions/). For UAE invoices, [UAE fields](https://docs.complyance.io/countries/ae/fields/) and [UAE code lists](https://docs.complyance.io/countries/ae/code-lists/) show the applicable terms and allowed coded values. Do not map every country extension to a fixed value; only provide a field when it applies to the document.

## If something goes wrong

**A mandatory field is missing from the sample:** obtain it from the source system and select a sample that includes it. Do not substitute an unrelated field to enable **Next**.

**A conditional field fails validation:** check the document type and scenario in the field reference, then correct the value or mapping and run the test again.

**The wrong country appears:** check the integration’s selected country. Add another country to the integration rather than using fields from a different country in this mapping.

Next, [test your mapping](https://docs.complyance.io/one-platform/developer-portal/integration-engine/test/) with a representative invoice.

Source: https://docs.complyance.io/one-platform/developer-portal/integration-engine/country-mapping/
