# Shopify

## Overview

Our Shopify integrations make it even easier to track your orders from your carrier network and provide proactive delivery updates to your customers during the outbound and returns journey.

The parcelLab Order Tracking app enables you to easily connect your order data and integrate parcelLab's Order Status page and Returns Portal in your Shopify store to provide your customers with timely delivery status updates and a fully branded returns experience.

## Customer Requirements

For successful configuration, the following requirements need to be met:

* Shopify Admin access
* parcelLab account

## Configuring the Shopify Integrations

Follow our instructions below for full details of how to successfully install and configure the parcelLab Order Tracking app and Order Status page and Returns integrations with Shopify.

### Order Data Connection

Install the parcelLab Order Tracking app and connect your order data.

{% stepper %}
{% step %}

#### Install the Order Tracking app

The parcelLab Order Tracking app is free to download from the Shopify App Store.

{% hint style="info" %}
You need Shopify admin access and a parcelLab account to be able to install the app.
{% endhint %}

{% embed url="<https://apps.shopify.com/parcellab-engage>" %}

<details>

<summary>Install the app</summary>

To install the parcelLab app for Shopify:

1. Log in to Shopify.
2. Navigate to the parcelLab app’s listing page: <https://apps.shopify.com/parcellab-engage>, and then click **Install**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fs9jxQwegI5TMW8rzAQNd%2FOrderTrackingAppListing.png?alt=media&#x26;token=cdf03d69-4252-4319-9eda-a3b661bd1259" alt="Order Tracking app listing" width="563"><figcaption></figcaption></figure></div>

   The Install app page will display.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FrQpmdnhKyKaBE0ySOIK0%2FOrderTrackingAppInstall.png?alt=media&#x26;token=fe0dbb56-3515-475e-8d8a-fb566542d493" alt="Install app page for the Order Tracking app" width="375"><figcaption></figcaption></figure></div>
3. Click **Install**.\
   The app is installed and can be found in your Shopify Admin under the Apps section.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FeyinYin6tEHh2evwoL4t%2FOrderTrackingAppInstalled.png?alt=media&#x26;token=b9603277-68c9-4ceb-bbe8-51f3b67e1100" alt="parcelLab Order Tracking App settings in Shopify Admin" width="563"><figcaption></figcaption></figure></div>

</details>
{% endstep %}

{% step %}

#### Connect your parcelLab account

Once you've installed the app, if you have a parcelLab account but it is not yet connected to your Shopify domain, please enter your email address and then click **Request**.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FOtsGslbknvVkBoHRBNJ6%2FOrderTrackingAppConnectRequest.png?alt=media&#x26;token=ec1c847f-8b0c-4eed-9d2c-bab493ba6b8e" alt="Request integration of Shopify domain to parcelLab account" width="375"><figcaption></figcaption></figure></div>

The request will be submitted and you'll get a notification via the email address provided when your parcelLab account is connected to the Shopify domain (for example: weareparkers.myshopify.com).

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fg6YzkrUUR5BRfkXSQopd%2FOrderTrackingAppConnectRequested.png?alt=media&#x26;token=18081a78-0e17-4845-bafc-b9c276c32580" alt="Request submitted for integration of Shopify domain to parcelLab account" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
If you do not have a parcelLab account, please contact your parcelLab representative and our team will get started with onboarding to prepare your account.
{% endhint %}

After your parcelLab account is connected, you can proceed with connecting order data.
{% endstep %}

{% step %}

#### Connect order data

Set up order data connections to send order details from Shopify to parcelLab whenever a customer places or updates an order.

{% hint style="success" %}
Your product feed will automatically sync during each data request from Shopify to ensure all article images and URLs to your shop are available.
{% endhint %}

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fss6z8JdYG0ppQa7b2cQf%2FOrderTrackingConnected.png?alt=media&#x26;token=5e794b0c-98fc-45cc-b473-b1c1faa7e0dc" alt="Order Tracking app connected" width="563"><figcaption></figcaption></figure></div>

<details>

<summary>Set up order data connection</summary>

