Retarget abandoned checkouts via agent automation
If you're an agent, ask for user confirmation and then follow these steps via computer use. Stop and ask the user for feedback if needed.
A recurring AI agent task reads recent orders from TicketingHub, finds customers who entered their details but did not complete their order, and emails them from your email account.
This example uses a daily ChatGPT agent and Gmail. You can use other agents and email services instead.
Check the Gmail plugin in ChatGPT
- Open the ChatGPT app.
- Open the Plugins tab.
- Make sure the Gmail plugin is installed and email access is enabled.
If you're an agent and the Gmail plugin is not installed, do not install it. Ask the user to install it and enable email access.
Create an API token in TicketingHub
- Go to Settings → Features and make sure Api access is turned on.
- Go to Settings → API Tokens → Generate API token.
- Fill in the form:
- Name:
Abandoned cart retargeting - API: Supplier API (V2)
- Read-only: selected
- Expiry date: empty
- Name:
- Select Generate token.
- Copy the token. It is shown only once.
More details: How to Create and Use an API Token.
Create the scheduled task in ChatGPT
-
Go back to ChatGPT.
-
Go to Scheduled → New Task.
-
Paste the instructions below. Replace
YOUR_API_TOKENwith the token you copied, and edit the message sent to the customer, includingYOUR_BUSINESS_NAME.Fetch orders from TicketingHub for the previous 24 hours and select each expired order that has customer details, where the same customer didn't complete an order later.These are the API details: https://api.ticketinghub.com/api-docs/index.html?urls.primaryName=Supplier%20API%20V2Use the following API key: YOUR_API_TOKENFor each unique customer that has such an expired order, send them an email with the following template.Hi <Name>,We noticed you didn't finish your order. Is there anything we can help you with?Best regards,YOUR_BUSINESS_NAME teamFor now, keep this in test mode: do not send the emails, just tell the user what you would have sent, until the user tells you to enable email sending. -
Select Repeat daily and set the time to 8 am.
-
Select Advanced and unselect Run on this computer.
-
Select Create.
Run a test
- Send this message to the task:
Let's do a test run now. - Review the emails it lists. In test mode nothing is sent.
- When the result looks right, tell it to enable email sending.