Daily
Start the day with your delivery status counts
Each morning you see how many trackings are delivered, in transit or in exception.
- Runs
- Daily
- Apps
- AfterShip
- AI
- Not needed
- Access
- API key
Send this to your assistant
Create a ClickRuntime automation: every morning at 7am, count my AfterShip trackings updated in the last day by status and email me the totals, listing any in Exception.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Customer service teams of online shops that ship through many carriers use AfterShip to track parcels, but opening the dashboard each morning to see where everything stands is a chore. Packages sit in exception, such as a failed delivery attempt or an address problem, and no one sees them until the customer writes in. By then the parcel may be on its way back to the warehouse and the customer is angry.
Every day, the automation lists the trackings that were updated, groups them by tag (for example Delivered, InTransit, AttemptFail and Exception) and emails you the counts with the details of the problem ones. You see the state of all shipments in a single email.
It works for e-commerce support teams, fulfillment managers and anyone who answers the question where is my order every day.
What you get out of it
Support answers the question before it is asked
With a list of exceptions each morning, your team can email customers about delays proactively. Fewer where-is-my-order tickets arrive, and the ones that do are easier to answer. Even a short apology and a new estimate keep the customer on your side.
Problem parcels are spotted while they can be saved
A failed delivery attempt can often be resolved with a call to the carrier or a corrected address. Waiting until the parcel is returned makes it an expensive reshipment. A phone call to the carrier on the day of the failure often fixes what a returned parcel cannot.
Carrier performance becomes clear
Counts of delivered, in-transit and exception parcels over several weeks show which carriers are reliable. Those numbers support conversations about switching or renegotiating. Those figures give you a factual basis to renegotiate rates or move volume to a better carrier.
Managers see volume at a glance
The totals show how many parcels are in flight, which helps staffing in support and warehouse teams during peak season. It also shows when peak-season volume is building up before the queue reaches your support inbox.
A daily record for disputes
If a customer claims a parcel never arrived, you have a dated record of its status from the carrier, useful in claims and chargeback responses. Dated carrier statuses help when you file an insurance claim.
How it works
What happens, step by step
Every morning, ClickRuntime looks at every AfterShip tracking updated in the last day.
It counts how many are delivered, in transit, out for delivery or in exception.
You get an email with those counts, followed by the tracking number and order of each parcel in exception.
Before it runs live
- Connect AfterShip
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other AfterShip steps into one automation
Under the hood
The code that runs this automation
from collections import Counter
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify
@on_trigger
def run(event):
since = (datetime.now(timezone.utc) - timedelta(days=1)).strftime("%Y-%m-%dT%H:%M:%SZ")
trackings = http.get("https://api.aftership.com/tracking/2024-04/trackings",
headers={"as-api-key": credentials.secret("AFTERSHIP_API_KEY")},
params={"updated_at_min": since, "limit": 200}).json()["data"]["trackings"]
counts = Counter(t["tag"] for t in trackings)
exceptions = [f"• {t['tracking_number']} ({t['slug']}) order {t.get('order_id') or '-'}"
for t in trackings if t["tag"] == "Exception"]
body = "\n".join(f"{tag}: {n}" for tag, n in counts.most_common())
if exceptions:
body += "\n\nExceptions:\n" + "\n".join(exceptions)
notify.email_me(f"Deliveries: {len(trackings)} updated in the last day", body)
return dict(counts)FAQ
Common questions
Which AfterShip tags are included?
Does it include trackings from every carrier?
How does it decide what updated today?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Be warned when an AfterShip parcel is stuck
When a delivery attempt fails or a carrier flags an exception, you find out first and can reach the customer.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksPost a morning briefing to Slack
Your team starts the day with the weather, a reminder or anything else you'd like in #general.
See how it worksKeep exploring
Set up “Start the day with your delivery status counts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.