> ## Documentation Index
> Fetch the complete documentation index at: https://www.zippendo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PeakWMS

> Let your PeakWMS warehouse print Zippendo shipping labels when a parcel is packed.

If your warehouse runs [PeakWMS](https://peakwms.com), your packers can get Zippendo shipping labels
straight from PeakWMS. They pack a parcel, PeakWMS asks Zippendo for a label, and the label prints.

Nothing gets installed. You copy a few web addresses and a key from Zippendo into PeakWMS, and you're done.

## How the pieces fit together

Your webshop, PeakWMS and Zippendo each do one job:

| System           | What it does                                                             |
| ---------------- | ------------------------------------------------------------------------ |
| **Your webshop** | Shows shipping options and prices at checkout — these come from Zippendo |
| **PeakWMS**      | Receives the order, and runs picking and packing                         |
| **Zippendo**     | Buys the shipping label and tracks the parcel                            |

Your customer picked their shipping option from a list that came from Zippendo. So Zippendo already knows
which carrier that order needs — which is why there's usually nothing to set up for it.

<Info>
  Your orders stay in PeakWMS. They are **not** copied into Zippendo. You'll turn that off in step 4.
</Info>

## Before you start

* Your warehouse uses PeakWMS, and you can edit settings there.
* Your webshop is connected to Zippendo, so checkout already shows Zippendo's shipping options.
* You have at least one [shipping rule](/docs/settings/shipping-rules) set up in Zippendo.

## 1. Create the connection in Zippendo

<Steps>
  <Step title="Open Warehouse Systems">
    In Zippendo, go to **Warehouse Systems** in the main menu.
  </Step>

  <Step title="Click Connect a WMS">
    You'll see the systems Zippendo works with. Click **Connect** on **PeakWMS**.
  </Step>

  <Step title="Give it a name">
    Something you'll recognise later, like "PeakWMS – Køge warehouse". If you run more than one
    warehouse, name each one after its warehouse.
  </Step>

  <Step title="Fill in the Account ID (optional)">
    If you're going to type an Account ID in PeakWMS later, type the same thing here. It's a safety net:
    if the two don't match, Zippendo stops and says so, instead of printing a label with the wrong return
    address on it. You can leave this empty.
  </Step>

  <Step title="Click Create connection">
    Zippendo shows you a **key** and a list of **web addresses**. Keep this page open — you need both in
    the next step.
  </Step>
</Steps>

<Warning>
  The key is shown **once**. Copy it now. If you lose it, you can make a new one from this page, but the old
  key stops working immediately — so PeakWMS will need the new one before your packers can print again.
</Warning>

The key only lets PeakWMS create and read shipments. It can't see your carrier accounts, your addresses,
your orders or your billing.

You can delete the key whenever you want, under **Settings → API Settings**. Just know that deleting it
also switches this connection off — your packers stop printing until you make a new key, paste it into
PeakWMS, and switch the connection back on.

## 2. Put them into PeakWMS

In PeakWMS, create a new **Forwarder** and set **Provider** to **Generic**. (If you can't find the
screen, PeakWMS's own [help centre](https://help.peakwms.com/support/solutions) has the walkthrough —
it's the same setup whichever shipping company you use.)

Now copy each web address from Zippendo into the matching field on that forwarder. There's a copy
button next to each one in Zippendo:

| PeakWMS field         | Do you need it?                                                                               |
| --------------------- | --------------------------------------------------------------------------------------------- |
| Create shipping label | **Yes.** This is the one that prints labels — nothing works without it                        |
| Tracking              | **Recommended.** Lets PeakWMS show where a parcel is                                          |
| Create return label   | Only if you put a return label in the box                                                     |
| QR code label         | Only for carriers where the customer hands in a parcel with a code instead of a printed label |
| Existing shipment     | Optional. Lets PeakWMS ask whether a late parcel can join an order that's already been packed |
| Label used            | Optional. Lets PeakWMS check whether a label has already been scanned before reprinting it    |
| Cancel shipment       | **Leave this empty** — see below                                                              |

Then fill in the three login fields:

* **API key** — the key Zippendo gave you.
* **Auth scheme** — pick **Bearer** from the list. It's just how PeakWMS hands the key over.
* **Account ID** — the same thing you typed in Zippendo, if you used one.

<Warning>
  **Leave "Cancel shipment" empty.** Zippendo can't cancel a label with the carrier yet. If you filled this
  in, PeakWMS would tell your packers a label was cancelled while it's actually still live with the carrier.
  With the field empty, PeakWMS simply cancels it in its own system — and if you need the label properly
  cancelled, ring the carrier.
</Warning>

## 3. Tell PeakWMS which shipping service to use

In PeakWMS, each shipping method has a **Host ID**. That's how it tells Zippendo which carrier and service
to use. The easiest way to fill it in:

<Steps>
  <Step title="Place a test order in your webshop">
    Pick any shipping option at checkout.
  </Step>

  <Step title="Open the order and find the shipping method's code">
    It looks something like `postnord:PNL13:rule_01HZX9K2QF`.
  </Step>

  <Step title="Paste that code into the Host ID field in PeakWMS">
    That's it. Zippendo recognises the code and knows exactly which carrier and shipping rule you mean —
    no extra setup.
  </Step>
</Steps>

<Info>
  **If the customer chose a pickup point**, the code on the order has the pickup point added on the end,
  after a bar — the `|` character. It looks like `postnord:PNL13:rule_01HZX9K2QF|1234567`.

  Paste only the part **before** the bar as the Host ID. PeakWMS splits the code there itself: the first
  part it matches to your shipping method, and the pickup point it passes on to Zippendo. So one Host ID
  covers every pickup point — you don't need one per shop.
</Info>

<Warning>
  **One thing can get in the way.** Some webshops carry an extra field on the order called
  `peak_shipping_code`, usually left behind by a shipping app you used before. If it's there, PeakWMS reads
  that instead of the code Zippendo puts on the order.

  So if the Host ID never matches, or the wrong carrier keeps being used, that's the first thing to check.
  Whoever looks after your webshop can empty that field for you.
</Warning>

Prefer your own codes, like `GLS_BUSINESS_PARCEL`? You can. In Zippendo, open the connection and add a
**Host ID mapping**: type your code on the left and pick the matching shipping rule on the right. Do that
for each shipping method in PeakWMS.

<Info>
  You'll need your own codes if some orders don't come from a webshop connected to Zippendo — orders typed
  straight into PeakWMS, for example.
</Info>

## 4. Stop Zippendo importing your orders

PeakWMS is now in charge of your orders. If Zippendo also imported them, both systems would try to ship
the same order — and you could end up paying for two labels for one parcel.

Go to **Order channels**, open your store, and under **What Zippendo is used for**, turn off
**Import orders from this store**.

<Note>
  Right now you'll find this switch on Shopify stores. If your webshop is something else, just send us a
  message and we'll turn it off for you.
</Note>

**What keeps working:** shipping prices and pickup-point selection at checkout, exactly as before.

**What stops:** orders are no longer copied into Zippendo, and Zippendo no longer marks orders as shipped
in your webshop. **PeakWMS does that**, since it's the system holding your orders.

<Note>
  Only turn this back on if you want Zippendo to manage your orders again.
</Note>

## 5. Try it, then go live

Do a dry run in your PeakWMS test environment first. Pack one order, and check three things:

* the label prints, and it's the carrier you expected
* the parcel shows up under **Shipments** in Zippendo
* tracking appears on the order in PeakWMS

When all three look right, swap the web addresses in PeakWMS over to your live setup and you're running.

## Good to know

<AccordionGroup>
  <Accordion title="What if a packer packs the same order twice?">
    Nothing bad happens. If PeakWMS asks for the same label twice — say the connection timed out and it
    tried again — Zippendo gives back the label it already made instead of buying a second one. You're
    never charged twice for the same parcel.

    Very occasionally the carrier makes the label but it doesn't make it back to PeakWMS. If that
    happens, Zippendo stops and tells your packer, rather than quietly buying a second label. The first
    one is waiting for you under **Shipments** — print it from there.
  </Accordion>

  <Accordion title="Several parcels for one order">
    Each parcel gets its own label and its own tracking number, and they all travel together as one
    shipment with the carrier. Your packers just print one label per parcel.
  </Accordion>

  <Accordion title="Where do I see what happened?">
    Open the connection under **Warehouse Systems**. It shows when PeakWMS last contacted Zippendo and,
    if something went wrong, the exact message your packer saw. Shipments themselves appear under
    **Shipments** like any other.
  </Accordion>

  <Accordion title="Return labels">
    PeakWMS sends the customer's address as the sender and your warehouse as the receiver, and Zippendo
    buys a return label. Your warehouse address always comes from your Zippendo shipping rule, so the
    label is right even if PeakWMS has a different address on file.
  </Accordion>

  <Accordion title="Dangerous goods">
    Zippendo can't produce the paperwork that hazardous shipments legally require, so it refuses these
    orders rather than shipping them without it. Send those through a different shipping setup in PeakWMS.
  </Accordion>
</AccordionGroup>

## If something goes wrong

Your packer sees the message, so ask them to read it out. Here's what each one means:

| The message says                                         | What to do                                                                                                                                                                                                                   |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No shipping rule matches this Host ID                    | The Host ID in PeakWMS isn't one Zippendo recognises. Either paste the code from a webshop order (step 3), or add a Host ID mapping in Zippendo.                                                                             |
| The wrong carrier was used                               | Your orders may carry an old `peak_shipping_code` field from a shipping app you used before — PeakWMS reads that first. Ask whoever looks after your webshop to empty it.                                                    |
| This WMS connection is disabled                          | Someone switched the connection off in Zippendo. Open it under **Warehouse Systems** and turn it back on.                                                                                                                    |
| The account id doesn't match                             | The Account ID isn't the same in PeakWMS and in Zippendo. If you run more than one warehouse, check you haven't pasted one warehouse's web addresses onto another warehouse's forwarder.                                     |
| A label for this order is already being created          | Two requests for the same label arrived at once. Just try again — you won't end up with two labels.                                                                                                                          |
| The label was already bought but couldn't be handed back | Rare. The carrier made the label, but something went wrong sending it to PeakWMS. **Don't keep retrying** — that would buy a second label. Open the shipment under **Shipments** in Zippendo and print the label from there. |
| This shipping rule delivers to a parcel shop…            | The shipping rule needs a pickup point and none was chosen. Use a home-delivery rule, or make sure the order has a pickup point on it.                                                                                       |
| Something from the carrier, like an address problem      | The carrier rejected it. Fix the address and try again — the shipment is waiting in Zippendo under **Shipments** with the status "Error".                                                                                    |

Still stuck? Every request PeakWMS makes is recorded on the connection page in Zippendo, so we can see
exactly what happened. Send us a message and we'll look.
