# Export and Import Inbound Caller ID Reformatting Rules

Inbound caller ID reformatting rules control how a caller's number is rewritten on incoming calls before it reaches your extensions, for example stripping a country code or adding a prefix so numbers display in a consistent format. Cloud Voice lets you download all of a trunk's rules as a CSV (comma-separated values) file. That file doubles as a template: edit it offline to add, adjust, or remove rules, then upload it back into the same trunk. Editing in a spreadsheet is faster than changing rules one at a time in the web portal, and the exported file makes a handy backup. This page covers both directions, export and import.

:::note
A trunk is the connection between your PBX (Private Branch Exchange, your phone system) and the outside phone network. Reformatting rules live on each trunk individually, so you export and import them one trunk at a time.
:::

## Export the rules

Exporting produces a CSV copy of every inbound caller ID reformatting rule on a trunk, which you can then work on in a spreadsheet editor.

1. Sign in to the PBX web portal and go to **Extension and Trunk** > **Trunk**, then open the trunk you want to edit.
2. Switch to the **Inbound Caller ID Reformatting** tab and click **Export**.

   The CSV file downloads to your computer. For a breakdown of each column and the values it accepts, see [Inbound Caller ID Reformatting Rule Parameters](/pbx/administrator-guide/import-and-export-parameters-inbound-caller-id-reformatting-rule/).

## Import the rules

:::tip
Export the trunk's rules first and build on that CSV as your starting template. Beginning from a valid file saves time and helps you avoid formatting mistakes.
:::

Before you import, confirm the file meets these requirements:

- **Format**: UTF-8 CSV (UTF-8 is the text encoding; saving in another encoding can garble characters)
- **Size**: under 5 MB
- **File name**: fewer than 127 characters
- **Parameters**: every value must satisfy the field rules described in [Inbound Caller ID Reformatting Rule Parameters](/pbx/administrator-guide/import-and-export-parameters-inbound-caller-id-reformatting-rule/).

:::caution
If the file breaks any requirement above (wrong encoding, too large, an over-long name, or a value that fails a field rule), the import is rejected. Fix the file and try again.
:::

To import:

1. Sign in to the PBX web portal and go to **Extension and Trunk** > **Trunk**, then open the trunk you want to edit.
2. On the **Inbound Caller ID Reformatting** tab, click **Import**.
3. In the dialog that opens, click **Browse** and choose your CSV file.
4. Click **Import**.

   The rules from the file appear in the **Inbound Caller ID Reformatting** list.
