# EasyPost


Dyspatch’s EasyPost app allows your recipients to view up-to-date tracking information for their parcels, pulled the moment your message is opened, directly from their inbox.

<img class="img-center" src="https://docs.dyspatch.io/img/apps/easypost.gif" alt="Tracking a parcel from within your inbox with Dyspatch's EasyPost app" />

## Prerequisites

- In order to send Dyspatch apps, you need to be set up to send AMP emails. Check out our [Getting Started with AMP](https://docs.dyspatch.io/email/getting_started_with_amp/) article to find out more.

## Install EasyPost App

To get started, you will need to install the app.

- Navigate to the <a href="https://app.dyspatch.io/admin/apps" target="_blank">Integrations > Apps in Email</a> page in the admin panel and install EasyPost
- To connect your app, you will need to enter your [EasyPost API Key](https://www.easypost.com/account/api-keys)

<img class="img-border img-center" src="https://docs.dyspatch.io/img/apps/install-easypost-app.png" alt="Installing EasyPost App in Dyspatch" />

## Create App Configuration

Once the app has been installed, you will need to create a configuration.

- First, navigate to the [Apps](https://app.dyspatch.io/apps) page
- Click on the **Create** button at the top right, then click **New App**
- Select **EasyPost** as the app template, give your App Configuration a name, and click the **Configure App** button at the bottom

 <img class="img-border img-center" src="https://docs.dyspatch.io/img/apps/create-easypost-app.png" alt="Create New App screen for new EasyPost configuration" />

After this, you will be taken to the App Configuration Editor, where you can modify the content that shows up in your HTML fallback block for recipients who can't view AMP. This can also be edited from within an email.

## Use in Emails

Apps that have been installed and configured will be available in the same panel as your blocks in the email editor. You can drag-and-drop an app into your email the same way you add blocks.

To preview the AMP version of your email, click the View AMP icon at the top of the preview pane:

<img class="img-border" src="https://docs.dyspatch.io/img/apps/amp-view.png" alt="Click the lightning icon above the preview pane to see an AMP preview" />

To pass in your parcel tracking information, you will need to include your carrier and tracking_id in the email data using the format provided by default in the sample data tab: 

```
{"carrier":"the name of your carrier",
 "tracking_id":"your tracking id #"}
```

A list of the proper formatting for carrier names can be found in <a href="https://docs.easypost.com/docs/trackers#carrier-tracking-strings" target="_blank">EasyPost's documentation</a>.

Here are a few test cases that can be used to preview different app states:

<table>
    <thead>
        <tr><th>Tracking ID</th><th>Carrier ID</th><th>Expected App State</th></tr>
    </thead>
    <tbody>
        <tr><td>EZ1000000001</td><td>USPS</td><td>Getting Ready To Ship</td></tr>
        <tr><td>EZ2000000002</td><td>USPS</td><td>In Transit</td></tr>
        <tr><td>EZ3000000003</td><td>USPS</td><td>Out For Delivery</td></tr>
        <tr><td>EZ4000000004</td><td>USPS</td><td>Delivered</td></tr>
        <tr><td>EZ5000000005</td><td>USPS</td><td>Return To Sender</td></tr>
        <tr><td>EZ6000000006</td><td>USPS</td><td>Failed To Deliver</td></tr>
        <tr><td>EZ7000000007</td><td>USPS</td><td>Shipment Information Unavailable</td></tr>
    </tbody>
</table>

<img class="img-center img-border" src="https://docs.dyspatch.io/img/apps/easypost-amp-view.png" alt="Viewing up-to-date tracking information from within your inbox with Dyspatch's EasyPost app" />

To preview the HTML fallback, which will appear for users who are unable to view the AMP version, click the View Visual icon:

<img class="img-border" src="https://docs.dyspatch.io/img/apps/html-view.png" alt="Click the boxes icon above the preview pane to see an HTML preview" />

When you click on the app in your email, you will be able to edit the HTML fallback content, which will give a static estimate of the parcel shipping time and the tracking number.

<img class="img-center img-border" src="https://docs.dyspatch.io/img/apps/easypost-html-view.png" alt="Static HTML fallback view showing Expected Delivery and Tracking ID" />

## Video Walkthrough

Want to see our EasyPost app in action? Check out our video walkthrough!

<iframe width="560" height="315" src="https://www.youtube.com/embed/Oped30havBM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<br/>

Looking to integrate with another service? [Contact us](mailto:support@dyspatch.io?subject=Custom%20AMP%20Integration&body=Name%3A%0D%0AOrganization%3A%0D%0AESP%3A%0D%0ADo%20you%20currently%20use%20Dyspatch%3F%3A%0D%0A%0D%0AI%20would%20like%20an%20app%20that%20connects%20to...) and let us know!
