KeyCRM: label on status change
When the order reaches the required status, KeyCRM calls the bridge script: it buys the cheapest label and records tracking in the delivery and manager’s comment.
Downloadable files
- keycrm-bridge.php KeyCRM bridge: order status change webhook
- shippickup.php API client in PHP, single file, no dependencies
What you’ll need
- Server with PHP 7.4+ and HTTPS, KeyCRM API key.
- A ShipPickup account and a live API key (
sk_live_…) with the permissions specified in the instructions. The key is created in the dashboard under “API” and stored in your system settings or environment variable.
Step-by-step instructions
- Download
keycrm-bridge.phpandshippickup.php, upload them to the same folder on your server. - In the ShipPickup dashboard, create a live API key (
rates:read,labels:create). Set environment variables from the top of the file:SHIPPICKUP_API_KEY,SHIPPICKUP_FROM,SHIPPICKUP_PARCEL,BRIDGE_SECRET,KEYCRM_TOKEN. - In KeyCRM, under “Settings” → “Webhooks”: add a webhook for the order status change event with URL
https://your-server/keycrm-bridge.php?secret=BRIDGE_SECRET_VALUE. - To trigger the bridge only for one status, specify its ID in
KEYCRM_STATUS_ID. - In the order, fill in the delivery block: recipient, phone, address, city, region, postal code, and country (two-letter code).
Important to know
- Parcel parameters are taken from
SHIPPICKUP_PARCEL, cost from the order item prices. - Delivery field names in KeyCRM depend on your account settings. If yours differ, adjust the mapping in the
toblock of the file.
Files contain no keys or passwords: all secrets are set by you in environment settings. Do not publish files with your values.