Triple Whale
App · 16 actions
Read your Triple Whale metrics, attribution and SQL results, and send it orders, products, customers, subscriptions, ad and email figures, survey answers and offline events.
Actions
| Action | What it does |
|---|---|
| Add costs to an order | Add shipping costs, other expenses, your own figures or an ignore flag to an order from Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to. |
| Check API key | Check the connection's API key works, with what Triple Whale says about it. |
| Get orders with attribution | List orders placed in a period with the ad that first brought each customer and the pages they viewed before buying. |
| Get summary metrics | Get the shop's Summary Page metrics, such as revenue and orders, for a period of days. |
| Request customer data deletion | Ask Triple Whale to delete or mask what it holds on customers, found by their email addresses or phone numbers. |
| Run SQL query | Run a SQL query on the shop's Triple Whale tables (orders_table, ads_table, pixel_joined_tvf and the rest) for a period, and get the rows. |
| Send ad figures | Send a day's spend, clicks and conversions for a campaign, ad set or ad on an ad platform Triple Whale doesn't connect to. |
| Send customer | Send a customer from a sales platform Triple Whale doesn't connect to. |
| Send email or SMS figures | Send a day's figures for an email, SMS or direct mail campaign or flow from a tool Triple Whale doesn't connect to. |
| Send offline event | Send an event that happened away from your site, such as a lead, a booked demo or a custom event, to the Triple Pixel, matched to the person by email, phone or your own ID. |
| Send order | Send an order from a sales platform Triple Whale doesn't connect to. |
| Send orders in bulk | Send up to 1,000 orders from a sales platform Triple Whale doesn't connect to, each as 'Send order' takes it. |
| Send post-purchase survey answer | Send a customer's answer to a post-purchase survey (such as how they heard of you) for an order already in Triple Whale, to use in attribution. |
| Send product | Send a product from a sales platform Triple Whale doesn't connect to, with its variants, prices and costs. |
| Send subscription | Send a subscription from a platform Triple Whale doesn't connect to, with its items and status. |
| Set a product's cost | Set what a product, or one of its variants, costs you, for a product from Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to. |
Add costs to an order
Add shipping costs, other expenses, your own figures or an ignore flag to an order from Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to.
Inputs
- Order ID
order_idtextRequired - The order's ID in Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to.
- Platform
platformtext - The platform the order is from. Needed for a second sales platform such as Amazon; leave empty for your main one.
- Shipping costs
shipping_costsnumber - What shipping cost you. Used when Default Shipping Costs is chosen in Triple Whale's cost settings.
- Other expenses
custom_expensesnumber - Other costs of the order.
- Gross sales
custom_gross_salesnumber - Your own gross sales figure.
- Gross profit
custom_gross_profitnumber - Your own gross profit figure.
- Net revenue
custom_net_revenuenumber - Your own net revenue figure.
- Items
total_items_quantitynumber - How many items are in the order.
- Count as an order
orders_quantitytext - Whether this order counts toward order totals.One of:
1(Count it (1)),0(Don't count it (0)). - Ignore order
ignore_ordertrue/false - Leave the order out of reports, such as a test order.
- Custom status
custom_statustext - A status of your own to filter by.
- Custom number
custom_numbernumber - A number of your own.
- Custom text
custom_stringtext - Text of your own, such as a note.
Outputs
fieldslist- The values sent
messagetext- Triple Whale's own reply
order_idtext- The order
successtrue/false- True once Triple Whale took it
Example output
{
"fields": [
"shipping_costs"
],
"message": "Order enrichment successfully received.",
"order_id": "5123456789",
"success": true
}Check API key
Check the connection's API key works, with what Triple Whale says about it.
Inputs
None.
Outputs
detailsobject- What Triple Whale says about the key
shoptext- The connection's shop
validtrue/false- True when the key works
Example output
{
"details": {},
"shop": "example.myshopify.com",
"valid": true
}Get orders with attribution
List orders placed in a period with the ad that first brought each customer and the pages they viewed before buying. Gets one page; run it again with the next page to see more.
Inputs
- From
start_timedate and timeRequired - The start of the period.
- To
end_timedate and timeRequired - The end of the period.
- Page
pagenumber - Which page, from 1. Defaults to the first.At least 1.
- Page size
page_sizenumber - How many orders per page, 1 to 100. Defaults to 50.From 1 to 100.
- Leave out journeys
exclude_journeytrue/false - Skip the pages each customer viewed, for a smaller, faster answer.
Outputs
countnumber- How many on this page
end_timetext- The period's end (UTC)
has_moretrue/false- Whether there is a next page
next_pagenumber- The next page's number, 0 if none
orderslist- The orders
pagenumber- This page's number
start_timetext- The period's start (UTC)
total_for_rangenumber- How many in the whole period
Example output
{
"count": 1,
"end_time": "2026-11-17T23:59:59Z",
"has_more": false,
"next_page": 0,
"orders": [
{
"attribution": {
"firstClick": [
{
"adId": "120200000000003",
"adsetId": "120200000000002",
"campaignId": "120200000000001",
"clickDate": "2026-11-16T09:12:00.000Z",
"source": "facebook-ads"
}
]
},
"created_at": "2026-11-17T14:03:00.000Z",
"currency": "USD",
"customer_id": 6123456789,
"journey": [
{
"event": "add2c",
"path": "/products/blue-mug",
"productId": "7123456789",
"time": "2026-11-17T13:58:00.000Z"
}
],
"order_id": 5123456789,
"order_name": "#1001",
"total_price": "84.00"
}
],
"page": 1,
"start_time": "2026-11-17T00:00:00Z",
"total_for_range": 1
}Get summary metrics
Get the shop's Summary Page metrics, such as revenue and orders, for a period of days.
Inputs
- From
start_datedateRequired - The first day of the period.
- To
end_datedateRequired - The last day of the period (the same day for one day).
- Only these metrics
metric_nameslist - Metric names to keep, such as revenue and orders. Leave empty for all.
- Hour of today
today_hournumber - For a period that includes today, the hour (1 to 25) to count up to. Defaults to 25.From 1 to 25.
Outputs
countnumber- How many metrics
end_datetext- The period's last day
metricslist- Each metric's name and value
start_datetext- The period's first day
valuesobject- Each metric's value, by its name
Example output
{
"count": 2,
"end_date": "2026-11-16",
"metrics": [
{
"metricName": "revenue",
"value": 12345.67
},
{
"metricName": "orders",
"value": 345
}
],
"start_date": "2026-11-10",
"values": {
"orders": 345,
"revenue": 12345.67
}
}Request customer data deletion
Ask Triple Whale to delete or mask what it holds on customers, found by their email addresses or phone numbers. It can't be undone.
Inputs
- Emails
emailslist - The customers' email addresses.
- Phones
phoneslist - The customers' phone numbers.
Outputs
emailslist- The email addresses sent
messagetext- Triple Whale's own reply
phoneslist- The phone numbers sent
successtrue/false- True once Triple Whale took it
Example output
{
"emails": [
"jo@example.com"
],
"message": "Request created successfully",
"phones": [],
"success": true
}Run SQL query
Run a SQL query on the shop's Triple Whale tables (orders_table, ads_table, pixel_joined_tvf and the rest) for a period, and get the rows.
Inputs
- Query
querytextRequired - The SQL, with @startDate and @endDate where the period goes. Name the columns you want rather than SELECT *.
- From
start_datedateRequired - The first day of the period.
- To
end_datedateRequired - The last day of the period (the same day for one day).
- Currency
currencytext - The currency to report amounts in, such as EUR. Defaults to the shop's.
Outputs
countnumber- How many rows
messagetext- Triple Whale's own reply
rowslist- The rows, one object per row
Example output
{
"count": 1,
"message": "The query was executed successfully.",
"rows": [
{
"channel": "facebook-ads",
"spend": 345
}
]
}Send ad figures
Send a day's spend, clicks and conversions for a campaign, ad set or ad on an ad platform Triple Whale doesn't connect to. Sending the same day and IDs again replaces them.
Inputs
- Channel
channeltextRequired - The ad platform. Pick one of Triple Whale's channels, or type your own name for one it doesn't list.
- Day
event_datedateRequired - The day the figures are for.
- Currency
currencytextRequired - The three-letter currency code the amounts are in, such as USD.
- Ad account ID
channel_account_idtext - The ad account's ID on the platform. Keep it the same on every send.
- Campaign ID
campaign_idtext - The campaign's ID on the ad platform.
- Campaign name
campaign_nametext - The campaign's name. Needed with its ID.
- Campaign status
campaign_statustext - Whether the campaign is running. Needed with its ID.One of:
ACTIVE,PAUSED. - Ad set ID
adset_idtext - The ad set's ID on the ad platform.
- Ad set name
adset_nametext - The ad set's name. Needed with its ID.
- Ad set status
adset_statustext - Whether the ad set is running. Needed with its ID.One of:
ACTIVE,PAUSED. - Ad ID
ad_idtext - The ad's ID on the ad platform.
- Ad name
ad_nametext - The ad's name. Needed with its ID.
- Ad status
ad_statustext - Whether the ad is running. Needed with its ID.One of:
ACTIVE,PAUSED. - Ad image address
ad_image_urltext - The address of the ad's thumbnail.
- Spend
spendnumber - What was spent that day.
- Impressions
impressionsnumber - How many times it was shown.
- Clicks
clicksnumber - How many clicks.
- Conversions
conversionsnumber - How many purchases.
- Conversion value
conversion_valuenumber - The revenue from those purchases.
- Visits
visitsnumber - How many visits.
- Last updated
updated_atdate and time - When the record last changed on your side.
Outputs
channeltext- The channel
event_datetext- The day
messagetext- Triple Whale's own reply
successtrue/false- True once Triple Whale took it
Example output
{
"channel": "reddit",
"event_date": "2026-11-16",
"message": "Ad record successfully received.",
"success": true
}Send customer
Send a customer from a sales platform Triple Whale doesn't connect to. Sending the same customer ID again replaces the whole record. Not for Shopify, BigCommerce or WooCommerce customers.
Inputs
- Customer ID
customer_idtextRequired - The customer's ID. Sending the same ID again replaces the customer.
- Email
email_addresstext - Their email address.
- Phone
phonetext - Their phone number.
- First name
first_nametext - Their first name.
- Last name
last_nametext - Their last name.
- Display name
display_nametext - The name to show for them.
- Created at
created_atdate and time - When they became a customer.
- Tags
customer_tagslist - Their tags.
- Amount spent
amount_spentnumber - How much they have spent in total.
- Orders
ordersnumber - How many orders they have placed.
- Last order ID
last_order_idtext - Their most recent order.
- Address line 1
address1text - Their default address.
- Address line 2
address2text - The second line of it.
- City
citytext - The address's city.
- State or province
statetext - The address's state or province.
- State code
state_codetext - Its code, such as CA.
- ZIP or postal code
zip_codetext - The address's postal code.
- Country
countrytext - The address's country.
- Country code
country_codetext - Its two-letter code, such as US.
- Note
notetext - A note on the customer.
- Status
statustext - Their status in your system.
- Tax exempt
tax_exempttrue/false - Whether they don't pay tax.
- Email marketing consent
email_marketing_consent_statustext - Their email marketing consent, such as subscribed.
- Platform
platformtext - The sales platform's name, if not custom-msp. Use the same value on orders and products so product costs apply to orders.
- Platform account ID
platform_account_idtext - The account on that platform, if not custom-msp. Use the same value on orders and products.
Outputs
customer_idtext- The customer sent
messagetext- Triple Whale's own reply
successtrue/false- True once Triple Whale took it
Example output
{
"customer_id": "cus_1001",
"message": "Customer record successfully received.",
"success": true
}Send email or SMS figures
Send a day's figures for an email, SMS or direct mail campaign or flow from a tool Triple Whale doesn't connect to. Sending the same day and IDs again replaces them.
Inputs
- Day
event_datedateRequired - The day the figures are for, in the shop's time zone.
- Currency
currencytextRequired - The three-letter currency code the amounts are in, such as USD.
- Channel
channeltext - How it was sent, such as email, sms or directmail. Defaults to directmail.
- Account ID
account_idtext - Your account's ID on the sending platform.
- Type
campaign_typetext - A one-time campaign or an automated flow. Defaults to campaign.One of:
campaign(Campaign (one-time send, default)),flow(Flow (automated series)). - Campaign ID
campaign_idtext - The campaign's ID.
- Campaign name
campaign_nametext - The campaign's name.
- Campaign status
campaign_statustext - Its status, such as sent, scheduled or draft.
- Flow step ID
flow_action_idtext - For a flow, the step's ID.
- Flow step name
flow_action_nametext - For a flow, the step's name.
- Message ID
message_idtext - The message (or A/B variant) ID.
- Message name
message_nametext - The message's name.
- Subject
message_subjecttext - The email's subject line.
- Variation
message_variationtext - The A/B variation.
- Sent
sentnumber - How many were sent.
- Delivered
deliverednumber - How many were delivered.
- Opened
openednumber - How many unique opens.
- Clicks
clicksnumber - How many clicks.
- Received
receivednumber - How many were received.
- Purchases
purchasesnumber - How many purchases it led to.
- Conversion value
conversion_valuenumber - The revenue from those purchases.
- Cost
spendnumber - What the send cost.
- Unsubscribed
unsubscribednumber - How many unsubscribed.
- Spam complaints
marked_as_spamnumber - How many marked it as spam.
- Last updated
updated_atdate and time - When the record last changed on your side.
Outputs
event_datetext- The day
messagetext- Triple Whale's own reply
successtrue/false- True once Triple Whale took it
Example output
{
"event_date": "2026-11-16",
"message": "Email/SMS record successfully received.",
"success": true
}Send offline event
Send an event that happened away from your site, such as a lead, a booked demo or a custom event, to the Triple Pixel, matched to the person by email, phone or your own ID.
Inputs
- Event
event_typetextRequired - What happened.One of:
lead,mql(Marketing qualified lead (MQL)),sql(Sales qualified lead (SQL)),opportunity,book_demo(Booked a demo),custom(Custom event). - Email
emailtext - The person's email. Give this, a phone or an external ID.
- Phone
phonetext - The person's phone number.
- External ID
external_idtext - The person's ID in your own system.
- Event name
event_nametext - For a custom event, its name, such as trial_started.
- Event ID
event_idtext - An ID of your own, so the same event sent twice counts once.
- When
occurred_atdate and time - When it happened. Defaults to now.
- Source
sourcetext - For a custom event, the channel to credit, such as facebook-ads.
- Campaign
campaigntext - For a custom event, the campaign to credit.
- Ad set
adsettext - For a custom event, the ad set to credit.
- Ad
adtext - For a custom event, the ad to credit.
- Extra properties
propertiesobject - For a custom event, more values to send with it (numbers, text or true/false), such as {"value": 10}. 3 KB at most in all.
Outputs
event_idtext- Your event ID, empty if none
event_typetext- The event type
messagetext- Triple Whale's own reply
successtrue/false- True once Triple Whale took it
Example output
{
"event_id": "",
"event_type": "lead",
"message": "Pixel event successfully received.",
"success": true
}Send order
Send an order from a sales platform Triple Whale doesn't connect to. Sending the same order ID and time again replaces the whole order, so a field left empty is cleared.
Inputs
- Order ID
order_idtextRequired - The order's ID in your sales platform. Sending the same ID and creation time again replaces the order.
- Placed at
created_atdate and timeRequired - When the order was placed. Keep it the same when you send the order again.
- Currency
currencytextRequired - The three-letter currency code the amounts are in, such as USD.
- Order revenue
order_revenuenumberRequired - The order's total after discounts, shipping, fees and taxes.
- Customer ID
customer_idtextRequired - The customer's ID in your system.
- Customer email
customer_emailtext - The customer's email address. Give this or their phone.
- Customer phone
customer_phonetext - The customer's phone number. Give this or their email.
- Customer first name
customer_first_nametext - The customer's first name.
- Customer last name
customer_last_nametext - The customer's last name.
- Order name
nametext - The order's name or number as shoppers see it, such as #1001.
- Status
statustext - The order's status, such as completed or pending.
- Line items
line_itemslist - The products bought, each with id, product_id, variant_id, price and quantity (and optionally name, product_name, variant_name, sku).
- Discount codes
discount_codeslist - Codes used, each with code, amount and type (percentage or fixed_amount).
- Total discounts
total_discountsnumber - All discounts on the order, including shipping discounts.
- Taxes
taxesnumber - The total tax on the order.
- Taxes included
taxes_includedtrue/false - Whether prices include tax.
- Shipping charged
shipping_pricenumber - What the buyer paid for shipping.
- Shipping costs
shipping_costsnumber - What shipping cost you. Used when Default Shipping Costs is chosen in Triple Whale's cost settings.
- Other expenses
custom_expensesnumber - Other costs of the order.
- Shipping address
shipping_addressobject - Where it was sent: address_1, address_2, city, zip, province_code, country and country_code.
- Refunds
refundslist - Refunds on the order, each with refund_id, refunded_at and total_refund (and optionally line_items, total_tax_refund, total_shipping_refund, tags, void).
- Tags
tagslist - Tags to mark the order with, such as holiday_sale.
- Source
source_nametext - Where the order came from, such as web or pos.
- Payment gateways
payment_gateway_nameslist - How it was paid, such as paypal or gift_card. Needed for payment fees.
- New customer
is_new_customertext - Whether this is the customer's first order. Leave empty to let Triple Whale work it out.One of:
yes(Yes, a new customer),no(No, a returning customer). - Subscription ID
subscription_idtext - The subscription the order belongs to.
- Platform
platformtext - The sales platform's name, if not custom-msp. Use the same value on orders and products so product costs apply to orders.
- Platform account ID
platform_account_idtext - The account on that platform, if not custom-msp. Use the same value on orders and products.
- Last updated
updated_atdate and time - When the record last changed on your side.
- Void order
voidtrue/false - Remove the order (and its refunds) from Triple Whale's reports. Send the whole order again with this on.
Outputs
created_attext- Its time, as sent (UTC)
messagetext- Triple Whale's own reply
order_idtext- The order sent
successtrue/false- True once Triple Whale took it
voidedtrue/false- Whether it was voided
Example output
{
"created_at": "2026-11-17T14:03:00Z",
"message": "Order record successfully received.",
"order_id": "1001",
"success": true,
"voided": false
}Send orders in bulk
Send up to 1,000 orders from a sales platform Triple Whale doesn't connect to, each as 'Send order' takes it. An order sent before is replaced.
Inputs
- Orders
orderslistRequired - The orders, each with order_id, created_at, currency, order_revenue and customer (with id and an email or phone).
Outputs
countnumber- How many orders were sent
messagetext- Triple Whale's own reply
order_idslist- The orders sent
successtrue/false- True once Triple Whale took it
Example output
{
"count": 2,
"message": "Orders successfully received.",
"order_ids": [
"1001",
"1002"
],
"success": true
}Send post-purchase survey answer
Send a customer's answer to a post-purchase survey (such as how they heard of you) for an order already in Triple Whale, to use in attribution.
Inputs
- Order ID
order_idtextRequired - The order the answer is for. It must already be in Triple Whale.
- Answer
responsetext - What the customer answered, such as Instagram.
- Question
question_texttext - The question asked, such as How did you hear about us?
- Question ID
question_idtext - The question's ID. Without it the answer is used for attribution but not shown in the survey report.
- Answer ID
response_idtext - The answer's own ID.
- Source
sourcetext - The channel to credit, such as facebook-ads. Leave empty to let Triple Whale read it from the answer.
- Use for attribution
include_in_attributiontrue/false - Count the answer in the Total Impact and Triple Attribution models.
- Order total
total_pricenumber - The order's total.
- Answered at
created_atdate and time - When the survey was answered.
- Platform
platformtext - The sales platform's name, if not custom-msp. Use the same value on orders and products so product costs apply to orders.
- Platform account ID
platform_account_idtext - The account on that platform, if not custom-msp. Use the same value on orders and products.
Outputs
messagetext- Triple Whale's own reply
order_idtext- The order
successtrue/false- True once Triple Whale took it
Example output
{
"message": "PPS record successfully received.",
"order_id": "1001",
"success": true
}Send product
Send a product from a sales platform Triple Whale doesn't connect to, with its variants, prices and costs. Sending the same product ID again replaces it.
Inputs
- Product ID
product_idtextRequired - The product's ID; the same ID as on orders' line items.
- Title
product_titletextRequired - The product's name.
- Variants
variantslist - Each with variant_id and variant_title, and optionally variant_price, variant_cost, sku, handling_fee, inventory_quantity, image_src and compare_at_price. Leave empty for a product with no variants.
- Vendor
vendortext - Who makes or supplies it.
- Type
product_typetext - The product's type or category.
- Status
product_statustext - Its status, such as active, draft or archived. Defaults to active.
- Tags
product_tagslist - The product's tags.
- Collections
collectionslist - The collections it is in.
- Images
imageslist - Each with image_id and image_src (the image's address).
- Platform
platformtext - The sales platform's name, if not custom-msp. Use the same value on orders and products so product costs apply to orders.
- Platform account ID
platform_account_idtext - The account on that platform, if not custom-msp. Use the same value on orders and products.
- Created at
created_atdate and time - When the product was created.
- Last updated
updated_atdate and time - When the record last changed on your side.
Outputs
messagetext- Triple Whale's own reply
product_idtext- The product sent
successtrue/false- True once Triple Whale took it
variant_countnumber- How many variants were sent
Example output
{
"message": "Product record successfully received.",
"product_id": "blue-mug",
"success": true,
"variant_count": 1
}Send subscription
Send a subscription from a platform Triple Whale doesn't connect to, with its items and status. Sending the same ID again replaces it.
Inputs
- Subscription ID
subscription_idtextRequired - The subscription's ID. Sending the same ID again replaces it.
- Started at
created_atdate and timeRequired - When the subscription was created.
- Currency
currencytextRequired - The three-letter currency code the amounts are in, such as USD.
- Status
statustextRequired - The subscription's status, such as active or canceled.
- Customer ID
customer_idtextRequired - The customer's ID in your system.
- Items
subscription_itemslistRequired - At least one, each with subscription_item_id, created_at, status (active, canceled, expired or deleted), interval (day, week, month or year), interval_count, price and quantity.
- Customer email
customer_emailtext - The customer's email address. Give this or their phone.
- Customer phone
customer_phonetext - The customer's phone number. Give this or their email.
- Customer first name
customer_first_nametext - The customer's first name.
- Customer last name
customer_last_nametext - The customer's last name.
- Canceled at
canceled_atdate and time - When it was canceled, if it was.
- Ended at
ended_atdate and time - When it ended, if it has.
- Cancellation reason
cancellation_reasontext - Why it was canceled.
- Cancellation comments
cancellation_commentstext - Anything else said about the cancellation.
- Notes
metadatatext - Notes to keep with the subscription.
- Platform
platformtext - The sales platform's name, if not custom-msp. Use the same value on orders and products so product costs apply to orders.
- Platform account ID
platform_account_idtext - The account on that platform, if not custom-msp. Use the same value on orders and products.
- Last updated
updated_atdate and time - When the record last changed on your side.
Outputs
messagetext- Triple Whale's own reply
subscription_idtext- The subscription sent
successtrue/false- True once Triple Whale took it
Example output
{
"message": "Subscription record successfully received.",
"subscription_id": "sub_1001",
"success": true
}Set a product's cost
Set what a product, or one of its variants, costs you, for a product from Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to.
Inputs
- Product ID
product_idtextRequired - The product's ID on that platform.
- Cost
variant_costnumberRequired - What one costs you.
- Variant ID
variant_idtext - The variant, if only one variant's cost is set.
Outputs
messagetext- Triple Whale's own reply
product_idtext- The product
successtrue/false- True once Triple Whale took it
variant_idtext- The variant, empty if none
Example output
{
"message": "Product enrichment successfully received.",
"product_id": "7123456789",
"success": true,
"variant_id": ""
}