/
/
See an Attio contact's WooCommerce order history
For sales reps who want their AI assistant to pull a contact's orders, refunds and net spend from the store by email.
On this page
Connector
Connect Attio, pick your AI tool and paste the prompt.
The problem
Calls start from the wrong order history
Before a call, a rep looks the contact up in Attio, then searches WooCommerce by hand for their orders. Refunds get missed and similar names get mixed up, so the conversation starts from the wrong picture.
Without PopdockAI
- Look the contact up in Attio
- Search WooCommerce by name and hope it is the right person
- Add up orders and refunds by hand
- Mix up two customers with similar names
With PopdockAI
- The contact is matched to WooCommerce by email only
- Other addresses are tried before giving up
- Orders, refunds and net spend are totalled per currency
- It stops if more than one person matches
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Show the store purchase history of the Attio contact with email {person-email}, looking back {lookback-days} days (default 365).
**Step 1: Find the contact in Attio**
Call `attio-get-record-people` with `email-addresses` = {person-email}. If nothing matches, report that the contact is not in Attio and stop. If more than one matches, list them (name, `record-id`, `company`) and stop. Keep `name`, `company`, `job-title` and `last-interaction`.
**Step 2: Find the customer in WooCommerce**
Call `woocommerce-get-customer` with `email` = {person-email}. If no customer matches, also try each other address in the contact's `email-addresses`. If still none, report the contact as in Attio but not a WooCommerce customer, and stop. Keep `customer-id`.
**Step 3: Pull orders and refunds**
Call `woocommerce-get-order` with `customer-id` and `created-date.from` set to today minus {lookback-days} days. Call `woocommerce-get-refund` with the same `customer-id` and `created-date.from`. Guests have no `customer-id`; in that case filter both by `customer-email` instead.
**Step 4: Report**
A header with the Attio name, company and last interaction, then a table of orders (`order-number`, `created-date`, `status`, `total`, `currency`), a table of refunds (`refund-id`, `order-number`, `amount`, `reason`), and totals: order count, gross spend, refunded amount, net spend. Add a line saying whether the last order is more recent than the Attio `last-interaction`.
**Rules & Guidelines:**
* Tools named attio-* are on the attio server; tools named woocommerce-* are on the woocommerce server. Both servers must be connected.* This is read-only. Do not call any add, update, upsert, delete or send tool on either server (for example `attio-add-person`, `attio-update-person`, `attio-add-deal`, `woocommerce-update-customer`, `woocommerce-add-refund`, `woocommerce-send-order-details`).* Match on email only; never match on name.
**Validation:**
* Currencies may differ across orders; total each currency separately.
* If an email differs only by case, treat it as the same address.Who it's for
One answer, three teams that use it
Sales reps
Open every call with the purchase history
See what the contact has ordered, refunded and spent, and whether they bought since you last spoke.
What has sam@contoso.com ordered and refunded in WooCommerce over the last 6 months?
Account managers
See net spend without the store admin
Gross, refunded and net spend in one answer, so you can talk value with the customer straight away.
Show net WooCommerce spend for priya@fabrikam.com from Attio over the last 2 years.
Support agents
Check recent orders before you reply
Find a customer's latest orders and refunds by email, without guessing between people with similar names.
Pull the last 90 days of WooCommerce orders and refunds for the Attio contact dana@northwindtraders.com.
How it works
What PopdockAI does when you ask
You give the contact's email and a look back window, and your AI assistant pulls their store history through Attio. Matching is by email and nothing is changed.
01
Ask
You give the contact's email and how far back to look.
02
Match
It finds the person in Attio and the customer in WooCommerce by email, and stops on multiple matches.
03
Pull
It reads the orders and refunds for that customer.
04
Report
You get the order and refund tables, gross, refunded and net spend.
What PopdockAI provides
The tools behind the answer
Ready made tools for Attio and one secure connection to your AI tool. No code, no exports.
attio-get-record-people
woocommerce-get-customer
woocommerce-get-order
woocommerce-get-refund
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Know a contact's orders and refunds before the call
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
