# Configuring campaign parameters

Parameters are placeholders in campaign questions requiring input by a user sending a manual campaign, by a third-party system via Nexthink API or with data available inside a workflow. The system saves parameter values along campaign responses, linking answers back to these parameters.

{% hint style="info" %}
Parameters are available for Manual, API and Workflow campaigns.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-510dd449731e7eba3185792c0095fa4c2aec716a%2FParameters.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For each campaign, use up to 30 parameters.
{% endhint %}

### Parameters use cases <a href="#typesofcampaigns-parametersusecases" id="typesofcampaigns-parametersusecases"></a>

Below are examples of use cases related to parameters.

<details>

<summary>Measuring the satisfaction of a service desk ticket after its closure</summary>

Trigger a campaign via API from your ITSM tool and use parameters for the ticket number and description.

</details>

<details>

<summary>Creating customizable outage notification templates</summary>

Trigger a manual campaign through an investigation of impacted users or via API, and use parameters for the outage impact and affected service.

</details>

<details>

<summary>Sending personalized notifications for asset returns upon renewal or employee departure</summary>

Trigger an API campaign from your asset management solution and use parameters for the asset number, the asset name and the expected return date.

</details>

### Creating parameters <a href="#typesofcampaigns-creatingparameters" id="typesofcampaigns-creatingparameters"></a>

From the **New Campaign** **Draft** page, under the **Genera**l tab:

1. Select **Manual**, **Workflow** or **API** under **Trigger**.
2. Click on the **Parameters** toggle button.
3. Add a new parameter and fill in the fields:
   * **Name**: Enter a unique name for the parameter.
   * **ID**: Enter a unique ID for the parameter to use in NQL queries and when sending API campaigns.
   * **Description**: Enter a description to help identify the parameter when sending a campaign from an investigation.

Change the number of parameters and associated IDs for campaigns in a Draft state. For published or retired campaigns, you can only edit the name and description of the parameters.

{% hint style="info" %}
In API campaigns, parameter IDs must match those of the third-party system.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-3fb5cf5c929b2a9e188ee832316a807c01ee2066%2FParameter_settings.png?alt=media" alt=""><figcaption></figcaption></figure>

### Using parameters in Campaign questions <a href="#typesofcampaigns-usingparametersincampaignquestions" id="typesofcampaigns-usingparametersincampaignquestions"></a>

After setting up parameters, from the **New Campaign Draft** page or **Edit Campaign** page:

1. Go to the **Content** tab.
2. Insert parameters inside **Text** questions, and their translated versions, using the **{x}** icon in the **Text** toolbar.
3. Follow the parameter `{{parameter_id}}` syntax.

#### Use case: Passing URLs as parameters

When passing a URL as a parameter:

* **If you intend the URL to be written out and visible in the campaign:** Include `https://` in the parameter.
* I**f you intend to use a hyperlink and want the omitted destination URL to be parametrized:** Ensure you use the **Add** **link** button in the text editor and omit `https://` from the parameter, as the system prepends it by default.
* **If you intend to use a parameter in the visible destination URL:**
  1. Omit `https://` from the parameter, as the system prepends it by default.
  2. In the campaign text, add `https://` before the parameter. Example: `https://{{parameter_without_https}}`
  3. Select the text, including `https://`.
  4. Use the **Insert Link** option in the rich text editor.
  5. Continue as if you intended to use a hyperlink and want the omitted destination URL to be parametrized.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-5fd9d2bc921d360b76e6edb8fd0366f18f6256d7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Below are examples of using parameters in [manual](#example-of-using-parameters-in-manual-campaigns) and [API-triggered](#example-of-using-parameters-in-api-campaigns) campaigns.

### **Example of using parameters in Manual campaigns**

The following example displays the use of parameters `{{service_name}}`, `{{impact}}`, `{{timeframe}}` and `({{incident_id}})` for a manually triggered campaign.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-c5f80ad87796d3ead4ffa9e32ef6c4f8cb0660cb%2Ftypesofcampaings-1700490160.png?alt=media" alt="" width="760"><figcaption></figcaption></figure>

When you launch and send out a manual campaign to **users** from the [Investigations](https://docs.nexthink.com/platform/user-guide/investigations) page, you must input the values of the campaign parameters by filling in the **Send campaign** pop-up window.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-1238da1bee3092ce23e7187f8d28c37b59c68078%2Ftypesofcampaings-1700495884.png?alt=media" alt="" width="760"><figcaption></figcaption></figure>

### **Example of using parameters in API campaigns**

The following example displays the use of parameters `{{ticket_description}}` and `{{ticket_number}}` for an API-triggered campaign.

{% hint style="info" %}
Remember, parameter IDs must match those of the third-party system calling the Nexthink API.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-75807bfa67aee5c73e2a184205fb5b30f0216fab%2Ftypesofcampaings-1700489924.png?alt=media" alt="" width="760"><figcaption></figcaption></figure>

***

RELATED TOPICS

* [Investigations](https://docs.nexthink.com/platform/user-guide/investigations)
* [Developer Portal](https://developer.nexthink.com/)