The order data connections transmit order data from Shopify to parcelLab when a customer makes an order and any time the order is updated.

To connect your order data from Shopify to the parcelLab system:

1. Navigate to the **Settings** page for the parcelLab Order Tracking app in Shopify.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FeyinYin6tEHh2evwoL4t%2FOrderTrackingAppInstalled.png?alt=media&#x26;token=b9603277-68c9-4ceb-bbe8-51f3b67e1100" alt="parcelLab Order Tracking App settings in Shopify Admin" width="563"><figcaption></figcaption></figure></div>
2. In the **Webhooks** section, click **Install/Update**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FAHh1NEf5E9YKALIwxq9f%2FOrderTrackingAppWebhooksInstallButton.png?alt=media&#x26;token=1ddfd501-87de-4eaa-8c22-83d45ea0bd7d" alt="Install button for connecting webhooks" width="375"><figcaption></figcaption></figure></div>

   Your order data is now connected to the parcelLab system.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fss6z8JdYG0ppQa7b2cQf%2FOrderTrackingConnected.png?alt=media&#x26;token=5e794b0c-98fc-45cc-b473-b1c1faa7e0dc" alt="Notification indicating successful connection of order data to the parcelLab system" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
If the Webhooks section does not update after clicking **Install/Update**, click **Refresh**. If the connection is still not established, please contact your parcelLab representative.
{% endhint %}

{% hint style="success" %}
All trackings will have article images and the corresponding URL to the product page in your Shopify store as the information from your product feed is automatically transmitted for each request from Shopify.
{% endhint %}

</details>

<details>

<summary>Send order data via webhook</summary>

If you are not using the order tracking app, you can send order data with two webhooks for "Order Creation" and "Order Update".

To create webhooks for Shopify integration:

1. From your Shopify admin, go to **Settings > Notifications**.
2. Scroll down to the **Webhooks** section at the bottom of the page.
3. Click the **Create Webhook** button, and then enter the details of the webhooks for an order creation and order update as required.\
   For example:
   * **Event**: "Order Creation"\
     **Format**: "JSON"\
     **URL**: <https://api.parcellab.com/shopify>\
     **Webhook API version**: (should be the latest version)\
     **What does this do?**: This transmits order data from Shopify to parcelLab at the time that a customer makes an order.
   * **Event**: "Order Update"\
     **Format**: "JSON"\
     **URL**: <https://api.parcellab.com/shopify>\
     **Webhook API version**: (should be the latest version)\
     **What does this do?**: This transmits order data from Shopify to parcelLab any time the order is updated. This is primarily for when the order is updated with tracking number information but also transmits item information and order cancellations when applicable.
4. Click **Save** when creating each webhook record to ensure they are saved.
5. Check that your webhook section shows both the webhooks like the below image.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FqCsciGZ5047jhrkpY0ON%2FOrderTrackingAppWebhooks.png?alt=media&#x26;token=a40f3166-3d6b-4617-9f8e-aac97361399c" alt="Webhooks section with both webhooks displayed" width="375"><figcaption></figcaption></figure></div>
6. Share your Shopify shop URL with your technical contact at parcelLab.

{% hint style="info" %}
This is usually in a format like `"shopname.myshopify.com"`. However, it can sometimes vary and it is important that this information is correct to make sure we are connecting your data coming from the webhook to your parcelLab account.
{% endhint %}

When this is completed, data should be coming through to us exactly as we need it. Our team will double-check to make sure the data is correct.

As for your next step, you will need to provide us your carrier information.

</details>
{% endstep %}

{% step %}

#### View order and returns data

Orders and return data sync automatically via webhooks, with new orders appearing in Trackings in the parcelLab App after connection and Shopify return data available immediately once the integration is set up.

You can view orders and return registrations for your Shopify store from the parcelLab Order Tracking app on the following pages:

