# ParcelPanel

### Introduction

Aissist is capable of connecting with ParcelPanel, enabling it to handle shipment tracking. Currently, Aissist can read your ParcelPanel data, which includes order details, shipment status, tracking information, carrier details, and delivery checkpoints. Aissist can also provide intelligent warnings for stale shipments and long shipping times.

<details>

<summary>🚀 <strong>Create ParcelPanel Integration</strong></summary>

### Step 1: Start the Integration

1. Log into your **Aissist** dashboard.
2. From the sidebar, go to **Workspace** → **Integrations**.
3. Click **Add Integration** then choose **ParcelPanel** from the available integration options.
4. In the setup page, enter:
   * A **name** for your integration.
   * Your **ParcelPanel API key** for authentication.

👉 You must use a **ParcelPanel API key** to connect. This provides secure access to your ParcelPanel account data.

### Step 2: Create an API Key in ParcelPanel

To retrieve your API key:

1. **Access ParcelPanel Admin**: Log in to your ParcelPanel account.
2. **Navigate to Integration**: In the ParcelPanel admin dashboard, locate and click on the **"Integration"** or **"Integrations"** section.
3. **Locate API Key Section**: Within the Integration section, find the **"API Key"** area.
4. **Copy the API Key**: The API key will be displayed there. Click to copy it.

⚠️ **Important**: Keep your API key secure and never share it publicly. Store it safely for use with Aissist.

📝 **Note**: The exact location or wording might vary slightly depending on your ParcelPanel account type (e.g., Shopify, WooCommerce).

### Step 3: Complete the Integration in Aissist.io

1. Go back to your **Aissist.io** console and fill in the **API key** for the ParcelPanel integration.
2. Click **"Test"** to make sure the API key is working correctly.

🔵 **Example Setup:**

* **Name**: Aissistant ParcelPanel
* **API Key**: `a656****-****-****-****-********5d4a` (your actual key)

**Test Order Number**: You can use any order number for testing, or leave it empty to use the default test order.

</details>

***

<details>

<summary>🧠 Default Smart Actions</summary>

When you set up the ParcelPanel integration, the following **Smart Action** is automatically included:

#### `trackOrder` Action

* **Purpose**: Track shipment by order number
* **Default Execution**: Runs during user interaction

***

#### Intelligent Warnings

The integration automatically provides warnings for:

* **Stale Shipments**: When no tracking updates have been received for X days
* **Long Shipping Times**: When total shipping time exceeds expected duration

***

### 📝 Response Format

The ParcelPanel integration returns structured data including:

```json
{
  "parcelpanel": {
    "order_number": "5****",
    "tracking": {
      "order": {
        "order_id": 1187*******,
        "order_number": "#5****",
        "store": {
          "name": "test",
          "url": "https://www.test.com"
        },
        "customer": {
          "name": "Test",
          "email": "test@gmail.com"
        },
        "shipments": [
          {
            "status": "IN_TRANSIT",
            "status_label": "In transit",
            "tracking_number": "4PX**********CN",
            "carrier": {
              "name": "4PX",
              "code": "4px",
              "contact": "0755-23508000"
            },
            "checkpoints": [
              {
                "detail": "With yodel awaiting sortation",
                "status": "IN_TRANSIT",
                "checkpoint_time": "2025-10-06T12:19:00"
              }
            ]
          }
        ]
      },
      "warnings": [
        "⚠️ No tracking update for 6 days - shipment may be stuck",
        "⚠️ Shipping time is 35 days - longer than expected"
      ]
    }
  }
}
```

</details>

***

<details>

<summary>🛠️ Customizing ParcelPanel Smart Actions</summary>

#### Creating Custom Actions

1. Go to **Workspace → Action**.
2. Click **"Add Action"** and select the ParcelPanel integration you previously set up.
3. Choose the `trackOrder` method.
4. Give your action a **name** and **description**.

***

#### Execution Options

* **Run at Session Start**: Automatically track orders when a session begins
* **Run During Interaction**: Track orders based on user queries
* **Both**: Enable both execution modes

***

#### Action Triggers

* **Inbound**: User's input message triggers the action
* **Outbound**: Aissistant's reply triggers the action
* **Both**: Either direction can trigger the action

***

#### Customizable Parameters

You can customize the parameter description based on your business needs:

**order\_number**

* **Default Description**: Order number (e.g., Shopify order number)
* **Example Description**: Order number from Shopify, format: "ORDER-12345"

**stale\_days\_threshold**

* **Default Description**: Days since last update to trigger stale shipment warning (default: 5)

- **Use Case**: Alert when shipments haven't been updated for extended periods
- **Example Description**: Alert if no tracking update for X days, use constant 7

**max\_shipping\_days**

* **Default Description**: Maximum expected shipping days to trigger long shipping warning (default: 30)

- **Use Case**: Alert when shipments are taking longer than expected
- **Example Description**: Alert if shipping exceeds X days, use constant 21

***

#### Response Instructions

Add summarization and instructions to guide Aissistant on how to present tracking information:

```
Summarize the tracking status and highlight any warnings. 
Include the current location, expected delivery date, and carrier information.
If warnings are present, explain what they mean and suggest next steps.
```

</details>

After setting up the ParcelPanel integration and actions, you can use the [**Action Debugger**](https://doc.aissist.io/integrations/action-debugger) to test and verify that everything is working correctly.
