Peoplevox connector
Use this connector when your warehouse packs orders in Peoplevox WMS and you want Carriyo to book the carrier and print the label. Peoplevox calls Carriyo once per packed box. Carriyo groups the boxes into shipments and books them when the order is complete. The label comes back in the same webhook response, so the pack bench prints it at once.
How it works
Peoplevox organizes an order as a sales order, one or more despatches (consignments), and one or more despatch packages (boxes) per despatch. Each time a box is packed, Peoplevox sends one despatch-package webhook to Carriyo. The connector handles it in four steps.
Box packed in Peoplevox
│
▼
Webhook ──► Add the box as a parcel to a draft shipment
(one per despatch and service type)
│
▼
Is the sales order complete? no ──► reply "not required", wait for the next box
(totalPickedItems = totalDespatchedItems)
│ yes
▼
Book the draft shipments, wait for labels
│
▼
Reply with the label URL and tracking number
- Find the despatch's shipments. The connector keeps a cross-reference between each despatch and the Carriyo shipments it created. It looks up the despatch and reads the current state of those shipments.
- Place the box. The box becomes a parcel on a draft shipment for its service type. If none exists, the connector creates one. The mapping rules are in the next section.
- Check for completion. The connector compares
totalPickedItemsandtotalDespatchedItemson the sales order. While they differ, it answers with statussuccessand marks every print requestnot required. Nothing is booked yet. - Book and return labels. When the totals match, the connector confirms every draft shipment of the despatch, waits for the carrier labels, and returns them.
The connector only accepts Peoplevox request schema version 2.0. The
webhook URL carries your tenant and connector id, and the request carries
the connector's API key as a bearer token. Both come from the connector
settings in the Dashboard.
How the entities map
Peoplevox organizes work as sales order, despatch and despatch package. Carriyo organizes shipping as shipment and parcel. The connector never creates a Carriyo order. It creates shipments only. The Peoplevox order and despatch survive as references and grouping keys on those shipments.
| Peoplevox | Carriyo | How it maps |
|---|---|---|
| Sales order | No entity. partner_order_reference on every shipment. | Each shipment carries the sales order number, so the Dashboard groups them under one order reference. The customer and address become the dropoff. The picked and despatched totals decide when to book. |
| Despatch | No entity. The grouping key. | One despatch produces one or more shipments. The despatch number is the first part of every partner shipment reference. |
| Despatch and service type | Shipment | One shipment per despatch and service type while it is a draft. The service type selects the carrier account. A box that arrives after that shipment is booked starts another shipment for the same pair, with a -1, -2 suffix. |
| Despatch package (box) | Parcel | One box is one parcel. The box's weight and dimensions become the parcel's. |
| Items in the box | Parcel items and shipment items | The components of a bundle become the parcel's items. The shipment's item list keeps the bundle SKU, with quantities added up across boxes. |
| Site | Pickup location | Through the Locations mapping. |
| Service type | Carrier account | Through the Carriers mapping. |
The same mapping for an order that ships in two rounds:
Peoplevox Carriyo
Sales order 9000357488 ───────────────────── partner_order_reference on every shipment
└─ Despatch DES1010 ────────────────────── grouping key, no entity
├─ Package 1 service RM24 ─┐
├─ Package 2 service RM24 ─┴──────── Shipment DES1010-RM24 (parcels 1, 2)
├─ Package 3 service DPD ──────────── Shipment DES1010-DPD (parcel 3)
│ picked 3 = despatched 3 → both shipments booked, labels returned
│
│ ... weeks later, the pre-order items arrive ...
└─ Package 4 service RM24 ──────────── Shipment DES1010-RM24-1 (parcel 4)
picked 5 = despatched 5 → only this shipment booked, only its label returned
Three things follow from this.
- One despatch is not one shipment. It is one shipment per service type, plus one more for each later round on the same service type.
- One box is exactly one parcel. A parcel never moves between shipments once its shipment is booked.
- The order reference is only a reference. Searching the Dashboard by the Peoplevox order number finds all the shipments, but there is no Carriyo order to open, allocate or fulfill.
Boxes, shipments and service types
Grouping is by service type. The connector reads the Peoplevox service
type code of each box and stores it on the shipment as
carriyo_metadata.peoplevoxServiceType. Later boxes are matched on that
value.
- Same despatch, same service type. Boxes are added as parcels to the
same shipment, as long as that shipment can still be edited (status
draftorerror). Items from each box are added to the shipment's item list, and quantities of the same SKU are added together. - Same despatch, different service type. Each service type gets its own shipment. A despatch packed partly for a next-day service and partly for an economy service produces two shipments.
- Box re-sent with another service type. While the box's shipment is still a draft, the connector moves the box. It removes the parcel from the old shipment and adds it to the shipment for the new service type.
After a shipment is booked
A booked shipment never takes new boxes. Three cases follow from that.
- A box arrives after the shipment for its service type is booked. The
connector creates a new shipment for it. Its partner shipment reference is
the despatch number and service type with a running suffix:
DES1010-RM24, thenDES1010-RM24-1,DES1010-RM24-2, and so on. Cancelled shipments keep their reference and count towards the suffix. The partner order reference stays the sales order number on every shipment, so all of them show under the same order in Carriyo. - A box is re-sent for a shipment that is already booked. This is a reprint. Nothing is created or re-booked. Peoplevox gets the label and tracking number back again.
- A booked box is re-sent with a different service type. The connector
refuses:
Package <id> is already booked on shipment <reference>. Cancel that shipment to move the package.Cancel the named shipment in Carriyo and re-send the box. Because cancelled shipments are ignored when placing boxes, the box then lands on a shipment for the new service type.
Booking and the label response
Booking is triggered by the sales order totals, not by the despatch. The
connector books when totalPickedItems equals totalDespatchedItems on
the sales order in the webhook. A sales order can reach that point more
than once, for example when pre-order items are despatched months after
the rest. Each completion is a separate round, and each round returns only
the shipments booked in that round.
On completion the connector:
- Confirms every shipment of the despatch that is still
draftorerror. Shipments that are already booked are left alone. - Waits for each confirmed shipment's label, polling for up to 20 seconds per shipment. The Peoplevox Carrier Integration timeout of 30 seconds leaves room for this.
- Answers each print request in the webhook by its document reference:
- Carrier label: the label. When the round booked several shipments, their labels are combined into one PDF URL. The URL is signed, and the tenant's document expiry setting applies to it.
- Customs documentation: the carrier's commercial invoice, combined
the same way, when at least one shipment has one. Otherwise
not required. - Any other document reference is answered with status
fail.
- Returns one outbound tracking number: the tracking number of the last shipment in the round.
Shipments you book yourself in the Dashboard before the last box arrives are not part of the response. Print those labels from Carriyo. Boxes for that service type that arrive afterwards start a new suffixed shipment, as described above.
A retry from Peoplevox is safe. Shipments that are already booked are not booked again, and the response repeats the labels of the current round.
Set up
Every service type and site your warehouse uses must be mapped in the connector. The connector finds the Carriyo carrier account and location only through these tables.
In the Carriyo Dashboard
Open Integrations → Connectors in the Carriyo Dashboard and create a Peoplevox connector. Give it a name, select the merchant, and set it to Active.
- Default Currency: used when the sales order carries no currency, or a
value that is not a three-letter code. Peoplevox sends
Currency:as a placeholder when none is set. - Carriers: Peoplevox service type code to Carriyo carrier account. One row per service type.
- Locations: Peoplevox site to Carriyo location. The shipment's pickup location comes from this table.
- Custom Attribute Mapping: a Carriyo field to one of the sales order's
attribute1toattribute5. The Carriyo field can be the dropoff company name, dropoff contact name, dropoff phone, the alternate reference, or any custom attribute defined for your tenant. Each Carriyo field can be mapped once. Custom attribute values are stored as a one-element list.
After the first save, the connector shows a read-only API Key. You enter it in Peoplevox in the next step.
In Peoplevox
Create a Carrier Integration in Peoplevox with the values shown on the connector page under How to setup Peoplevox Carrier Integration:
| Setting | Value |
|---|---|
| Name | Carriyo |
| Date time format | dd/MM/yyyy hh:mm:ss |
| Timeout (ms) | 30000 |
| Api key | the API Key from the connector |
| Endpoint | the endpoint URL shown on the connector page; it ends in your tenant and connector id |
| Tracking number format | {outbound} |
| Request schema version | 2.0 |
Then add one document type with the name and reference Carrier Label
and the print template Carriyo 4x6. Create a print template named
Carriyo 4x6 for a 4 inch by 6 inch PDF label in Peoplevox first. If you
also add a document type with the reference Customs documentation,
Carriyo returns the carrier's commercial invoice through it when one
exists.
Data mapping
| Peoplevox | Carriyo |
|---|---|
salesOrder.salesOrderNumber | references.partner_order_reference |
{despatchNumber}-{serviceType.code}, plus -1, -2, … for later shipments of the same service type | references.partner_shipment_reference (characters outside the Code 128 set are removed) |
despatchPackageId | parcels[].partner_parcel_reference |
Package weight and weightMeasure | parcels[].weight (default unit kg) |
Package width, height, depth and widthMeasure | parcels[].dimension (default unit cm) |
serviceType.code (via Carriers mapping) | carrier_account.carrier_id |
salesOrder.site (via Locations mapping) | pickup.partner_location_id |
salesOrder.customer.name, or the mapped attribute | dropoff.contact_name |
salesOrder.customer.email | dropoff.contact_email |
Mapped attribute, else customer.mobile, else customer.phone | dropoff.contact_phone (see note below) |
shippingAddress.companyName, or the mapped attribute | dropoff.company_name |
shippingAddress (line1, line2, townCity, region, postCode, countryCode) | dropoff address fields (UK becomes GB; ISO-3 codes are accepted) |
salesOrder.deliveryNotes | dropoff.notes |
salesOrder.requestedDeliveryDate (DD/MM/YYYY HH:mm:ss) | order_date |
salesOrder.totalSale | payment.total_amount |
salesOrder.currency when it is a three-letter code, else Default Currency | payment.currency and item prices |
| Mapped attribute | references.alternate_reference |
| Mapped attributes | custom_attributes.<name> as a one-element list |
items[].itemType.itemCode, name, quantity | items[].sku, description, quantity |
items[].salePrice / items[].itemType.buyPrice | items[].price / items[].cost |
items[].itemType.weight and weightMeasure | items[].weight (default unit kg) |
items[].itemType.hsCode | items[].hs_code |
items[].itemType.countryOfOrigin | items[].origin_country |
items[].itemType.hazardous | items[].dangerous_goods |
items[].components[] (bundles) | parcels[].parcel_items list the component SKUs; shipment items keep the bundle SKU |
Phone numbers. The connector takes the mapped attribute first, then
mobile, then phone. A number without a leading + is converted to
international format using the delivery country. If it cannot be parsed,
it is passed through unchanged.
Payment. Every shipment is created as PRE_PAID. Cash on delivery is
not supported through this connector.
Errors and what to do
Every failure comes back to Peoplevox with status fail and one of these
messages. The pack bench shows the message.
| Message | Cause | What to do |
|---|---|---|
Peoplevox schema other than v2.0 is not supported by Carriyo | The Carrier Integration uses another request schema version. | Set the request schema version to 2.0. |
Cannot find a carriyo connector for given tenant (…) and connectorId (…) | The endpoint URL does not match a connector, or the connector is inactive. | Copy the endpoint from the connector page and make sure the connector is Active. |
Unauthorized Api key | The API key in Peoplevox does not match the connector. | Copy the API Key from the connector page into the Carrier Integration. |
Could not create shipment in carriyo: Package <id> is already booked on shipment <reference>. Cancel that shipment to move the package. | A booked box was re-sent with a different service type. | Cancel the named shipment in Carriyo, then re-send the box. |
Could not create shipment in carriyo: Could not confirm shipments. | Booking failed for at least one shipment of the despatch. | Open the despatch's shipments in the Dashboard, fix the error, and re-send the box. Shipments that did book are not booked twice. |
Could not create shipment in carriyo: <other message> | Carriyo rejected the shipment request, or the connector hit an unexpected error. | Check the Carriers and Locations mappings and the order's address and contact data, then re-send the box. |
Could not create label (timed out) | The carrier did not return a label within 20 seconds. The shipment is booked. | Wait for the label to appear on the shipment in the Dashboard, then re-send the box to print it. |
Could not create label (shipment in error) | The carrier rejected the booking. | Open the shipment in the Dashboard, fix the carrier error, and re-send the box. |
Could not create label (internal error) | Carriyo could not read the shipment while waiting for the label. | Re-send the box. Contact support if it repeats. |
To see the requests Carriyo received, open the Integration Monitor. Each shipment also records the webhook that created or updated it in its system logs.
Limits
- One direction. Peoplevox calls Carriyo. Apart from the labels and tracking number in the webhook response, nothing is sent back to Peoplevox: no status updates, no stock.
- Schema version. Only request schema version
2.0is accepted. - Payment.
PRE_PAIDonly. - Label wait. Up to 20 seconds per shipment, inside the 30-second Peoplevox timeout.
- Cross-reference retention. The link between a despatch and its shipments is kept for 90 days after the last box. A box re-sent after that is treated as new.