aitrillion_create_email_template
ChatGPTCreate a reusable email template. Title, subject, and HTML body are ALL required and must be non-empty — never create a template with a blank subject or empty body. YOU (the assistant) author the HTML body. Call aitrillion_list_email_shortcodes first and personalize with the returned {{merge tags}} (e.g. {{first_name}}); ALWAYS include {{unsubscribe_content}} somewhere in the HTML. For links/buttons that point to the store, use the store_url value returned by aitrillion_list_email_shortcodes DIRECTLY as the href (it is a ready-made https:// URL) — e.g. href="<store_url>". Do NOT use {{front_shop_url}} in links: it is EMPTY unless the store has a custom storefront domain configured, and an empty value renders as a broken "http://?utm_source=..." link. ({{domain}} with an https:// prefix also works, but store_url is safest.) For the store LOGO, only add an <img> if aitrillion_list_email_shortcodes returned {{shop_logo_url}}, and use it as the source: <img src="{{shop_logo_url}}" alt="logo"> — never put {{shop_logo}} in src (that tag is a full <a><img></a> block, not a URL, and will break the image); if {{shop_logo_url}} is not listed, omit the logo image entirely. Only ever use tokens that aitrillion_list_email_shortcodes actually returns; never invent tokens or place a token inside src=""/href="" except {{shop_logo_url}} (for the logo) and {{domain}} (with an https:// prefix) — for store links prefer the ready-made store_url. For DYNAMIC product/coupon blocks (new arrivals, trending, a Shopify collection's products, or a coupon), put a {{ait_block:<id>}} token in the HTML where each block should appear and then describe them in aitrillion_send_campaign's blocks. For a discount/coupon, NEVER write a literal code (e.g. "SAVE10") into the HTML — a made-up code is rejected at checkout; instead get a real coupon_rule_id from aitrillion_list_email_coupons and add a coupon block, and the working code is generated per recipient at send time. If no coupon rule exists, omit the discount. Returns a template_id to use in the send tools. This does NOT send anything.
aitrillion_get_all_products_average_rating
ChatGPTGet the average review rating across all products.
aitrillion_get_customer
ChatGPTGet a single customer by id.
aitrillion_get_customer_activity_log
ChatGPTGet the loyalty points earn/redeem activity log.
aitrillion_get_customer_fields
ChatGPTList the available customer fields/attributes.
aitrillion_get_customer_loyalty_details
ChatGPTGet a customer's loyalty details — total/available/redeemed points, lifetime points and tier — by their Shopify customer_id.
aitrillion_get_customer_membership_status
ChatGPTCheck whether a customer has an active membership (by Shopify customer_id).
aitrillion_get_customer_unused_rewards
ChatGPTList a customer's unused reward / discount codes by their Shopify customer_id.
aitrillion_get_discount_detail
ChatGPTLook up details of a loyalty discount/reward code.
aitrillion_get_dkim_status
ChatGPTCheck whether the store's email sending domain is DKIM-verified (required before sending). Returns dkim_verified (true/false), can_send, the default verified sender, and the list of sending domains with each one's verification status.
aitrillion_get_email_campaign_stats
ChatGPTGet one email campaign's results: sent, delivered, opened, clicked, orders and revenue.
aitrillion_get_email_campaign_summary
ChatGPTOne-shot breakdown of the store's email campaign counts, split into three groups: regular (the dashboard 'Campaigns' page), api (the 'Email sent log (API)' page — AI/direct sends), and combined (both). Each group has sent / draft / scheduled / pending / failed / total (matching the dashboard's tabs). Use this to answer 'how many campaigns / how many API emails have been sent' in a single call — the numbers match the merchant's dashboard exactly.
aitrillion_get_email_list
ChatGPTGet a single email list by id.
aitrillion_get_email_list_customers
ChatGPTList the customers in an email list (by list id).
aitrillion_get_email_segment
ChatGPTFetch ONE customer segment's full details by id — name, description, type, default flag, and created/updated dates.
aitrillion_get_email_template
ChatGPTFetch one saved email template's subject and HTML content by id.
aitrillion_get_loyalty_program
ChatGPTGet the storefront loyalty program (ways to earn/redeem, tiers). Pass a customer_id for the logged-in view, or omit for the public program.
aitrillion_get_membership_detail
ChatGPTGet details of a single membership by its contract id.
aitrillion_get_membership_language
ChatGPTGet the storefront membership language/label settings.
aitrillion_get_order
ChatGPTGet a single order by id.
aitrillion_get_order_insights
ChatGPTOrder insights / analytics — orders enriched with loyalty points, tier and customer data. Best tool for sales/revenue reporting. Also exposes each order's source_customer_id (the Shopify customer id).
aitrillion_get_product_average_rating
ChatGPTGet the average rating for a single product.
aitrillion_get_product_recommendations
ChatGPTGet product recommendations (new_arrival, trending, recent_view, related_product, based_on_past_purchases, etc.).
aitrillion_get_product_review
ChatGPTGet a single product review by id.
aitrillion_get_reports
ChatGPTStore overview / summary metrics in a single call — includes the TOTAL number of customers (total_customers), geo distribution, and other aggregate figures. USE THIS for questions like 'how many customers do I have?' or 'give me a store overview' — it returns totals directly, so you never need to page through aitrillion_list_customers to count.
aitrillion_get_review_settings
ChatGPTGet the storefront review language & general settings.
aitrillion_get_site_review
ChatGPTGet a single site/store review by id.
aitrillion_get_storefront_product_reviews
ChatGPTStorefront/public product reviews for one or more products, as shoppers see them. For the merchant/admin review list (all statuses), use aitrillion_list_product_reviews.
aitrillion_get_whatsapp_template
ChatGPTGet a single WhatsApp template by id.
aitrillion_list_collection_products
ChatGPTList the LIVE products in a Shopify collection — the exact products (title, price, compare-at price, image, product URL) that would render in a 'collection_product' email block, fetched live from Shopify. USE THIS to answer 'how many products are in the X collection?' or 'what's in my Home page collection?' — the returned count is the number of products fetched. Pass collection_id = the collection's handle (e.g. "frontpage") or its id from aitrillion_list_collections (numeric ids are resolved automatically); optional count (default 10, max 50). Note: AiTrillion's stored collection product_count is not reliable — always use THIS tool for accurate collection product data.
aitrillion_list_collections
ChatGPTList the store's product COLLECTIONS (id, title, handle). When adding a 'collection_product' block to an email via aitrillion_send_campaign / aitrillion_send_direct_email, pass the collection's handle (e.g. "frontpage") as the block's collection_id — the numeric id also works and is resolved automatically.
aitrillion_list_customer_memberships
ChatGPTList a customer's memberships (by Shopify customer_id).
aitrillion_list_customers
ChatGPTList INDIVIDUAL customer records with filters (email, spend, orders count, marketing status, dates). Returns one page at a time (paginated) — do NOT use this to count total customers; for the total customer count or a store overview use aitrillion_get_reports instead. Each result's source_customer_id is the Shopify customer id — pass it to the storefront (front) customer tools like aitrillion_get_customer_loyalty_details.
aitrillion_list_earning_rules
ChatGPTList the rules by which customers earn loyalty points.
aitrillion_list_email_campaigns
ChatGPTList email campaigns with headline counts — these MATCH the merchant's dashboard 'Campaigns' page exactly. By default (source='regular') API/AI-sent campaigns are EXCLUDED (they appear under source='api', shown in the store's 'Email sent log (API)' view). Use source='api' for AI/direct sends only, or source='all' for both. So a plain 'how many sent campaigns' returns the same number the merchant sees on their dashboard. Use aitrillion_get_email_campaign_stats for one campaign's full results.
aitrillion_list_email_coupons
ChatGPTList ALL of the store's active discount rules — the same set shown on the dashboard's 'Discount codes' page (both real-time and bulk). Each item has: coupon_rule_id, name (the rule's label — NOT a usable checkout code), discount_type/amount, available_codes/total_codes, and — importantly — type ('realtime' or 'bulk') and usable_in_email_block. ONLY rules with usable_in_email_block=true (type='realtime') can be placed in an email coupon block: put a {{ait_block:<id>}} token in the template HTML and pass { id:'<id>', type:'coupon', coupon_rule_id:<coupon_rule_id> } to aitrillion_send_campaign, and a unique checkout-valid code is generated per recipient at send time. type='bulk' rules are shown for reference but CANNOT go in an email coupon block and their codes must not be hardcoded into a mass email (each is single-use). NEVER type a made-up discount code into the HTML.
aitrillion_list_email_lists
ChatGPTList email marketing lists.
aitrillion_list_email_segments
ChatGPTList selectable customer SEGMENTS for targeting an email campaign. Each item has id, title, description, is_default (true for built-in segments), and created/updated dates. Returns a total count. Built-in (default) segments come first, then the merchant's custom ones. Pass the type filter ('default' or 'custom') to narrow, or search to filter by name. For plain lists, use aitrillion_list_email_lists instead.
aitrillion_list_email_shortcodes
ChatGPTList the {{merge tags}} you can put in email subject/HTML for personalization (e.g. {{first_name}}, {{shop_name}}, loyalty points, this shop's custom fields, and the required {{unsubscribe_content}}). If the store has a logo, the list also includes {{shop_logo_url}} — the logo's image URL to use as <img src="{{shop_logo_url}}">. It also returns store_url — the store's ready-made https:// URL to use DIRECTLY as the href for any Shop-Now/store button (do NOT use {{front_shop_url}} for links; it is empty unless a custom storefront is configured and breaks the link). Call this BEFORE writing template/email HTML so you only use tokens that actually get replaced at send time.
aitrillion_list_email_templates
ChatGPTList email templates available to the merchant (id, title, subject, type). Each has a type: 'custom' = the merchant's own dashboard templates, 'prebuilt' = AiTrillion's ready-made template library, 'api' = templates created via this connector. Returns a total count. By default returns the merchant's own + pre-built templates; pass type='prebuilt' to count/list only the ready-made ones, or type='custom'/'api' to narrow. Use before aitrillion_send_campaign / aitrillion_send_direct_email to reference a template by id.
aitrillion_list_loyalty_customers
ChatGPTList LOYALTY program members with their points, tier and rewards. Use this for loyalty/points questions. For the store's full customer list (not just loyalty), use aitrillion_list_customers instead. Supports filters and pagination (page_info cursor).
aitrillion_list_membership_plans
ChatGPTList the store's active membership plans.
aitrillion_list_new_arrival_products
ChatGPTList new-arrival products.
aitrillion_list_orders
ChatGPTList orders with filters (status, customer, order number, price, dates). Supports pagination.
aitrillion_list_product_reviews
ChatGPTMerchant/admin view of product reviews — all statuses (pending, approved…), with filters (product, rating, status, verified). For the public reviews a shopper sees on the storefront, use aitrillion_get_storefront_product_reviews.
aitrillion_list_question_answers
ChatGPTList product questions & answers with filters (product, status).
aitrillion_list_recently_viewed_products
ChatGPTList a customer's recently viewed products.
aitrillion_list_site_reviews
ChatGPTList site/store reviews with filters (rating, status, verified).
aitrillion_list_trending_products
ChatGPTList trending products.
aitrillion_list_whatsapp_templates
ChatGPTList WhatsApp message templates with filters (status, category, type).
aitrillion_send_campaign
ChatGPTSend an email campaign to an existing list and/or segment using a saved template. SAFETY: call FIRST without confirm to preview the recipient count and sender — nothing is sent. Then call again with confirm:true to send now. Provide at least one of include_lists / include_segments. DYNAMIC BLOCKS: to include live product blocks (new arrivals, trending, or a specific Shopify collection's products) or a coupon, put a {{ait_block:<id>}} token in the template's HTML where each block should appear, then describe each in blocks. The store fills them with live products/coupon at send time (same as the dashboard). For a collection block, get the collection_id from aitrillion_list_collections. For a coupon block, get a valid coupon_rule_id from aitrillion_list_email_coupons — never invent a discount code; a unique checkout-valid code is generated per recipient at send time. HELD SENDS: if the response has a non-null review_status (status 'pending_approval'), the campaign was NOT delivered — it is held for AiTrillion review (new stores need a one-time approval before sending to more than one recipient) or a plan/sending limit. ALWAYS relay review_status.message to the user verbatim (it explains why it's pending and how to get it sent — e.g. contact support@aitrillion.com); this appears on both the preview and the actual send.
aitrillion_send_direct_email
ChatGPTSend an email to specific people (new OR existing customers) without a list. SAFETY: call FIRST without confirm to get a preview — nothing is sent. The preview returns recipients_total, recipients_new/existing, and crucially recipients_deliverable vs recipients_suppressed (+suppressed_reasons) — recipients who are unsubscribed / bounced / spam-complained / inactive are skipped. If recipients_deliverable is 0 the send is BLOCKED (returns a 'no deliverable recipients' error), so surface that to the user. Show the preview, then call again with confirm:true to actually send. Provide either template_id OR (subject + html). For a DISCOUNT/coupon or product block, put a {{ait_block:<id>}} token in the HTML and describe it in blocks (same as aitrillion_send_campaign) — a raw {{ait_block:...}} token is rejected if you forget the blocks entry. Max 1000 recipients. HELD SENDS: if the response has a non-null review_status (status 'pending_approval'), the send was NOT delivered — it is held for AiTrillion review or a plan/sending limit. ALWAYS relay review_status.message to the user verbatim (it explains why it's pending and how to get it sent — e.g. contact support@aitrillion.com); this appears on both the preview (a heads-up it will be held) and the actual send.
aitrillion_get_all_products_average_rating
Claudeaitrillion_get_customer
Claudeaitrillion_get_customer_activity_log
Claudeaitrillion_get_customer_fields
Claudeaitrillion_get_customer_loyalty_details
Claudeaitrillion_get_customer_membership_status
Claudeaitrillion_get_customer_unused_rewards
Claudeaitrillion_get_discount_detail
Claudeaitrillion_get_email_list
Claudeaitrillion_get_email_list_customers
Claudeaitrillion_get_loyalty_program
Claudeaitrillion_get_membership_detail
Claudeaitrillion_get_membership_language
Claudeaitrillion_get_order
Claudeaitrillion_get_order_insights
Claudeaitrillion_get_product_average_rating
Claudeaitrillion_get_product_recommendations
Claudeaitrillion_get_product_review
Claudeaitrillion_get_reports
Claudeaitrillion_get_review_settings
Claudeaitrillion_get_site_review
Claudeaitrillion_get_storefront_product_reviews
Claudeaitrillion_get_whatsapp_template
Claudeaitrillion_list_customer_memberships
Claudeaitrillion_list_customers
Claudeaitrillion_list_earning_rules
Claudeaitrillion_list_email_lists
Claudeaitrillion_list_loyalty_customers
Claudeaitrillion_list_membership_plans
Claudeaitrillion_list_new_arrival_products
Claudeaitrillion_list_orders
Claudeaitrillion_list_product_reviews
Claudeaitrillion_list_question_answers
Claudeaitrillion_list_recently_viewed_products
Claudeaitrillion_list_site_reviews
Claudeaitrillion_list_trending_products
Claudeaitrillion_list_whatsapp_templates
Claude