# Publishing and retiring campaign

## Publishing a campaign <a href="#creatingcampaigns-publishingacampaign" id="creatingcampaigns-publishingacampaign"></a>

Click on the **Publish** button in the top-right corner of the page to turn a campaign draft into a published campaign. The system sends the published campaign to employees according to the campaign's schedule.

For retired campaigns, click on the **Republish** button in the top-right corner of the page to reactivate the campaign.

{% hint style="info" %}
You can publish and republish campaigns if the **Manage all campaigns** permissions are assigned to your role. Refer to the [Roles](https://docs.nexthink.com/platform/user-guide/administration/account-management/roles) documentation for more information.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-11fe6134e5b33ee03d1c3ba7a5bdbbbc17a63223%2FRepublish_campaign.png?alt=media" alt="Click on the Republish Button in the top-right corner of the Edit Campaign page."><figcaption></figcaption></figure>

Republished campaigns reevaluate campaign recipients as defined by the NQL query:

* A scheduled one-time campaign does not retarget employees who answered or declined the campaign while it was active.
* A scheduled recurring campaign does not retarget employees who answered or declined the campaign within the selected time period while it was active.

{% hint style="info" %}
Newly created campaigns may take up to 5 minutes to appear on the Campaign overview page.
{% endhint %}

## Retiring a campaign

On the campaign details page, click on the **Retire** button located in the top-right corner of the page to retire a published campaign. Once retired, the system updates the state of campaign responses that are still in a non-final state (planned, targeted) to retired. Campaign responses in the canceled, answered, or declined state remain unchanged.

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

After retiring, the system removes the campaign from endpoints. Note that if a campaign is displayed on the endpoint at the time of retirement, the system does not forcibly close it, allowing users to finish interacting with it. If a user responds to a campaign already on their endpoint’s screen, the system still records their answers and updates their response state to **answered** accordingly.

When the campaign is retired, you can adjust its content, including its structure and triggers. Consider the following aspects if your campaign already has responses from employees:

* When you add a question, it appears on the campaign dashboard with 0 responses.
* When you remove a question, it disappears from the campaign dashboard, the CSV export, and the NQL in the campaign-specific response table. For example, `campaign.#nql_id.responses` will not include fields starting with `answers.question_nql_id` anymore.
* When you add a choice to a question, it appears on the campaign dashboard with 0 answers.
* When you remove a choice to a question, it disappears from the bar chart of the campaign dashboard. Its value remains accessible in the CSV export and from NQL.
* When you add or remove parameters, make sure to adjust any workflow or third-party system triggering the parametric campaign accordingly. When you remove a parameter, its value is not available anymore in the campaign-specific response table. For example, `campaign.#nql_id.responses` will not include the field `parameters.parameter_nql_id` anymore.
* You can freely change the triggers among **Manual**, **Schedule** and **API**. However, you cannot change **Remote action** trigger to another value to ensure that you retain access to the built-in dashboard.
* In case you change a campaign trigger to **Schedule**, note that the history of requests is taken into account and is not reset. For example, a one-off campaign will not retarget employees that have already answered or declined the campaign, even after republishing it.

A warning message appears if you remove questions or answer choices or if you add or remove parameters.

Data about deleted questions or parameters remains available in the columns `answers` and `parameters` of the `campaign.responses` table, in JSON format, suitable for export purposes.
