Plan: Premium and above
Platform: Gladly
Applies to: AfterShip Tracking, AfterShip Returns, AfterShip Warranty
Overview
The AfterShip app for Gladly brings AfterShip Tracking, Returns, and Warranty data into Gladly, so your team can answer "Where is my order?", return, and warranty questions without leaving the conversation.
Learn how to connect AfterShip to Gladly using the AfterShip app v2, which Gladly builds on Gladly App Platform and connects to AfterShip public APIs with an API key. This guide walks you through creating the configuration, setting your return policy and action permissions, adding Customer Profile cards, registering agent actions, and setting up Gladly AI. Once live, your agents and your AI Agent can resolve post-purchase questions inside Gladly.
Note: Gladly builds and maintains version 2.0 and later of the AfterShip app (aftership.com/AfterShip/v2.x.x), so contact Gladly Support first about app features such as cards, agent actions, forms, or AI Agent behavior. Contact AfterShip Support about your AfterShip account, API keys, or the tracking, return, and warranty data itself.
Before You Begin
Requirements
An AfterShip account with Tracking, Returns, or Warranty (each card and action shows data only for the products you use)
An AfterShip API key with Tracking API and Returns API access, plus Warranty access if you use AfterShip Warranty (create one in the AfterShip admin under Settings > API keys)
The AfterShip app installed in Gladly, listed as
aftership.com/AfterShip/v2.x.xwhen you create a configuration (if you don't see it, contact your Gladly account team)Customer email addresses on file in Gladly, because the app matches AfterShip records to Gladly customers by email (see How Customer Matching Works)
Permissions
Gladly Administrator role, to edit Settings > Apps, Customer Profile, and Agent Actions
Limitations
The app connects with an API key, not OAuth. Anyone with the key can read and act on your AfterShip data, so store the key as you would a password
Set Up the App
The setup is divided into three parts:
connect AfterShip (Steps 1–3),
add the cards (Step 4), and
register the agent actions (Step 5).
The cards work as soon as you finish Step 4. The compose menu stays empty until you finish Step 5.
Step 1: Create the AfterShip configuration
Connect Gladly to your AfterShip account with your API key.
In Gladly, go to Settings > Apps and click Create Configuration.
Enter a name your team will recognize, such as
AfterShip Production, and selectaftership.com/AfterShip/v2.x.xas the External App.Turn on Configuration is active and paste your AfterShip API key.
(Optional) Set Results limit, the maximum number of shipments, returns, and claims each lookup shows. The default is 20.
(Optional) Enter your AfterShip store ID to show the Order details card.
The AfterShip configuration form in the Gladly Settings > Apps
Note: Skip the store ID if your store is on Shopify, because Gladly's Shopify integration already shows order data. For a Shopify-connected store, the ID is app-shopify- followed by your myshopify subdomain (acme.myshopify.com becomes app-shopify-acme); if you're unsure, leave it empty, since it affects only the Order details card.
Step 2: Set your return policy
Gladly uses your return policy to show a return window on each shipment, such as "Returnable until Oct 4 (12 days left)".
In How many days do customers have to start a return?, enter a number, such as 30. Leave it empty to turn off the return window.
In Counting from when?, choose the start date. The default is the delivery date. If an order has no date, the card shows the window as unknown.
In Which orders can NEVER be returned?, enter comma-separated order tags, such as
final-sale, clearance. Orders with these tags show "Not returnable".In Reasons your team may give when REJECTING a return or claim, enter comma-separated reasons. Leave it blank to allow free text.
Important: AfterShip emails the rejection reason to the customer under your brand. When you set a reasons list, agents and the AI Agent can use only reasons on that list.
Step 3: Choose which irreversible actions to allow
Three actions can't be undone, so each is off by default. The actions check these switches themselves, so an AI Agent or Workflow can't bypass them. Turn one on only if agents should be able to use it from Gladly.
Turn on Return rejection to let agents reject a return. AfterShip can't un-reject a return, and it emails the reason to the customer.
Turn on Warranty claim rejection to let agents reject a warranty claim. AfterShip also emails this reason to the customer.
Turn on Warranty claim processing to let agents repair, replace, send a repair kit, or issue store credit. Then list the Allowed warranty resolutions:
repair_item,replace_item,send_repair_kit,issue_store_credit,other.Click Save.
Return policy and action permission settings in the AfterShip configuration
Warning: If you leave Allowed warranty resolutions blank, the app refuses every warranty claim processing request.
Step 4: Add the cards to the Customer Profile
Add the AfterShip cards so agents see each customer's records next to the Conversation.
Go to Settings > Customer Profile.
Hover between two cards, click + Add card, and choose App Platform Card.
In the panel that opens, choose your AfterShip configuration under App / Configuration, then select the Card Template and its Query from the table below.
Repeat for each card you want, drag the cards into order, and click Save.
Card Template | Query |
Customer shipments |
|
Customer returns (self-serve) |
|
Customer warranty claims |
|
Order details from AfterShip Commerce | The order query offered for this template |
Adding an App Platform Card in the Gladly Settings > Customer Profile
Note: Gladly hides a card on a customer's profile when the card has no data for that customer.
Step 5: Register the agent actions
Installing the app doesn't add the actions to the compose menu, so register each action once. Until you do, the cards still work, but the compose menu has no AfterShip actions.
Go to Settings > Agent Actions. Gladly's own docs may call this Org Manager > Integrations > External App Forms.
Under App Platform Actions, click Add Action.
Enter the Label agents see, such as
Approve return, choose your AfterShip configuration, and choose the Action.Click Add, then repeat for each action you want agents to use:
approveReturn,getReturnLabel,rejectReturn,resolveReturn,approveClaim,rejectClaim,checkClaimResolutions,predictDeliveryDate,retrackShipment.
Adding an App Platform Action in the Gladly Settings > Agent Actions
Tip: Use plain-English labels, because the label is what appears in the compose menu. If you keep the action name as the label, agents see names like approveReturn.
Step 6: Set up a Gladly AI Guide (optional)
Connect the AfterShip actions to your AI Agent through Guides, so it can answer tracking, return, and warranty questions itself and hand off to a person when it can't.
Go to Gladly AI > Manage > AI Agents and open your AI Agent.
Click Add Guide and describe when the Guide applies, such as "The customer wants to know the current status or location of their order (WISMO)."
Add a step, choose Action, and select the AfterShip action, such as
trackings - AfterShip - v2 (Query).Write plain-language instructions: how to look up the order, what to tell the customer, and when to hand off.
Click Save, then set the Guide to Active.
Example instructions for a where is my order (WISMO) Guide:
Look up the customer's order using the trackings action, searching by order number or tracking number. If the exact value returns nothing, retry with just the digits. Share the shipment status, latest checkpoint and estimated delivery date. If tracking shows no updates for several days, acknowledge the delay and offer to escalate.
Gladly AI Guide with an AfterShip action step
Step 7: Test the AI Agent before you publish
Check that your Guides answer correctly before customers see them.
On the Guide or AI Agent page, click Test.
Choose a test customer whose email has AfterShip data.
Chat as the customer. Under each reply, Gladly shows which Guide answered.
In the Actions and tools panel, set a test response for any action you don't want to run.
AI Agent test chat
Warning: Tests run actions for real unless you set a test response for them. Use a test profile, not a real customer.
What Your Team Will Experience
After completing these steps:
Agents see up to four live AfterShip cards on the Customer Profile: Shipments, Returns, Warranty claims, and Order details
Agents run nine AfterShip actions from the Conversation compose menu to move a return or warranty claim forward, predict a delivery date, or restart tracking
Your AI Agent uses the same lookups and actions through Guides to resolve post-purchase questions on its own
Customers get tracking, return, and warranty answers in the Conversation, from an agent or the AI Agent
Customer Profile cards
When an agent opens a Conversation, the cards load the customer's AfterShip records next to it. Each card puts the most urgent item first and flags it, such as "Needs attention: 1 exception(s) on this return" or "Worth a look: Open 90+ days". Many cards also suggest a ready-to-send reply, such as "Good news - your order #1623 was delivered on Nov 5, 2026."
Shipments
The Shipments card shows one entry per tracking from AfterShip Tracking.
At a glance: Status and status detail, estimated and delivered dates, contents, order number, tracking number, carrier and service, destination, shipped date, order tags, and carrier tracking link
Carrier scans: Latest scan with location and time, days since last scan, and the full checkpoint history
Shipment details: Full delivery and origin addresses, order date, days since order, first delivery attempt, receiver name and phone, carrier phone, and carrier code
Return window: "Returnable until … (N days left)" or "Not returnable", when you set a return policy in the configuration
Shipments card
Returns
The Returns card shows one entry per return merchandise authorization (RMA) from AfterShip Returns.
At a glance: RMA number, order number, status, return shipment status, requested date, and return method
Items: Each returned item with variant, reason, and quantities returning, received, and restocked
Money & handling: Estimated refund, label cost, refund destination, resolution (refund, exchange, and so on), who filed the return, and whether AfterShip auto-approved it
Links: Prepaid return label (PDF), QR code for drop-off, packing slip, return tracking number and carrier, and a link to the return in the AfterShip portal
Returns card
Warranty claims
The Warranty claims card shows one entry per claim from AfterShip Warranty.
At a glance: Claim ID, status, order, items, reported issue, filed date, resolution, and replacement order
Return shipment: Tracking number, status, and carrier of the faulty item on its way back
Claim details: Warranty flow, items claimed and resolved, days open, and Open claim in AfterShip
Warranty claims card
Order details
The Order details card appears only when you set an AfterShip store ID in Step 1. It shows the order behind each shipment: order name and number, created date, store, financial status ("has my refund gone through?"), fulfillment status, totals, discounts, shipping and tax, line items with SKU and image, how much the customer can still return, addresses, and shipping method.
Agent actions in the Conversation
Agents run AfterShip actions from the + (compose) menu at the bottom of a Conversation, under your AfterShip configuration's name. Each action opens a short form. Gladly posts the result to the Conversation timeline as an activity, so the whole team can see what happened.
AfterShip actions in the compose menu
Action | What it does | Records offered in the picker | Changes data? |
Approve return and generate label | Approves a pending return. AfterShip then generates the prepaid label and notifies the customer | Returns awaiting approval | Yes |
Get return label | Fetches the prepaid label of an approved return to share with the customer | Approved returns | No |
Reject return | Rejects a pending return with a reason that AfterShip emails to the customer | Returns awaiting approval | Yes, can't be undone |
Resolve return | Closes out an approved return once the items are back and the refund is settled | Approved returns | Yes, can't be undone |
Approve warranty claim | Accepts a claim, with an optional internal note | Claims awaiting a decision | Yes, can't be undone |
Reject warranty claim | Rejects a claim with a reason that AfterShip emails to the customer | Claims awaiting a decision | Yes, can't be undone |
Check allowed resolutions | Shows which resolutions (replace, repair kit, store credit, and so on) your warranty rules allow for a claim | All of the customer's claims | No |
Predict delivery date | Asks AfterShip AI for a delivery window for a shipment's carrier and route. An optional service level sharpens the estimate | All of the customer's shipments | No |
Restart tracking | Restarts tracking on a shipment that AfterShip has stopped updating | Stalled shipments only | Yes |
Built-in safeguards
Pickers, not free text: Every form lists only the current customer's own records, filtered to the ones the action applies to, so an agent can't act on another customer's return or claim
Explicit confirmation: Actions that cost money or can't be undone require a confirmation checkbox, such as "I understand this generates a prepaid label at our cost" or "I understand this cannot be undone". The form won't submit until the agent selects it
Admin switches: Reject return, Reject warranty claim, and warranty claim processing stay off until an administrator turns them on in the configuration
Helpful empty states: When no records qualify, the form says so instead of showing a blank picker, such as "None of this customer's 10 shipment(s) are stalled … so there is nothing to restart."
Confirmation checkbox and empty state in an action form
Example: Approve a return
Open the customer's Conversation and click + > AfterShip > Approve return.
Select the pending return. The refund destination shown is the one the customer chose when filing.
Select I understand this generates a prepaid label at our cost and click Approve.
Check the timeline for "Return approved. RMA #… is approved and AfterShip is generating the prepaid label."
After a few seconds, run Get return label to fetch the label and share it.
Approving a return
More examples
Check allowed resolutions for a warranty claim:
Check allowed resolutions
Predict delivery date for a shipment:
Predict delivery date
Resolve return once the items are back:
Resolve return
Gladly AI actions
The AfterShip actions appear in Gladly under Settings > App Platform Actions and in each Guide's action picker, labeled Read or Write.
Type | Actions |
Look up (Read) |
|
Act (Write) |
|
The admin switches and rejection reasons list in your configuration apply to the AI Agent exactly as they apply to agents.
Guides that work well with AfterShip:
Guide | Main actions |
Track my order |
|
Delayed or lost shipment |
|
Check return status |
|
Return policy question |
|
Check warranty claim status |
|
In AfterShip testing, the AI Agent answered "Where is my order #1623?" correctly from live tracking data, found both returns for an order and explained that they had expired, and reported a warranty claim as in process. When it couldn't complete a request, it handed off to an agent with a summary.
Note: To start a new return, sending customers to your AfterShip Returns page is the most reliable path today. Creating a return from chat needs the order's platform line-item IDs, so when the AI Agent can't create one, it hands off to a person.
AI Agent handoff
How customer matching works
The app finds a customer's AfterShip records by email address: the primary email on the Gladly Customer Profile, or the first email if none is primary. A customer with no email gets empty cards, not an error.
Returns and warranty claims: The app matches on an exact, case-insensitive email
Shipments: The app also matches on an exact email. AfterShip Tracking has no email filter, so the app applies its own exact-email check to the results and shows nothing if it can't confirm a match
Order details: The app finds orders through the customer's shipments, which it already matched by email
If a customer used a different email at checkout, add that email to their Gladly profile and make it primary, or look up the order in AfterShip directly.
Troubleshooting
Problem | Cause | Solution |
Cards show, but there are no AfterShip actions in the compose menu | The actions aren't registered | Add the actions under Settings > Agent Actions (Step 5) |
A card doesn't appear for a customer | The card has no data for that customer, or the customer has no email on file | Check that the customer's email matches the one used at checkout |
The Order details card never appears | No AfterShip store ID is set, or the ID doesn't match a store in your AfterShip account | Enter a valid AfterShip store ID (Step 1). Shopify stores can skip this card |
No "Returnable until…" line on shipments | The return window days field is empty | Enter a number of days in the configuration (Step 2) |
"Label not ready yet" after Get return label | AfterShip is still generating the label | Try again after a few seconds. Returns that use "Ship with any carrier of your choice" or a retail store drop-off never get a prepaid label |
Reject return or Reject claim is refused | The admin switch is off, or the reason isn't on the allowed reasons list | Turn on the switch (Step 3) or add the reason to the list (Step 2) |
Processing a warranty claim is refused | No Allowed warranty resolutions are listed | List the allowed resolutions in the configuration (Step 3). Use Check allowed resolutions to see what your rules permit |
"Claim status transfer is not allowed" | The claim has already moved past the decision stage in AfterShip, such as in process | Manage the claim in AfterShip |
Restart tracking says there is nothing to restart | All of the customer's shipments are delivered or updating normally | No action needed |
The picker shows fewer records than expected | Results limit caps lookups (default 20) | Raise Results limit in the configuration (Step 1) |
FAQs
1. Does the AfterShip app for Gladly need OAuth?
No. The app connects with an AfterShip API key that you enter in Gladly.
2. Can I connect more than one AfterShip account to Gladly?
Yes. Create one configuration per account. Each configuration gets its own cards and actions.
3. Who should I contact for help with the AfterShip app for Gladly?
Contact Gladly Support first for any issue with the app's features or setup, because Gladly builds and maintains the AfterShip app v2.0 and later. Team Manager and Administrator roles can reach Gladly Support from the menu > Contact Gladly Support. Contact AfterShip Support for questions about your AfterShip account, API keys, or data that looks wrong in AfterShip itself.
Key Takeaways
The AfterShip app for Gladly shows Tracking, Returns, and Warranty data and actions inside Gladly Conversations
Return rejection, warranty claim rejection, and warranty claim processing stay off until you turn them on
The app works on any AfterShip plan that supports API keys and runs on Gladly App Platform
Agents see AfterShip cards on the Customer Profile and AfterShip actions in the compose menu
The compose menu shows no AfterShip actions until you register each one under Settings > Agent Actions