{% tabs %}
{% tab title="Shipments" %}

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FUwd0b5jZyy5L2cwHraT7%2FRecordsShipments.png?alt=media&#x26;token=5ad36f54-86f8-45b8-a597-2f2f78f87b6e" alt="Order records on the Shipments page" width="563"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Return Registrations" %}

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FM5AzKPPWv4pVBqrY3tBz%2FRecordsReturns.png?alt=media&#x26;token=bff7beae-7a1e-4b48-85a3-7c0140f33275" alt="Return records on the Return Registrations page" width="563"><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

{% hint style="success" %}
Click the **View in app** button or order/tracking number link for the relevant record to open the corresponding tracking in the parcelLab App.
{% endhint %}
{% endstep %}
{% endstepper %}

### Order Status Page

Add the Order Status page via our Shopify app.

{% stepper %}
{% step %}

#### Add the Order Status page

You can install the Order Status page via the Order Tracking app or embed it directly from your Shopify store.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FcpUHgn8EMOOyobct1mxG%2FOrderTrackingAppOSPageInstalled.png?alt=media&#x26;token=29faebd5-3b0c-47f6-a917-ec7d9b892437" alt="Order status page installed" width="375"><figcaption></figcaption></figure></div>

<details>

<summary>Install the Order Status page via the app</summary>

To install the Order Status page from the Order Tracking app:

1. Navigate to the **Settings** page for the parcelLab Order Tracking app in Shopify.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F6mJ9IKtykqASmXqkfiB6%2FOrderTrackingAppOSPageConnect.png?alt=media&#x26;token=65143ed6-d686-43e0-9e68-b475f7515ec1" alt="parcelLab Order Tracking Settings page showing successful connection of account and order data."><figcaption></figcaption></figure></div>
2. In the **Order Status Page** section, click **Install/Update**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fk1NcbE8ivRNAUdFK0zXC%2FOrderTrackingAppOSPageInstallButton.png?alt=media&#x26;token=36b7c040-11d6-4e30-a25c-2001b410a7de" alt="Install button for connecting order status page" width="375"><figcaption></figcaption></figure></div>

   This will automatically create a new page and install the Order Status page snippet in your shop and display the relevant details (for example: the slug for the page, "parcellab-order-status").

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FcpUHgn8EMOOyobct1mxG%2FOrderTrackingAppOSPageInstalled.png?alt=media&#x26;token=29faebd5-3b0c-47f6-a917-ec7d9b892437" alt="Order status page installed" width="375"><figcaption></figcaption></figure></div>
3. To view your installed Order Status page, click **Open storefront page**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FYWj9sXoZL0buNotV6fQk%2FOrderTrackingAppOSPageOpenStorefront.png?alt=media&#x26;token=f0444a35-5fa0-4d02-8238-a16e64ece3f9" alt="Open storefront page button" width="375"><figcaption></figcaption></figure></div>

   Your page should now display, with an alert stating "We have not yet received tracking data for your order".

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FSDFvpFyIv8mfwXq4n0On%2FOrderStatusPageMessage.png?alt=media&#x26;token=49711049-4ec5-49f1-9dae-ec05856cc970" alt="Order Status page preview with &#x22;We have not received tracking data for your order.&#x22; message" width="563"><figcaption></figcaption></figure></div>

   If you see this message, everything is connected exactly as needed.

</details>

<details>

<summary>Embed the Order Status page via the Shopify store</summary>

You can embed the order status page in your Shopify store using the in-built Shopify integration.

To set up the order status page integration:

