> For the complete documentation index, see [llms.txt](https://docs.mdintegrations.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mdintegrations.com/partner/exploring-features/campaigns-nps.md).

# Campaigns (NPS)

Campaigns let you send an NPS-style satisfaction survey to patients — a single question on a 1-10 rating scale. Use it to measure patient satisfaction after a visit without having to build your own survey infrastructure.

## How it works

A Campaign is a single-question survey: patients respond with a rating from 1 to 10. MDI delivers it to the patient through two channels:

* **Email**
* **In-app / patient messaging**, inside MDI's patient messaging experience

You can trigger a Campaign two ways:

1. **As a Step inside an Automation** — for example, a few days after the Encounter Completed trigger fires.
2. **Directly via API call** — trigger a Campaign send for a specific Patient or Encounter on demand, useful if you're driving the timing from your own systems instead of an Automation.

Either path delivers the same survey experience to the patient; the only real difference between them is what decides *when* it fires.

## Recipe: automatic post-encounter survey

The most common setup pairs Campaigns with Automations so every patient gets surveyed without any manual follow-up:

{% stepper %}
{% step %}
In the Partner Portal, create an Automation with the **Encounter Completed** trigger.
{% endstep %}

{% step %}
Add a delay so the Campaign doesn't fire immediately — for example, wait 3 days after completion, giving the patient time to actually experience the treatment.
{% endstep %}

{% step %}
Add a **Campaign** Step configured with your NPS question.
{% endstep %}

{% step %}
Publish the Automation.
{% endstep %}
{% endstepper %}

From that point on, every Encounter that reaches Completed status automatically queues a survey a few days later, with no one on your team needing to remember to send it and no patient slipping through the cracks. See Automations for more on how Triggers and Steps compose, including delay handling.

## Recipe: on-demand survey via API

If you'd rather control survey timing from your own backend — for example, tying it to an event that only your system knows about, like a shipment delivery confirmation from your own logistics provider — call the Campaign send endpoint directly instead of routing it through an Automation. This is a good fit whenever the trigger condition lives outside MDI's own data model, since there's no Automation Trigger you could hook into even if you wanted to.

{% hint style="warning" %}
Campaigns are a single-question NPS survey, not a general survey builder. If you need multi-question intake or follow-up forms, use a Questionnaire instead — see Vouchers & Questionnaires.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mdintegrations.com/partner/exploring-features/campaigns-nps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
