## Activated Parameters

Activated parameters allow you to select which Kevel Audience attributes and segments to use in your destinations.

In order to use any attribute or segment in any of your destinations you must first list relevant attributes/segments for that destination.

### To Add an Attribute to the Activated Parameters

1. Click **Add parameter**;
2. Input the name to which you will refer to that attribute in the [Templated Fields](https://docs.audience.kevel.com/activations/configuration-glossary#templated-fields) of your [Destination](https://docs.audience.kevel.com/activations/user-data-destinations) in the _Parameter Name_ column;
3. Select **Attribute** from the Attribute/Segment dropdown;
4. Select the relevant [Kevel Audience attribute](https://docs.audience.kevel.com/segment/user-attributes) in the _Attribute or Segment_ column. The dropdown auto-complete is updated periodically with all attributes that exist in user profiles across the system. You can see the list at [User Attributes](https://docs.audience.kevel.com/segment/user-attributes).

### To Add a Segment to the Activated Parameters

1. Click **Add parameter**;
2. Input the name to which you will refer to that segment in the [Templated Fields](https://docs.audience.kevel.com/activations/configuration-glossary#templated-fields) of your [Destination](https://docs.audience.kevel.com/activations/user-data-destinations) in the _Parameter Name_ column;
3. Select **Segment** from the Attribute/Segment dropdown;
4. Select the relevant [Kevel Audience segment](https://docs.audience.kevel.com/segment/segments#segment-creation) in the _Attribute_ or Segment_ column.
5. The segment will evaluate to either `true` or `false` so you need to chose which value you want to use in your destination for each case.

### What If the User Profile Does Not Include All of Defined Activated Parameters?

By default, if the user profile is missing all of the defined activated parameters, it won't be activated. However, you can change this behavior with the **Require Activation Parameters** config.

**Note**: When selecting _"No, always activate the user"_, have that in consideration when filling the templated fields because you may not have access to any activated attribute.

Once you've selected all relevant [Activated Parameters](https://docs.audience.kevel.com/activations/configuration-glossary#activated-parameters), you can now start using them in the [Templated Fields](https://docs.audience.kevel.com/activations/configuration-glossary#templated-fields).

## Templated Fields

In [Destination](https://docs.audience.kevel.com/activations/user-data-destinations) forms, a **Templated Field** is a field which can be interpolated using [Liquid templating language](https://shopify.github.io/liquid/) and is marked with a "icon".

### Exposed Fields

There are two objects exposed to the templated fields:

- **parameters**: defined by the [Activated Parameters](https://docs.audience.kevel.com/activations/configuration-glossary#activated-parameters)
  - If _parameter_name_ refers to an attribute, `{{ parameters["parameter_name"] }}` will be replaced by the parameter value;
  - If _parameter_name_ refers to a segment, `{{ parameters["parameter_name"] }}` will be replaced with the `valueIfTrue` and `valueIfFalse` values if the segment is true or false, accordingly.
- **meta**: meta attributes used in the activation  
  - Namely: **USER_ID** and **USER_ID_TYPE**;  
  - These can be accessed with `{{ meta["USER_ID"] }}`.

### Using the `parameters` Object Safely

However, the recommended way to use the `parameters` object is using it as an opaque structure (which will **only** contain attributes/segments mapped in the activated parameters that exist in the user profile).

Given the `parameters` object: `{a: 1, b:2}`:

#### For URL Use the `query_params` Filter

The templated field `https://example.org?{{ parameters | query_params }}` will render `https://example.org?a=1&b=2`.

#### For JSON Use the `json` Filter

The templated field `{{parameters | json}}` will render `{"a": 1, "b": 2}`.

### Using Properties of the `parameters` Directly

Given the `parameters` object: `{a: 1, b:2}`:

The templated field `https://example.org?gender={{ parameters["a"] }}` will render `https://example.org?gender=1`.

## Destination Filters

- #### Only activate the user if its data has changed since the last activation

Data is sent to [Destinations](https://docs.audience.kevel.com/activations/user-data-destinations) on each activation request. Enabling this option reduces the number of activations sent out by not activating users whose resulting activation data for a given destination has not changed since their last activation.

This is particularly useful when activating to third-party platforms sensitive to the number of requests or volume of data transferred.

- #### Only Activate Users in a Segment

When enabled, only users in the selected segment will be activated. This filter can be used, for example, for limiting activations to a segment of users who have consented to send data for this destination. When active, a breakdown per ID type with the percentage of users that will be activated is presented.