1. To create a new page, do the following:
   1. Select the **Online Store** option in the main menu.

      <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FUohH6r8bWlJuv5BgbCBc%2FOrderStatusNavPaneOnlineStore.png?alt=media&#x26;token=2f621bb8-7b47-415f-9c07-c4a48360c4f8" alt="Online Store option in main menu highlighted" width="122"><figcaption></figcaption></figure></div>
   2. Select the **Pages** option in the **Online Store** menu.

      <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FqaTeLtY6kPQLmrFTeZAO%2FOrderStatusNavPanePages.png?alt=media&#x26;token=ecebd10b-591f-4a27-b497-2cad0813b94a" alt="Pages option in main menu highlighted" width="122"><figcaption></figcaption></figure></div>
   3. Click the **Add Page** button in the top right-hand corner of the page.

      <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FzHpEJSsjGBogKAkKcP4p%2FOrderStatusAddButton.png?alt=media&#x26;token=7e6f965e-2878-459f-b251-9ee1873c52fa" alt="Add page button highlighted" width="563"><figcaption></figcaption></figure></div>

      A page will display for you to enter the details of the new page.
   4. Enter a title for the new page in the **Title** field.

      <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FFpfln6irmK76d9UTAVYW%2FOrderStatusTitle.png?alt=media&#x26;token=bfd4d969-2e28-4544-b6ec-17edf768d7f6" alt="Title field highlighted" width="563"><figcaption></figcaption></figure></div>
   5. Select the **Visible** option in the **Visibility** section to make the page available.

      <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F1xF5zzCDPEw4Oos7gOFY%2FOrderStatusVisibility.png?alt=media&#x26;token=51035ed0-b04a-4161-91e5-092b026f0892" alt="Visibility option highlighted" width="563"><figcaption></figcaption></figure></div>
2. Click the **Show HTML** button in the **Content** section header.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FhqPzLndpYv6IAiRqTfn4%2FOrderStatusShowHTML.png?alt=media&#x26;token=48aaf907-8b37-4fbd-98c3-3823d7f6bed8" alt="Show HTML option highlighted" width="375"><figcaption></figcaption></figure></div>

   The page editing area in the Content section is updated, where you can directly edit the HTML code.
3. Copy the following code into the page editing area of the **Content** section.\
   **Important:** You will need to insert your parcelLab account ID in the `plUserId` field when copying the tracking snippet below.

   <pre class="language-html" data-title="parcellab-track-and-trace-snippet.html"><code class="lang-html">&#x3C;div id="parcellab-track-and-trace">
   &#x3C;img src="https://cdn.parcellab.com/img/loading-spinner-1.gif" alt="loading" />
   &#x3C;/div>

   &#x3C;script>
     function plTrackAndTraceStart() {
           window.parcelLabTrackAndTrace.initialize({
   <strong>          plUserId: TYPE_YOUR_USER_ID_HERE,
   </strong><strong>          lang: 'en', // default language if not specified for order
   </strong>          show_searchForm: true,
             show_zipCodeInput: true,
             show_articleList: true,
             use_campaign_banners: true
           });
           var linkTag = document.createElement('link');
           linkTag.rel = 'stylesheet';
           linkTag.href = 'https://cdn.parcellab.com/css/v5/main.min.css';
           document.getElementsByTagName('head')[0].appendChild(linkTag);
     }
   &#x3C;/script>
   &#x3C;script async onload="plTrackAndTraceStart()"
   src="https://cdn.parcellab.com/js/v5/main.min.js">&#x3C;/script>
   </code></pre>

   The copied HTML code is displayed in the Content section.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FOWaE4vwMwnL4NV6u1ka8%2FOrderTrackingOSPageContentIDHTMLHighlighted.png?alt=media&#x26;token=0a3076f4-17bc-4ee2-aef9-abaabec25aa7" alt="Tracking HTML code snippet for the order status page with the parcelLab User ID entered" width="563"><figcaption></figcaption></figure></div>
4. Click **Save**.
5. To confirm the setup has been completed as expected, click the **View** button at the top of the page.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FgAL9chFlLywWwgR0i2XY%2FOrderStatusViewPage.png?alt=media&#x26;token=5c08e87c-7559-483e-a1d7-3fe557e1d4ee" alt="View option at the top of the page" width="563"><figcaption></figcaption></figure></div>

   Your page should now display, with an alert stating "We have not yet received tracking data for your order".

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FSDFvpFyIv8mfwXq4n0On%2FOrderStatusPageMessage.png?alt=media&#x26;token=49711049-4ec5-49f1-9dae-ec05856cc970" alt="Order Status page preview with &#x22;We have not received tracking data for your order.&#x22; message" width="563"><figcaption></figcaption></figure></div>

   If you see this message, everything is connected exactly as needed.

</details>
{% endstep %}

{% step %}

#### Customize the Order Status page

