# AppConfig Payload

> Send configuration keys and values to an iOS or Android app with the AppConfig payload in a Device Application.

Source: https://docs.capaone.com/capainstaller/the-capainstaller-console/configuration-management/how-to-use-configuration-management/working-with-devices/device-applications/appconfig-payload/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

Use the AppConfig payload to send configuration keys and values to an app on iOS and Android devices. For example, you can preconfigure the mail server and the user's email address in a mail app. [AppConfig](https://www.appconfig.org/) is a standard that many app vendors support.

:::note[Before you start]
- The app must support managed app configuration. The app vendor's documentation lists the keys and values that the app accepts.
- On Android, the device must run the CapaInstaller Android agent.
:::

The AppConfig payload only sends the keys and values to the app. What the app does with them depends on the app. Test the configuration on your own devices before you deploy it widely.

## Add AppConfig to a Device Application

A Device Application can only hold one payload from each platform. AppConfig is the exception: you add it next to the app payload for the same platform, in the same Device Application.

1. In **Configuration Management**, expand a root Configuration Management Point, and then expand **Applications and Packages**.
2. Right-click **Device Applications** and select **Create application**, or right-click an existing Device Application and select **Edit**.
3. Add the app payload, for example **App Store** (iOS) or **Google Play** (Android), and select the app.
4. In the same platform category, click **AppConfig**. The payload is added to the Device Application.
5. Add the keys and values. See [iOS settings](#ios-settings) or [Android settings](#android-settings).
6. Enter an **Application name** and click **OK**.
7. Link the Device Application to the devices, users, or groups that need the app.

The device receives the configuration when the Device Application is installed.

For step-by-step examples, see [How to install MS Outlook App on Android device and configure it using AppConfig](/capainstaller/knowledge-base/how-to-install-ms-outlook-app-on-android-device-and-configure-it-using-appconfig/) and [How to install Outlook app on an iOS device and configure Outlook using AppConfig](/capainstaller/knowledge-base/how-to-install-outlook-app-on-an-ios-device-and-configure-outlook-using-appconfig/).

## iOS settings

Click **Create key/value** to add a row for each key. Each row has these fields:

| Field | Description |
|:------|:------------|
| Key | The configuration key, exactly as the app vendor documents it. |
| Type | The data type of the value: **String**, **Int**, **Boolean**, **Float**, or **DateTime**. The value field changes to match the type. |
| Value | The value to send to the app. |

Click **Remove Row** to delete a row.

## Android settings

When the Device Application also contains an Android app payload, the app details in the AppConfig payload are filled in from that payload.

| Setting | Description |
|:--------|:------------|
| **Search** | Select the app to configure, if it isn't filled in from the app payload. |
| **Name**, **Vendor**, **Identifier**, **Google Play URL**, **Icon** | Details of the selected app. **Identifier** is the app's package name, for example `com.microsoft.office.outlook`. |
| **Launch App after configuration** | Starts the app after the configuration is applied. Some apps need this before they use the new settings. |
| **Launch App after clearing of configuration** | Starts the app after the configuration is cleared, for example when you remove the Device Application. |
| **App Version**, **App VersionCode** | The app version that the loaded configuration belongs to. |

To add the keys:

- Click **Load configurations** to load the configuration keys the app supports. This works when CapaInstaller has received the app's configuration schema from a device where the app is installed. If not, the version fields show **No config found**.
- Click **Create key/value** to add a key yourself. Select the type: **String**, **Bool**, **Choice**, **Hidden**, or **Integer**.

Click **Remove Setting** to delete a key.

## Use variables in values

You can use user and device variables in values instead of fixed text. For example, `$Email$` is replaced with the email address of the device's primary user, from Active Directory. Type `$` in a value field to see the list of variables. For the full list, see [Profile Editor](/capainstaller/the-capainstaller-console/configuration-management/how-to-use-configuration-management/working-with-devices/profile-editor/).
