# Connector configuration

## Configuration

| UI label                   | API field name         | Type            | Required | Notification source type overrides | Allowed values | Default value | Description                                                                                                                                                                                                                              |
| -------------------------- | ---------------------- | --------------- | -------- | ---------------------------------- | -------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **URL**                    | `url`                  | `Url`           | true     | true                               | n/a            | n/a           | The endpoint that receives requests. The system sends test notifications to this endpoint using POST.                                                                                                                                    |
| **Additional body fields** | `additionalBodyFields` | `JSONObject`    | true     | true                               | n/a            | `{}`          | Custom static fields included in the JSON body of the request and used to provide additional data. Use standard JSON format (for example, `{"api_key":"aq7..."}`). This overrides any top-level field with the same name in the request. |
| **Headers**                | `additionalHeaders`    | `KeyValuePairs` | true     | true                               | n/a            | `{}`          | Represents a JSON object where each key maps to a string value. Defines headers included in each request. Use this to provide authentication data. This overrides an existing request header.                                            |
| **Dynamic URL**            | `dynamicURL`           | `Url`           | false    | true                               | n/a            | n/a           | The URL can include dynamic values. Use templating to personalize webhook endpoints per alert. This overrides the defined URL.                                                                                                           |
| **Dynamic body fields**    | `dynamicBodyFields`    | `JSONObject`    | false    | true                               | n/a            | `{}`          | Add fields to the JSON body using dynamic content from the alert payload. This overrides the static body fields.                                                                                                                         |
| **Dynamic headers**        | `dynamicHeaders`       | `KeyValuePairs` | false    | true                               | n/a            | `{}`          | Insert dynamic values in HTTP headers based on alert content. Use this to pass runtime data such as tokens or custom identifiers. This overrides an existing request header.                                                             |

## Templating for dynamic routing

The dynamic fields support [dynamic templating](https://coralogix.com/docs/user-guides/notification-center/dynamic-templating/index.md). This allows data-driven routing by inserting variables into the notification configuration.

Here are some customization examples:

**Dynamic URL**

```js
{% if alert.status == 'Triggered' %} https://api.opsgenie.com/v2/alerts
{% else %}https://api.opsgenie.com/v2/alerts/{{alert.groupingKey}}/close?identifierType=alias
{% endif%}
```

**Dynamic body fields**

```js
{% if alert.highestPriority == 'P1' %}
  {% set routing_key = "<critical_routing_key>"%}
{% elif alert.highestPriority == 'P2' %}
  {% set routing_key = "<error_routing_key>"%}
{% endif %}
{
  "routing_key": "{{routing_key | default(value = "<default_routing_key>")}}"
}
```

**Dynamic headers**

```js
"Service-Name" : "{{alert.groups['service_name'] | default(value = "N/A")}}"
```

## Next steps

Define the payload structure for Generic HTTPS notifications in [Message configuration](https://coralogix.com/docs/user-guides/notification-center/destination-types/https/schema-structure/index.md).
