# Shopify

If you use Shopify, the **easiest way** to integrate with Poplar is with the Poplar Mail Shopify application.

Poplar for Shopify supports **Abandoned Cart**, **New Order**, **New Customer**, and **Cancelled Order** trigger events along with a number of highly specified filter options. If your use case requires another trigger event not listed, please check the Zapier section for an alternative approach.

## Install App

Head to the [**Poplar Shopify App**](https://apps.shopify.com/poplar-1) store page and click **Add app** to install.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672115cb91230b767524ba95/file-55Swx2fQOB.png)

Sign in to your Poplar account and choose the organization you want to connect with. Your Shopify account and your Poplar account will be automatically linked.

## Link Poplar Account

If you do not already have an account with Poplar, select the `Create Account` button. Otherwise, click the green `Connect My Account` button.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672117643a0b506883e52dd6/file-2CG4ytVPXQ.png)

Once your Poplar account is made or you are signed in, navigate to the [Shopify Integration](https://app.heypoplar.com/credentials/shopify) page in Poplar. Copy your `Production` and `Test` API tokens and past them into the "Connect your Poplar Account" page within the Shopify app.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/6721190a4d8d375180ed153b/file-x7gbRYOSXG.png)

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672119c5c8770a0e6b6587cd/file-CBIOaDTNdY.png)

## Playbooks

The first time you open the Shopify app, you'll see two playbooks we've pre-built for you. *Note: The playbooks have created corresponding campaigns in Poplar.*

**If this is your first time mailing with us, make sure the following tasks are completed in your Poplar account before continuing:**

* Creative artwork has been uploaded to the campaign in Poplar and is set to **Active**
* Your account is properly funded under [**Billing**](https://app.heypoplar.com/billing).

### Create a Playbook

Under **Campaigns** click **Create a Playbook**

Name your playbook and select the type of event you would like to target. You can choose between 4 event triggers:

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/6721265eca07c36a6a17155a/file-JTZP8Q5GEF.png)

1. **Abandoned Cart**: Send mail to potential customers who abandon the checkout process in your Shopify store and get them back on track to convert.
2. **New Order**: Send mail to customers to request a review or cross-sell/up-sell complementary products after a purchase.
3. **New Customer**: Send postcards introducing your brand to a new customer after their first purchase.
4. **Canceled Order**: Bring customers who cancel an order back to your site with an offer code.

***

Once your Trigger is selected, choose a **Campaign** and **Creative** you’d like this segment to be mailed.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/67212606ca07c36a6a171559/file-yCfKpSsS7J.png)

1. *Only one creative can be selected per campaign. To target multiple creatives with the same use case or event trigger, create separate Poplar campaigns for each Playbook.*
2. *Optional:* Set a Mailing Delay. This setting is defaulted to 0 which triggers the mailing to go into production immediately.&#x20;
3. IMPORTANT: Select your **Environment Type**. Choosing `Production` will trigger the mailers and send them into the mail stream. Choosing `Test` will flag each triggered customer as “test”, and the mailings will not go out.
4.

```
![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/67212251ca07c36a6a171555/file-GHHV3hAUY2.png)
```

5. 💡 Tip: The test environment allows you to gauge volume of a segment without having to use any allocated budget.
6. Once you choose your event trigger, you can optionally add filters to send to a more targeted audience. Choose **Add Filter** and select any filters you want to apply to the playbook trigger.
7.

```
![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672124d2c8770a0e6b6587d8/file-3W1OYbDGmf.png)
```

8. **Each event trigger comes with its own set of filter options.** See the **Filter Engine** section below for a guide to available filters and their functions.
9. When selecting filter rules, you have two main options: you can either allow the event to mail if all filters are true or allow the event to mail if any of the filters are true. If you choose not to configure any filters, every event will mail, provided there is enough customer information to do so.
10.

```
![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/630f9eb74cde766bbe140e3d/file-VIwIkeoMmL.png)
```

## Test & Go Live!

In the Final Touches section, you'll see the option to choose a **Test** or **Production** environment. The Test environment will behave *as if* in production, so you can gauge volume and confirm filter success, only no mail will send and you won't be charged.

We recommend first enabling your playbook under the Test environment, to ensure the connection is successful and requests are coming through to your campaign's History tab in Poplar.&#x20;

To go live and start mailing, change this setting to **Production** and click **Save Playbook** and switch the status to **ON!**

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672294f2f539bb6e3c7c7121/file-haOkbr4NqD.jpg)

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672294b93a0b506883e52f04/file-uv8V6HHSPV.jpg)

Playbooks that are toggled **OFF** do not send requests to Poplar regardless of the deployment environment.

***

## Transactional Reporting

Transactional reporting is enabled by default. Order data will be shared with your Poplar account and used to generate in-platform reporting metrics. It will also auto-populate the **Customers (Orders API)** audience with billing and shipping addresses which can then be selected for suppression from other campaigns. Please refer to the Orders API documentation for details on what information is being passed in the call.

![](https://d33v4339jhl8k0.cloudfront.net/docs/assets/5f340c51042863444aa03abf/images/672294ca4d8d375180ed1665/file-e4s8cKgNqe.jpg)

***

## Filter Engine

Below is a brief description of each filter and applicable events.

| **Event**       | **Key** |
| --------------- | ------- |
| New Order       | NO      |
| Cancelled Order | CO      |
| Abandoned Cart  | AC      |
| New Customer    | NC      |

| **Filter Name**   | **Event Triggers** | **Description**                                                                          |
| ----------------- | ------------------ | ---------------------------------------------------------------------------------------- |
| Total Price       | NO, CO, AC         | The total price of the order                                                             |
| Accepts Marketing | NO, CO, AC, NC     | Whether the customer agreed to receive marketing                                         |
| Order Count       | NO, CO, AC         | How many orders the customer has placed in the past                                      |
| Line Item SKUs    | NO, CO, AC         | Whether an order contains an item with the specified SKU ( *case insensitive*)           |
| Product Title     | NO, CO, AC         | Whether an order contains an item with the specified product title ( *case insensitive*) |
| Variant Title     | NO, CO, AC         | Whether an order contains an item with the specified product title ( *case insensitive*) |
| Total Spend       | NO, CO, AC, NC     | The total amount spent by the customer                                                   |
| Verified Email    | NO, CO AC, NC      | Whether the customer has verified their email                                            |
