# Set up IVR Custom Key

A custom key lets an IVR (Interactive Voice Response, the automated phone menu callers hear) gate part of your call flow behind a PIN (Personal Identification Number, the numeric code a caller types on the phone keypad). When a caller reaches the menu and presses the key you define, Cloud Voice asks for a code and only forwards the call if the code checks out. This is handy when you want to keep a premium service or a dedicated support line reserved for verified callers. You can accept a single shared PIN or validate entries against a whole PIN list.

:::note
Your PBX (Private Branch Exchange, the phone system server) must be running firmware **84.16.0.70** or later. If it is on an older version, the custom key option will not appear.
:::

## Before you start

1. [Record or upload an IVR prompt](/pbx/administrator-guide/set-up-ivr-prompts/) that tells callers which key to press and to enter their PIN.
2. Optionally, [create a PIN list](/pbx/administrator-guide/add-a-pin-list/) if you want to validate callers against a set of codes rather than one shared code.

   :::note
   Skip the PIN list if a single PIN is all you need for the custom key.
   :::

## Configure the custom key

1. Sign in to the web portal and go to **Call Features > IVR**, then open the IVR you want to edit.
2. On the **Basic** tab, use the **Prompt** drop-down to choose the greeting that directs callers to the custom key.

   :::note
   You can queue up to five audio files. Cloud Voice plays them back in the order you list them.
   :::

   ![The Prompt drop-down on the IVR Basic tab with a greeting selected](/images/pbx/custom-key-prompt.png)

3. Open the **Key Press Event** tab and turn on custom keys.

   ![The Key Press Event tab with the Advanced Settings control in the top-right corner](/images/pbx/ivr-custom-key-prompt-window.png)

   1. Click **Advanced Settings** in the top-right corner.
   2. In the window that appears, tick **Custom Key** and click **Confirm**.
   3. Optional: Tick **Keep Current Settings** to preserve the key press events you already have in place.
   4. Click **OK**.

4. Define the key itself.

   ![The custom key row showing the Key Type and Destination drop-downs](/images/pbx/key-press-event-current-settings.png)

   :::tip
   Choose **Single Key** when one shared code is fine for everyone. Choose **PIN List** when you want to validate callers against several codes at once, for example a separate code per team, so you can manage them all in one place.
   :::

   1. Pick an option from the **Key Type** drop-down:
      - **Single Key**: Type the code in the **Value** field.

        :::caution
        A PIN can be no longer than 21 characters. A longer entry will be rejected when you save.
        :::
      - **PIN List**: Choose the list you want to validate against from the **PIN List** drop-down.
   2. Use the **Destination** drop-down to set where a caller lands after entering a valid code.

5. Optional: Scroll to the **Options** section and turn on an end key so callers can signal that they have finished typing and be routed immediately.

   :::caution
   With **End Key** switched on, do not use `*` or `#` anywhere in the custom key itself. Those characters double as the end-key signal, so a PIN that contains them will never match.
   :::

   ![The Options section with the End Key setting](/images/pbx/ivr-custom-key-options.png)

   1. Tick **End Key**.
   2. Choose either **Press the "#" key to end** or **Press the "*" key to end**.

6. Click **Save**, then **Apply**.

:::tip
Before you rely on the key, place a test call into the IVR and press it. Enter a valid PIN to confirm the call reaches the destination you set, then enter a wrong PIN to confirm it falls through to your Response Timeout or Invalid Input destination.
:::

## Result

Any caller who knows the PIN can press the key inside the IVR and be forwarded to the destination you assigned.

:::note
If your key press events also depend on time conditions, Cloud Voice validates the key first. A correct entry routes the call according to the applicable time condition; an incorrect entry sends the call to your Response Timeout or Invalid Input destination.
:::
