Using a different carrier? See Package Tracking.
Introduction
Zembula connects to Canada Post through an app that you create in the Canada Post Developer Portal, with Canada Post's Tracking API added. Zembula uses it only to look up tracking numbers. It never creates shipments or changes anything in your Canada Post account.
This guide covers creating the app, copying its credentials, and connecting them in the Zembula platform. You enter the credentials in Zembula yourself.
Who can do this
You need a Canada Post account with a business profile and a customer number. Creating the account is free. If you don't have a customer number, Canada Post lets you register for one online while you set up the account.
Zembula doesn't ask for your customer number. The API Key and its secret are all Zembula uses.
In Zembula, only account Admins can connect Canada Post. Other users can open the Package Tracking page, but they can't change it.
Before you go live
Each time an image with Canada Post tracking loads, Zembula can ask Canada Post for the latest scans. So each email open can use one Canada Post tracking call.
Canada Post sets a rate limit for each API product, counted over a rolling 60 seconds. To see your Tracking limit and how much of it you use, select Apps in the Developer Portal, select your app, and check its API products table.
If calls go over the limit, Canada Post blocks further calls until the 60-second window ends, and the image can't show tracking for those loads. If your business needs a higher limit, Canada Post asks you to email developer.program@canadapost.postescanada.ca.
Create the app
Sign in to the Canada Post Developer Portal, or create a free account. A new account must accept the Developer Portal Terms and Conditions before it can sign in.
Select Apps in the top menu and choose Create new app.
Choose the Production app type. Test apps only return sample data, and you can't change the app type after you create the app.
Give the app a name, for example Zembula tracking, and select Create.
In the app's API products section, select Add API product, choose Tracking, select Get access and confirm.
Copy the credentials
Creating the app gives you an API Key and an API Secret. Copy both. Canada Post shows the API Secret only once.
If you lose the secret, reset it: open the app under Apps and select Reset API Secret in the Credentials section. An app can hold more than one credential, so you can also add a separate one for Zembula with Add credential.
Keep the API Secret private. Don't send it by email or chat. You enter it yourself in the Zembula platform in the next step.
Connect Canada Post in Zembula
In the Zembula platform, open Data Sync → Integrations and select the Data integrations tab.
Click Set up on the Package Tracking tile. If Package Tracking is already set up, the button reads Open instead.
If Package Tracking is off, click Turn on. The page shows Setting up the builder source… and then Use INTERFACES › Package Tracking in the builder.
Under Carriers, click Add on the Canada Post row.
The Canada Post row lists API Key and Secret. Click Paste a key next to API Key. The Paste your Canada Post keys dialog opens.
The dialog has two fields. Paste the API Key into API Key and the API Secret into Secret.
Click Connect.
The button reads Verifying… while Zembula saves your credentials. The Canada Post row then reads Connected — starts answering within the hour.
Zembula doesn't test your credentials with Canada Post when you connect. A wrong key shows up later as missing tracking. Check it with Try it below.
If order data is live for Package Tracking, the Canada Post row reads Connected — waiting: carriers and order data can't run together until the next release. To switch, click Use Canada Post instead. This turns order data off and Canada Post on. Content that sends only an order ID then shows your fallback.
Try it
Add INTERFACES › Package Tracking to a draft image in the builder, turn on Simulate, and preview it with a Canada Post tracking number. If a number you know is real shows no tracking, check the credentials, that the app is a Production app, and that Tracking is one of its API products.
The Status section at the bottom of the Package Tracking page also lists anything that needs attention.
Using Canada Post in your content
Send each shipment's tracking number in tracking_number and its carrier in carrier. Zembula doesn't work out the carrier from the tracking number, so always send the carrier.
A carrier value goes to Canada Post when it contains Canada Post or Postes Canada, with or without a space, underscore or hyphen between the words, in any case. For example: Canada Post, CANADA_POST, CanadaPost, Canada Post Expedited Parcel or Postes Canada.
Send the parcel's tracking number from its shipping label. Canada Post calls it the PIN. Zembula looks the number up as a PIN, so the number on a Delivery Notice Card won't find the parcel. Send the number as text, not as a number. Zembula removes any spaces for you.
What shoppers see
Status: the stage of the latest scan Canada Post reports when the image loads, such as In Transit, Out for Delivery or Delivered. A Canada Post scan Zembula can't classify reads In Transit.
Estimated delivery: Canada Post's expected delivery date, labelled Expected Delivery. If Canada Post changes the date, the new date, labelled Rescheduled Delivery. It's a date with no time. After delivery it reads Delivered, with the delivery time. A returned or failed parcel shows no estimate.
Tracking link: the parcel's page on canadapost-postescanada.ca, in English.
Manage delivery link: none.
Tracking.manage_delivery_urlstays empty for Canada Post.Action link: when the parcel waits for pickup at a post office,
Tracking.Activities.Current.ActionRequired.action_urllinks to that post office in Canada Post's post office finder when Canada Post names the post office. Otherwise it links to the tracking page. When duties or taxes are due, it links to Canada Post's page for paying them.
Canada Post's Tracking API returns limited details for older tracking numbers, so content for older parcels may show less tracking.
Where your credentials are kept
The API Key and the secret are saved as encrypted secrets. They can't be read back: the platform only shows their last four characters. They're listed under Data Sync → Secrets & Configs, and they can only be sent to Canada Post's API (api.canadapost-postescanada.ca).
If you reset the secret in Canada Post, open the Package Tracking page and click Replace key next to Secret on the Canada Post row. Paste the new secret and click Connect. To stop using Canada Post, click Disconnect.
More detail: Shared Secrets and Configs.
Additional resources