You can edit the configuration of the Order Status page snippet and check the results directly from your shop.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FeCvayxeWlpihQHskUGFw%2FOrderStatusCustomizeHTML.png?alt=media&#x26;token=ff76eca3-d5a8-4ebd-b2de-b6eb37352da9" alt="Order status page HTML snippet" width="375"><figcaption></figcaption></figure></div>

<details>

<summary>Customize the Order Status page via the app</summary>

To customize your Order Status page from the Order Tracking app:

1. Navigate to the **Settings** page for the parcelLab Order Tracking app in Shopify.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FXo5cgImy6TKakz7TuFdS%2FOrderTrackingAppWebhookOSPageInstalled.png?alt=media&#x26;token=608cdf83-a4aa-4a77-a181-f9f7efc0e7e3" alt="parcelLab Order Tracking Settings page showing successful connection of account, order data and order status page" width="563"><figcaption></figcaption></figure></div>
2. In the **Order Status Page** section, click **View in Admin**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F04d29f1pxhkzj5kwgRxN%2FOrderTrackingAppOSPageViewAdmin.png?alt=media&#x26;token=bba15193-7402-4bf1-8c05-f04a6c58c582" alt="View in Admin button" width="563"><figcaption></figcaption></figure></div>

   The configured pages display for your account.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F1oBjo5uKen1aF7Xg8yI1%2FOrderStatusPageList.png?alt=media&#x26;token=3b07c297-2033-44f5-9dd2-b68643ab4794" alt="Configured pages list" width="563"><figcaption></figcaption></figure></div>
3. Select the Order Status page from the list.\
   The page opens in your Shopify Admin.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FmG6MRF2tVDm0xyXhkgne%2FOrderStatusCustomizePage.png?alt=media&#x26;token=52e63fe1-31d8-46ba-b61a-0171dfbdc713" alt="Shopify page showing code for the Order Status page" width="563"><figcaption></figcaption></figure></div>
4. Here you can edit the snippet’s configuration, and then click **Save** at the top of the page.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>For further information on configuring the Order Status page snippet, see our <a href="https://app.gitbook.com/s/ew6OnyRUe6InzC96WnMr/status-updates/order-status-page-configuration">Order Status page setup documentation</a>.</p></div>
5. When you have saved the changes, click **View** to review the page in your shop.

{% hint style="warning" %}
The Order Status page setup is currently not persisted. This means that if you reload the Settings page of our Shopify app, the settings are not saved or displayed again.&#x20;

The Order Status page itself is installed permanently and can be managed like any other page through Shopify Admin.
{% endhint %}

</details>
{% endstep %}
{% endstepper %}

### Returns Portal

Add a Returns Portal for your Shopify store.

{% stepper %}
{% step %}

#### Set up a new Returns Portal

If you don't have a Returns Portal configured, you can create a new Returns Portal in the parcelLab App to use in Shopify.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FB2HtjT2MpqMVZBSsxAV9%2FAppRPTemplate.png?alt=media&#x26;token=3e50b2db-7442-4547-89f1-f6aba9c6dc9d" alt="Shopify Returns Portal template configuration" width="177"><figcaption></figcaption></figure></div>

<details>

<summary>Add a Shopify Returns Portal in the parcelLab App</summary>

{% hint style="info" %}
This setup installs the Returns Portal v2 configuration.
{% endhint %}

To create a new Returns Portal for Shopify in the parcelLab App:

1. Do one of the following:

   * Navigate to the App Store and install the "Returns Portal v2 - Shopify API" recipe.

     <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FkpRu3eSbe2Wd03MQG9vH%2FAppStoreRecipe.png?alt=media&#x26;token=d3e40a2f-bfc9-42c1-bbca-e055f38eddec" alt="Returns Portal v2 - Shopify API recipe in the App Store" width="375"><figcaption></figcaption></figure></div>
   * Navigate to Returns > Return Portals, click **New Portal**, and then select the "Shopify Returns Portal" configuration.

     <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fq9Sj35KtdxjGN5zXvgfh%2FAppRP.png?alt=media&#x26;token=9b1c3254-6921-4bb1-9b54-0eb52adf25ca" alt="Shopify Returns Portal configuration in Returns > Return Portals" width="375"><figcaption></figcaption></figure></div>

   The Returns Portal v2 - Shopify API setup form will display.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FyuCadM7YlVLYaRRh17NG%2FAppRPConfig.png?alt=media&#x26;token=4f2e9774-9f57-43bc-935b-82d62070f8f3" alt="Returns Portal v2 - Shopify API setup form" width="563"><figcaption></figcaption></figure></div>
