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

ActionWhat it does
Add costs to an orderAdd 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 keyCheck the connection's API key works, with what Triple Whale says about it.
Get orders with attributionList orders placed in a period with the ad that first brought each customer and the pages they viewed before buying.
Get summary metricsGet the shop's Summary Page metrics, such as revenue and orders, for a period of days.
Request customer data deletionAsk Triple Whale to delete or mask what it holds on customers, found by their email addresses or phone numbers.
Run SQL queryRun 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 figuresSend 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 customerSend a customer from a sales platform Triple Whale doesn't connect to.
Send email or SMS figuresSend 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 eventSend 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 orderSend an order from a sales platform Triple Whale doesn't connect to.
Send orders in bulkSend 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 answerSend 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 productSend a product from a sales platform Triple Whale doesn't connect to, with its variants, prices and costs.
Send subscriptionSend a subscription from a platform Triple Whale doesn't connect to, with its items and status.
Set a product's costSet 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 IDorder_idtextRequired
The order's ID in Shopify, BigCommerce, WooCommerce or another platform Triple Whale connects to.
Platformplatformtext
The platform the order is from. Needed for a second sales platform such as Amazon; leave empty for your main one.
Shipping costsshipping_costsnumber
What shipping cost you. Used when Default Shipping Costs is chosen in Triple Whale's cost settings.
Other expensescustom_expensesnumber
Other costs of the order.
Gross salescustom_gross_salesnumber
Your own gross sales figure.
Gross profitcustom_gross_profitnumber
Your own gross profit figure.
Net revenuecustom_net_revenuenumber
Your own net revenue figure.
Itemstotal_items_quantitynumber
How many items are in the order.
Count as an orderorders_quantitytext
Whether this order counts toward order totals.One of: 1 (Count it (1)), 0 (Don't count it (0)).
Ignore orderignore_ordertrue/false
Leave the order out of reports, such as a test order.
Custom statuscustom_statustext
A status of your own to filter by.
Custom numbercustom_numbernumber
A number of your own.
Custom textcustom_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

Fromstart_timedate and timeRequired
The start of the period.
Toend_timedate and timeRequired
The end of the period.
Pagepagenumber
Which page, from 1. Defaults to the first.At least 1.
Page sizepage_sizenumber
How many orders per page, 1 to 100. Defaults to 50.From 1 to 100.
Leave out journeysexclude_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

Fromstart_datedateRequired
The first day of the period.
Toend_datedateRequired
The last day of the period (the same day for one day).
Only these metricsmetric_nameslist
Metric names to keep, such as revenue and orders. Leave empty for all.
Hour of todaytoday_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

Emailsemailslist
The customers' email addresses.
Phonesphoneslist
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

QueryquerytextRequired
The SQL, with @startDate and @endDate where the period goes. Name the columns you want rather than SELECT *.
Fromstart_datedateRequired
The first day of the period.
Toend_datedateRequired
The last day of the period (the same day for one day).
Currencycurrencytext
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

ChannelchanneltextRequired
The ad platform. Pick one of Triple Whale's channels, or type your own name for one it doesn't list.
Dayevent_datedateRequired
The day the figures are for.
CurrencycurrencytextRequired
The three-letter currency code the amounts are in, such as USD.
Ad account IDchannel_account_idtext
The ad account's ID on the platform. Keep it the same on every send.
Campaign IDcampaign_idtext
The campaign's ID on the ad platform.
Campaign namecampaign_nametext
The campaign's name. Needed with its ID.
Campaign statuscampaign_statustext
Whether the campaign is running. Needed with its ID.One of: ACTIVE, PAUSED.
Ad set IDadset_idtext
The ad set's ID on the ad platform.
Ad set nameadset_nametext
The ad set's name. Needed with its ID.
Ad set statusadset_statustext
Whether the ad set is running. Needed with its ID.One of: ACTIVE, PAUSED.
Ad IDad_idtext
The ad's ID on the ad platform.
Ad namead_nametext
The ad's name. Needed with its ID.
Ad statusad_statustext
Whether the ad is running. Needed with its ID.One of: ACTIVE, PAUSED.
Ad image addressad_image_urltext
The address of the ad's thumbnail.
Spendspendnumber
What was spent that day.
Impressionsimpressionsnumber
How many times it was shown.
Clicksclicksnumber
How many clicks.
Conversionsconversionsnumber
How many purchases.
Conversion valueconversion_valuenumber
The revenue from those purchases.
Visitsvisitsnumber
How many visits.
Last updatedupdated_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 IDcustomer_idtextRequired
The customer's ID. Sending the same ID again replaces the customer.
Emailemail_addresstext
Their email address.
Phonephonetext
Their phone number.
First namefirst_nametext
Their first name.
Last namelast_nametext
Their last name.
Display namedisplay_nametext
The name to show for them.
Created atcreated_atdate and time
When they became a customer.
Tagscustomer_tagslist
Their tags.
Amount spentamount_spentnumber
How much they have spent in total.
Ordersordersnumber
How many orders they have placed.
Last order IDlast_order_idtext
Their most recent order.
Address line 1address1text
Their default address.
Address line 2address2text
The second line of it.
Citycitytext
The address's city.
State or provincestatetext
The address's state or province.
State codestate_codetext
Its code, such as CA.
ZIP or postal codezip_codetext
The address's postal code.
Countrycountrytext
The address's country.
Country codecountry_codetext
Its two-letter code, such as US.
Notenotetext
A note on the customer.
Statusstatustext
Their status in your system.
Tax exempttax_exempttrue/false
Whether they don't pay tax.
Email marketing consentemail_marketing_consent_statustext
Their email marketing consent, such as subscribed.
Platformplatformtext
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 IDplatform_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

Dayevent_datedateRequired
The day the figures are for, in the shop's time zone.
CurrencycurrencytextRequired
The three-letter currency code the amounts are in, such as USD.
Channelchanneltext
How it was sent, such as email, sms or directmail. Defaults to directmail.
Account IDaccount_idtext
Your account's ID on the sending platform.
Typecampaign_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 IDcampaign_idtext
The campaign's ID.
Campaign namecampaign_nametext
The campaign's name.
Campaign statuscampaign_statustext
Its status, such as sent, scheduled or draft.
Flow step IDflow_action_idtext
For a flow, the step's ID.
Flow step nameflow_action_nametext
For a flow, the step's name.
Message IDmessage_idtext
The message (or A/B variant) ID.
Message namemessage_nametext
The message's name.
Subjectmessage_subjecttext
The email's subject line.
Variationmessage_variationtext
The A/B variation.
Sentsentnumber
How many were sent.
Delivereddeliverednumber
How many were delivered.
Openedopenednumber
How many unique opens.
Clicksclicksnumber
How many clicks.
Receivedreceivednumber
How many were received.
Purchasespurchasesnumber
How many purchases it led to.
Conversion valueconversion_valuenumber
The revenue from those purchases.
Costspendnumber
What the send cost.
Unsubscribedunsubscribednumber
How many unsubscribed.
Spam complaintsmarked_as_spamnumber
How many marked it as spam.
Last updatedupdated_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

Eventevent_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).
Emailemailtext
The person's email. Give this, a phone or an external ID.
Phonephonetext
The person's phone number.
External IDexternal_idtext
The person's ID in your own system.
Event nameevent_nametext
For a custom event, its name, such as trial_started.
Event IDevent_idtext
An ID of your own, so the same event sent twice counts once.
Whenoccurred_atdate and time
When it happened. Defaults to now.
Sourcesourcetext
For a custom event, the channel to credit, such as facebook-ads.
Campaigncampaigntext
For a custom event, the campaign to credit.
Ad setadsettext
For a custom event, the ad set to credit.
Adadtext
For a custom event, the ad to credit.
Extra propertiespropertiesobject
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 IDorder_idtextRequired
The order's ID in your sales platform. Sending the same ID and creation time again replaces the order.
Placed atcreated_atdate and timeRequired
When the order was placed. Keep it the same when you send the order again.
CurrencycurrencytextRequired
The three-letter currency code the amounts are in, such as USD.
Order revenueorder_revenuenumberRequired
The order's total after discounts, shipping, fees and taxes.
Customer IDcustomer_idtextRequired
The customer's ID in your system.
Customer emailcustomer_emailtext
The customer's email address. Give this or their phone.
Customer phonecustomer_phonetext
The customer's phone number. Give this or their email.
Customer first namecustomer_first_nametext
The customer's first name.
Customer last namecustomer_last_nametext
The customer's last name.
Order namenametext
The order's name or number as shoppers see it, such as #1001.
Statusstatustext
The order's status, such as completed or pending.
Line itemsline_itemslist
The products bought, each with id, product_id, variant_id, price and quantity (and optionally name, product_name, variant_name, sku).
Discount codesdiscount_codeslist
Codes used, each with code, amount and type (percentage or fixed_amount).
Total discountstotal_discountsnumber
All discounts on the order, including shipping discounts.
Taxestaxesnumber
The total tax on the order.
Taxes includedtaxes_includedtrue/false
Whether prices include tax.
Shipping chargedshipping_pricenumber
What the buyer paid for shipping.
Shipping costsshipping_costsnumber
What shipping cost you. Used when Default Shipping Costs is chosen in Triple Whale's cost settings.
Other expensescustom_expensesnumber
Other costs of the order.
Shipping addressshipping_addressobject
Where it was sent: address_1, address_2, city, zip, province_code, country and country_code.
Refundsrefundslist
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).
Tagstagslist
Tags to mark the order with, such as holiday_sale.
Sourcesource_nametext
Where the order came from, such as web or pos.
Payment gatewayspayment_gateway_nameslist
How it was paid, such as paypal or gift_card. Needed for payment fees.
New customeris_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 IDsubscription_idtext
The subscription the order belongs to.
Platformplatformtext
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 IDplatform_account_idtext
The account on that platform, if not custom-msp. Use the same value on orders and products.
Last updatedupdated_atdate and time
When the record last changed on your side.
Void ordervoidtrue/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

