# Ask: Zipcode

The **Ask: Zipcode** node allows you to request a user's postal code (zip code). This node is specifically designed to capture postal codes for either the Netherlands (`nl`) or Germany (`de`), ensuring proper validation based on the selected country.

The node will attempt to extract the postal code for any arbitrary utterance. On voice channels, this allows users to pronounce this zip code, 1820 AK, as follows:

* eighteen twenty A K
* one eight two zero Alpha Kilo

After extracting a valid zip code, the node will ask the user for confirmation. In that process of asking for confirmation a user can also directly provide their correct zip code if the initial zip code was incorrect, as is shown in the screenshot below.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FeFkgngnNwkx3jgfWV9xk%2FCleanShot%202025-03-12%20at%2013.02.38%402x.png?alt=media&#x26;token=c3ba583a-ee9f-4ce2-a16a-4301466751c1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FO6Eem7ERmw3anI8A05fD%2FCleanShot%202025-03-12%20at%2012.30.20%402x.png?alt=media&#x26;token=cd981612-bb94-4843-bfc2-2e9c4535b3fd" alt="" width="375"><figcaption></figcaption></figure>

### Validation Rules

* **Netherlands (`nl`)**:
  * Must be exactly six characters: four digits followed by a space and two uppercase letters.
  * Example: `1234 AB`
* **Germany (`de`)**:
  * Must be exactly five digits.
  * Example: `80331`

These validation rules are not exhaustive; the validation is done via Regular Expressions which check some extra edge cases (e.g. Dutch postal codes cannot start with a `0`).

### Node properties

| **Question**       | The message shown to the user asking for their zip code.                                                                                          | Yes |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| **Try Again (1)**  | The repeat question when wrong input is provided                                                                                                  | No  |
| **Try Again (2)**  | The repeat question when wrong input is provided                                                                                                  | No  |
| **Remember**       | To also store the variable in the user object                                                                                                     | No  |
| **Record audio** ☎ | On phone channels there is an option to record the audio of the answer                                                                            | No  |
| **Assign to**      | The variable where the collected zip code will be stored.                                                                                         | No  |
| **Assign to SMD**  | <p>The Speech Markdown variable for voice interactions.</p><p>This will pronounce the zip code more clearly than the regular stored variable.</p> | No  |
| **Country Code**   | Defines the expected zip code format (`nl` for Dutch or `de` for German zip codes).                                                               | Yes |

## Resources

* [zipcode-flows](https://manuals.dialox.ai/store/skills/zipcode-flows "mention")