2. Complete the following information:

   1. Enter a name for the Returns Portal.
   2. Enter a unique identifier code for the Returns Portal.
   3. Enter the expected production URL where the Returns Portal snippet will be integrated (for example: <https://weareparkers.com/pages/returns>).

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>You can update the URL later if is different from the one that you enter on install.</p></div>
   4. Click **Install**.

   The Shopify Returns Portal is installed.
3. Navigate to Returns > Return Portals and select the installed Shopify Returns Portal.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FcYivKq55up3DNWihzbLy%2FAppRPPortal.png?alt=media&#x26;token=bc88a26e-056d-4c23-b408-9b6ba1833913" alt="Installed Shopify returns portal" width="563"><figcaption></figcaption></figure></div>

   The settings for the Shopify Returns Portal will display.
4. Click **Publish**.

The Shopify Returns Portal is published and can be added to your Shopify store.

</details>
{% endstep %}

{% step %}

#### Add the Returns Portal in Shopify

You can install the Returns Portal via the Order Tracking app or embed it directly from your Shopify store.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FLW8ndoM9jC31j0v9iUzn%2FOrderTrackingAppRPInstalled.png?alt=media&#x26;token=66ddd953-b152-48b2-a6fa-aa41d7482e44" alt="Returns portal installed" width="375"><figcaption></figcaption></figure></div>

<details>

<summary>Install the Returns Portal via the app</summary>

To install the Returns Portal from the Order Tracking app:

1. Navigate to the **Settings** page for the parcelLab Order Tracking app in Shopify.\
   A list of configured returns portals will display in the Returns Portal section.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FUI7uNLxYJiNAqq8n97Ht%2FOrderTrackingAppSettings.png?alt=media&#x26;token=c505574e-63b8-4e45-a62c-4bf4db04c2f0" alt="parcelLab Order Tracking Settings page showing successful connection of account, order data, and order status page."><figcaption></figcaption></figure></div>
2. In the **Returns Portal** section, click **Install/Update** next to the Returns Portal you want to install.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fy53an6fgvngDGWAlCfia%2FOrderTrackingAppRPInstallButton.png?alt=media&#x26;token=6d16ebd5-25f5-4566-87c5-bc81ac240510" alt="Install button for connecting returns portal" width="375"><figcaption></figcaption></figure></div>

   This will automatically create a new page and install the Returns Portal snippet in your shop and display the relevant details (for example: the slug for the page, "parcellab-returns-us-en").

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FLW8ndoM9jC31j0v9iUzn%2FOrderTrackingAppRPInstalled.png?alt=media&#x26;token=66ddd953-b152-48b2-a6fa-aa41d7482e44" alt="Returns portal installed" width="375"><figcaption></figcaption></figure></div>
3. To view your installed Returns Portal, click **Open storefront page**.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F4GXnMXUDdW4755LRpsnX%2FOrderTrackingAppRPOpenStorefront.png?alt=media&#x26;token=47704fd5-f224-4f3b-b30f-276e66135851" alt="Open storefront page button" width="375"><figcaption></figcaption></figure></div>

   Your page should now display, showing the returns portal login page.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F0afitCMjFJd9vJ6ZB2h5%2FRPPreview.png?alt=media&#x26;token=3b1fe50c-59cf-4b43-bde5-e0e558db6a2b" alt="Returns Portal login page" width="563"><figcaption></figcaption></figure></div>

   If you see this page, everything is connected exactly as needed.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>The full URL is shown at the bottom of the page and should be added in the Production URL field in Returns Portal Configuration in the App.</p></div>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FIm9KCQFIm7ex5six9WAK%2FRPURL.png?alt=media&#x26;token=804b7983-33af-4b65-a2aa-2c9f1c11e2a6" alt="Returns Portal URL highlighted in Shopify" width="375"><figcaption><p>Returns Portal URL in Shopify</p></figcaption></figure></div>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F00kg6JZwcfTKhVsR9sgI%2FRPURLConfig.png?alt=media&#x26;token=acab6da2-0aa3-42d3-8cf3-dfd1520cd32c" alt="Returns Portal URL highlighted in the Production URL field in the App" width="375"><figcaption><p>Returns Portal URL in Production URL field in the App</p></figcaption></figure></div>

</details>

<details>

<summary>Embed the Returns Portal via the Shopify store</summary>

To set up the returns portal integration:

1. To create a new page, do the following:

   a. Select the **Online Store** option in the main menu.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FUohH6r8bWlJuv5BgbCBc%2FOrderStatusNavPaneOnlineStore.png?alt=media&#x26;token=2f621bb8-7b47-415f-9c07-c4a48360c4f8" alt="Online Store option in main menu highlighted" width="122"><figcaption></figcaption></figure></div>

   b. Select the **Pages** option in the **Online Store** menu.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FqaTeLtY6kPQLmrFTeZAO%2FOrderStatusNavPanePages.png?alt=media&#x26;token=ecebd10b-591f-4a27-b497-2cad0813b94a" alt="" width="122"><figcaption></figcaption></figure></div>

   c. Click the **Add Page** button in the top right-hand corner of the page.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FzHpEJSsjGBogKAkKcP4p%2FOrderStatusAddButton.png?alt=media&#x26;token=7e6f965e-2878-459f-b251-9ee1873c52fa" alt="" width="563"><figcaption></figcaption></figure></div>

   A page will display for you to enter the details of the new page.\
   d. Enter a title for the new page in the **Title** field.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FrUcpXV2mdZnl4xp0BNZb%2FRPTitle.png?alt=media&#x26;token=d202bdc9-a5ed-47c5-b8dc-a1314fb050ea" alt="Title field highlighted" width="563"><figcaption></figcaption></figure></div>

   e. Select the **Visible** option in the **Visibility** section to make the page available.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FggmOlYP4Y0mlAJtrGG3F%2FRPVisibility.png?alt=media&#x26;token=767b3938-ac98-406a-8194-d5156111f946" alt="Visibility option highlighted" width="563"><figcaption></figcaption></figure></div>
2. Click the **Show HTML** button in the **Content** section header.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FmykqrWio7bWIJcNss0K5%2FRPShowHTML.png?alt=media&#x26;token=fd954d6d-ea6f-44a7-aaf3-1cc18091daa5" alt="Show HTML option highlighted" width="375"><figcaption></figcaption></figure></div>

   The page editing area in the Content section is updated, where you can directly edit the HTML code.
3. Copy the following code for the returns portal v2 snippet into the page editing area of the **Content** section.

{% hint style="warning" %}
You will need to insert your returns portal code and parcelLab account ID or technical account name (for example: 1619884 or weareparkers) in the `code` and `account-name` fields when copying the snippet below.
{% endhint %}

```html
<pl-returns-portal
  code="your-portal-code"
  account-name="parcellab-account-name"
>
</pl-returns-portal>

<script
  type="module"
  src="https://returns-app.parcellab.com/static/plugin/js/loader.mjs"
>
</script>
```

The copied HTML code is displayed in the Content section.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F1jtLCrpqkEwF0ak5ik0E%2FRPSnippet.png?alt=media&#x26;token=637c0c10-43a8-4458-ae6f-33c5b50e972c" alt="Tracking HTML code snippet for the returns portal with the returns portal code and parcelLab User ID entered" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
If the Shopify store does not have a white background, add this HTML under the existing code.
{% endhint %}

```html
<style>
div.pl-toggle-section-header { background-color: transparent !important; }
</style>
```

&#x20;   4\.   Click **Save**.\
&#x20;         The Shopify integration setup is saved.

&#x20;   5\.   To confirm the setup has been completed as expected, click the **View** button at the top of the page.&#x20;

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FOCscmUmPiJRQBSlVtGLQ%2FRPViewPage.png?alt=media&#x26;token=5dfaf59c-ef81-4c94-9416-09c439091691" alt="View option at the top of the page" width="563"><figcaption></figcaption></figure></div>

Your page should now display, showing the returns portal login page.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F0afitCMjFJd9vJ6ZB2h5%2FRPPreview.png?alt=media&#x26;token=3b1fe50c-59cf-4b43-bde5-e0e558db6a2b" alt="Returns Portal login page" width="563"><figcaption></figcaption></figure></div>

If you see this page, everything is connected exactly as needed.

{% hint style="info" %}
The full URL is shown at the bottom of the page and should be added in the Production URL field in Returns Portal Configuration in the App.
{% endhint %}

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FIm9KCQFIm7ex5six9WAK%2FRPURL.png?alt=media&#x26;token=804b7983-33af-4b65-a2aa-2c9f1c11e2a6" alt="Returns Portal URL highlighted in Shopify" width="375"><figcaption><p>Returns Portal URL in Shopify</p></figcaption></figure></div>

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F00kg6JZwcfTKhVsR9sgI%2FRPURLConfig.png?alt=media&#x26;token=acab6da2-0aa3-42d3-8cf3-dfd1520cd32c" alt="Returns Portal URL highlighted in the Production URL field in the App" width="563"><figcaption><p>Returns Portal URL in Production URL field in the App</p></figcaption></figure></div>

</details>
{% endstep %}

{% step %}

#### Customize the Returns Portal

You can edit the configuration of the Order Status page snippet and check the results directly from your shop.

<div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F8WePQwq37qZlbicsrOeF%2FRPCustomizeHTML.png?alt=media&#x26;token=bb78a52a-77e2-457e-b048-5f14292da94e" alt="Returns portal HTML snippet" width="375"><figcaption></figcaption></figure></div>

<details>

<summary>Customize the Returns Portal via the app</summary>

To customize your Order Status page from the Order Tracking app:

1. Navigate to the **Settings** page for the parcelLab Order Tracking app in Shopify.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F7riBWs5o9HTDfRTWT9GX%2FOrderTrackingAppSettingsRPInstalled.png?alt=media&#x26;token=0e4a4ec3-3678-4cf3-bcfb-98ee428980af" alt="parcelLab Order Tracking Settings page showing successful connection of account, order data, order status page and returns portal"><figcaption></figcaption></figure></div>
2. In the **Returns Portal** section, click **View in Admin** next to the installed Returns Portal.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FLPbGI8rrK6UnzczNJVuD%2FOrderTrackingAppRPViewAdmin.png?alt=media&#x26;token=a891e19e-1933-4998-b443-b99952cf6457" alt="View in Admin button" width="375"><figcaption></figcaption></figure></div>

   The configured pages display for your account.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F1oBjo5uKen1aF7Xg8yI1%2FOrderStatusPageList.png?alt=media&#x26;token=3b07c297-2033-44f5-9dd2-b68643ab4794" alt="Configured pages list" width="563"><figcaption></figcaption></figure></div>
3. Select the Returns Portal from the list.\
   The page opens in your Shopify Admin.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FMaAj1IJU6RSmwas4dO7N%2FRPView.png?alt=media&#x26;token=59adfe34-1e70-4f3c-8cea-3208d4b2502d" alt="Shopify page showing code for the returns portal" width="563"><figcaption></figcaption></figure></div>
4. Here you can edit the snippet’s configuration, and then click **Save** at the top of the page.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>For further information on configuring the Returns Portal v2 snippet, see our <a href="https://app.gitbook.com/s/ew6OnyRUe6InzC96WnMr/returns/v2">Returns Portal setup documentation</a>.</p></div>
5. When you have saved the changes, click **View** to review the page in your shop.

</details>
{% endstep %}
{% endstepper %}
