> 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/integration-paths/shopify.md).

# Shopify

Use **MD Integrations Connect** to link Shopify checkout with MDI-hosted medical intake and messaging. In this setup, Shopify manages products, pricing, checkout, and fulfillment, while MDI manages intake, clinical review, and patient messaging.

### Configure the app

{% stepper %}
{% step %}

#### Install and connect

Install **MD Integrations Connect** from the Shopify App Store. Create an API credential, then add it in the app settings.

{% hint style="warning" %}
Disconnecting the app or changing credentials clears every product association. Re-map the catalog after either change.
{% endhint %}
{% endstep %}

{% step %}

#### Add both required app blocks

Use the Shopify Theme Editor to place both blocks — Shopify doesn't add them automatically.

| Block              | Page             | Purpose                                                      |
| ------------------ | ---------------- | ------------------------------------------------------------ |
| **Medical Intake** | **Thank you**    | Starts the patient’s intake after checkout.                  |
| **Action Buttons** | **Order status** | Shows **Chat with a doctor** after an Encounter is assigned. |

In the app setup, select **Open theme editor**, then select the target page, open **Apps**, add the matching block, and save. Repeat the process for both pages.
{% endstep %}

{% step %}

#### Map products to intake

In the Partners Panel, go to **Integration → Shopify**. Select a product row, choose its intake form and [Offerings](/partner/key-concepts/offerings.md), then select **Submit**.

Before mapping production products, test with MDI's sample product, intake form, and Offering to confirm everything is wired up correctly.
{% endstep %}

{% step %}

#### Add an intake recovery path

Add an intake call to action to your Shopify order confirmation email. This gives patients a way back to intake if they leave the Thank You page before starting.
{% endstep %}
{% endstepper %}

### Patient journey

1. The customer selects a product and completes Shopify checkout.
2. The **Medical Intake** block appears on the Thank You page.
3. The customer completes hosted intake, and MDI creates the Patient and [Patients & Encounters](/partner/key-concepts/patients-and-encounters.md).
4. After the Encounter is assigned, **Chat with a doctor** appears on the Order Status page.
5. The patient uses the button to contact their assigned physician.

### Gate fulfillment with order tags

MDI sends clinical status to Shopify as order tags. Treat the tag as the fulfillment decision — it's the signal your team should act on before shipping anything.

| Tag             | Meaning                                 | Action                      |
| --------------- | --------------------------------------- | --------------------------- |
| `MDI Pending`   | Intake is incomplete.                   | Do not ship.                |
| `MDI Created`   | The Encounter awaits clinical review.   | Do not ship.                |
| `MDI Completed` | The treatment plan was approved.        | Fulfill the order.          |
| `MDI Cancelled` | The patient was ineligible or declined. | Cancel or refund the order. |

{% hint style="warning" %}
Ship only after the order has the `MDI Completed` tag. Earlier fulfillment can send medication before clinical approval.
{% endhint %}

### Test before going live

Use Shopify's **Bogus Gateway** together with an MDI Sandbox credential:

1. In Shopify Admin, search for **Payments**.
2. Select **See all other providers**.
3. Activate **(for testing) Bogus Gateway**.
4. Complete a test purchase and verify intake, Encounter creation, and messaging.

See [Go-Live Checklist](/partner/get-started/go-live-checklist.md) before connecting Live credentials.

### Troubleshooting

| Symptom                               | Check                                                  |
| ------------------------------------- | ------------------------------------------------------ |
| Intake or messaging button is missing | Confirm the product mapping and both theme app blocks. |
| Intake link does not open             | Confirm the app has valid, connected API credentials.  |
| The wrong form or Offering appears    | Review the product-to-intake mapping.                  |
| The app interface is unavailable      | Reinstall the app.                                     |


---

# 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/integration-paths/shopify.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.