OrdersorderslistRequired
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 IDorder_idtextRequired
The order the answer is for. It must already be in Triple Whale.
Answerresponsetext
What the customer answered, such as Instagram.
Questionquestion_texttext
The question asked, such as How did you hear about us?
Question IDquestion_idtext
The question's ID. Without it the answer is used for attribution but not shown in the survey report.
Answer IDresponse_idtext
The answer's own ID.
Sourcesourcetext
The channel to credit, such as facebook-ads. Leave empty to let Triple Whale read it from the answer.
Use for attributioninclude_in_attributiontrue/false
Count the answer in the Total Impact and Triple Attribution models.
Order totaltotal_pricenumber
The order's total.
Answered atcreated_atdate and time
When the survey was answered.
Platformplatformtext
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 IDplatform_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 IDproduct_idtextRequired
The product's ID; the same ID as on orders' line items.
Titleproduct_titletextRequired
The product's name.
Variantsvariantslist
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.
Vendorvendortext
Who makes or supplies it.
Typeproduct_typetext
The product's type or category.
Statusproduct_statustext
Its status, such as active, draft or archived. Defaults to active.
Tagsproduct_tagslist
The product's tags.
Collectionscollectionslist
The collections it is in.
Imagesimageslist
Each with image_id and image_src (the image's address).
Platformplatformtext
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 IDplatform_account_idtext
The account on that platform, if not custom-msp. Use the same value on orders and products.
Created atcreated_atdate and time
When the product was created.
Last updatedupdated_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 IDsubscription_idtextRequired
The subscription's ID. Sending the same ID again replaces it.
Started atcreated_atdate and timeRequired
When the subscription was created.
CurrencycurrencytextRequired
The three-letter currency code the amounts are in, such as USD.
StatusstatustextRequired
The subscription's status, such as active or canceled.
Customer IDcustomer_idtextRequired
The customer's ID in your system.
Itemssubscription_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 emailcustomer_emailtext
The customer's email address. Give this or their phone.
Customer phonecustomer_phonetext
The customer's phone number. Give this or their email.
Customer first namecustomer_first_nametext
The customer's first name.
Customer last namecustomer_last_nametext
The customer's last name.
Canceled atcanceled_atdate and time
When it was canceled, if it was.
Ended atended_atdate and time
When it ended, if it has.
Cancellation reasoncancellation_reasontext
Why it was canceled.
Cancellation commentscancellation_commentstext
Anything else said about the cancellation.
Notesmetadatatext
Notes to keep with the subscription.
Platformplatformtext
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 IDplatform_account_idtext
The account on that platform, if not custom-msp. Use the same value on orders and products.
Last updatedupdated_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 IDproduct_idtextRequired
The product's ID on that platform.
Costvariant_costnumberRequired
What one costs you.
Variant IDvariant_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": ""
}

On this page