Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.colossal.sh/llms.txt

Use this file to discover all available pages before exploring further.

The Colossal app emits events when things happen in your project: orders placed, items added to cart, payments processed. These events trigger agents and are available through the HTTP request action for forwarding to external systems. Each event follows a consistent envelope format:
{
  "signal_type": "ORDER_CREATED",
  "org_id": 1,
  "project_id": 42,
  "entity_id": "123",
  "entity_type": "order",
  "payload": { ... },
  "correlation_id": "abc-123",
  "source": "user",
  "timestamp": "2025-01-01T12:00:00Z"
}
FieldTypeDescription
signal_typestringThe event type identifier
org_idintegerOrganization ID
project_idintegerProject ID
entity_idstringPrimary entity identifier
entity_typestringType of entity (e.g. "order", "cart", "product")
payloadobjectEvent-specific payload (see below)
correlation_idstring | nullOptional trace/correlation ID
sourcestringOne of "user", "workflow", or "system"
timestampstringISO 8601 UTC timestamp

Common Types

These types are reused across multiple event payloads.

Customer

FieldTypeDescription
uidstringUnique customer identifier
emailstringCustomer email address
first_namestringFirst name
last_namestringLast name

LineItem

FieldTypeDescription
uidstringUnique line item identifier
namestringProduct name
skustringProduct SKU
pricenumberUnit price
quantityintegerQuantity ordered
categorystringProduct category

CartItemData

FieldTypeDescription
product_uidstringProduct identifier
product_namestringProduct name
quantityintegerQuantity in cart
unit_pricenumberPrice per unit
line_totalnumberTotal for this line

Address

FieldTypeDescription
line1stringStreet address
line2string?Apartment, suite, etc.
citystringCity
statestring?State or province
postal_codestringPostal/ZIP code
countrystringCountry code

Order events

ORDER_CREATED — Cart converted into an order during checkout, before payment.
FieldTypeDescription
order_uidstringUnique order identifier
total_pricenumberOrder total
total_amountnumberOrder total
customerCustomerCustomer details
line_itemsLineItem[]Items in the order
ORDER_CONFIRMED — Payment processed successfully, before fulfillment.
FieldTypeDescription
order_uidstringUnique order identifier
total_pricenumberOrder total before tax
total_amountnumberOrder total including tax
subtotal_amountnumberSubtotal before tax
taxnumberTax amount
customerCustomerCustomer details
line_itemsLineItem[]Items in the order
has_subscriptionbooleanWhether order contains a subscription
ORDER_COMPLETED — Order fully complete. Payment processed and fulfillment finished.
FieldTypeDescription
order_uidstringUnique order identifier
total_pricenumberOrder total before tax
total_amountnumberOrder total including tax
subtotal_amountnumberSubtotal before tax
taxnumberTax amount
customerCustomerCustomer details
line_itemsLineItem[]Items in the order
has_subscriptionbooleanWhether order contains a subscription
fulfillment_methodstringFulfillment method (e.g., digital)
CUSTOMER_CREATED — New customer account created.
FieldTypeDescription
customer_uidstringUnique customer identifier
emailstringCustomer email address
full_namestringCustomer full name
CUSTOMER_UPDATED — Customer details updated.
FieldTypeDescription
customer_uidstringUnique customer identifier
emailstringCustomer email address
full_namestringCustomer full name
changed_fieldsstring[]List of fields that changed
CART_CREATED — New shopping cart initialized.
FieldTypeDescription
cart_uidstringUnique cart identifier
CART_ITEM_ADDED — Item added to a cart.
FieldTypeDescription
cart_uidstringUnique cart identifier
itemCartItemDataAdded item details
cart_item_countintegerTotal items in cart
cart_subtotalnumberCart subtotal
CART_ITEM_UPDATED — Cart item quantity changed.
FieldTypeDescription
cart_uidstringUnique cart identifier
itemCartItemDataUpdated item details
previous_quantityintegerPrevious quantity
cart_item_countintegerTotal items in cart
cart_subtotalnumberCart subtotal
CART_ITEM_REMOVED — Item removed from a cart.
FieldTypeDescription
cart_uidstringUnique cart identifier
removed_itemCartItemDataRemoved item details
cart_item_countintegerTotal items in cart
cart_subtotalnumberCart subtotal
CHECKOUT_STARTED — Checkout session initiated.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
cart_uidstring?Cart identifier (if from cart)
order_uidstring?Order identifier
total_amountnumberCheckout total
item_countintegerNumber of items
customer_emailstring?Customer email
CHECKOUT_ADDRESS_SET — Billing address provided during checkout.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
order_uidstring?Order identifier
total_amountnumberCheckout total
customer_emailstring?Customer email
billing_addressAddressBilling address
CHECKOUT_PAYMENT_SELECTED — Payment provider selected during checkout.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
order_uidstring?Order identifier
total_amountnumberCheckout total
customer_emailstring?Customer email
payment_providerstringSelected payment provider
previous_providerstring?Previously selected provider
CHECKOUT_COMPLETED — Checkout completed successfully.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
order_uidstring?Order identifier
total_amountnumberCheckout total
customer_emailstring?Customer email
payment_providerstring?Payment provider used
CHECKOUT_PAYMENT_FAILED — Payment failed during checkout.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
order_uidstring?Order identifier
total_amountnumberCheckout total
customer_emailstring?Customer email
payment_providerstring?Payment provider used
error_codestring?Error code
error_messagestring?Error message
CHECKOUT_VALIDATE_DISCOUNT_CODE — Customer submitted a discount code at checkout. Synchronous return trigger — workflow must produce a DiscountValidationResult. See trigger modes.
FieldTypeDescription
checkout_uidstringUnique checkout session identifier
order_uidstring?Order identifier
discount_codestringThe code the customer entered
subtotal_amountnumberOrder subtotal in dollars (used to compute percentage discounts)
currencystringCurrency code
customer_emailstring?Customer email (for per-customer limits)
Required workflow output:
FieldTypeDescription
validbooleanWhether the code is accepted
codestringEcho of the submitted code
discount_type"fixed_amount" | "percentage"How the discount is calculated
amount_minorinteger?Discount in cents (required when discount_type=fixed_amount)
percentage_offinteger?Whole-number percent off (required when discount_type=percentage, 0-100)
labelstring?Human-readable label shown at checkout
max_usesinteger?Cap on total redemptions (null = unlimited)
INVOICE_CREATED — New invoice created.
FieldTypeDescription
invoice_uidstringUnique invoice identifier
invoice_numberstring?Human-readable invoice number
customer_uidstring?Customer identifier
order_uidstring?Associated order identifier
currencystringCurrency code (e.g., USD)
subtotalintegerSubtotal in cents
taxintegerTax in cents
totalintegerTotal in cents
statusstringInvoice status
sourcestringInvoice source (e.g., order)
INVOICE_PAID — Invoice paid.
FieldTypeDescription
invoice_uidstringUnique invoice identifier
invoice_numberstring?Human-readable invoice number
customer_uidstring?Customer identifier
order_uidstring?Associated order identifier
currencystringCurrency code
totalintegerTotal paid in cents
PAYMENT_SUCCEEDED — Payment completed successfully.
FieldTypeDescription
payment_uidstringUnique payment identifier
invoice_uidstringAssociated invoice identifier
amountintegerAmount in cents
currencystringCurrency code
payment_providerstringPayment provider (e.g., stripe)
payment_methodstring?Payment method (e.g., card)
card_brandstring?Card brand (e.g., visa)
card_last4string?Last 4 digits of card
transaction_idstring?Provider transaction ID
PAYMENT_FAILED — Payment failed.
FieldTypeDescription
payment_uidstringUnique payment identifier
invoice_uidstringAssociated invoice identifier
amountintegerAmount in cents
currencystringCurrency code
payment_providerstringPayment provider
payment_methodstring?Payment method
failure_codestring?Failure code
failure_messagestring?Failure message
decline_codestring?Decline code from provider
PRODUCT_CREATED — New product created.
FieldTypeDescription
uidstringUnique product identifier
namestringProduct name
handlestringURL-friendly handle
descriptionstring?Product description
variant_propertiesobject?Variant property definitions
PRODUCT_UPDATED — Product details modified.
FieldTypeDescription
uidstringUnique product identifier
namestringProduct name
handlestringURL-friendly handle
descriptionstring?Product description
variant_propertiesobject?Variant property definitions
is_archivedbooleanWhether product is archived
changed_fieldsstring[]List of fields that changed
PRODUCT_PUBLISHED — Product made visible in the storefront.
FieldTypeDescription
uidstringUnique product identifier
namestringProduct name
PRODUCT_DRAFT_DISCARDED — Product draft discarded.
FieldTypeDescription
uidstringUnique product identifier
PRODUCT_ARCHIVED — Product archived.
FieldTypeDescription
uidstringUnique product identifier
PRODUCT_UNARCHIVED — Product restored from archive.
FieldTypeDescription
uidstringUnique product identifier
PRODUCT_VARIANT_CREATED — New variant added to a product.
FieldTypeDescription
uidstringUnique variant identifier
product_uidstringParent product identifier
namestring?Variant name
propertiesobject?Variant properties (e.g., {"tier": "pro"})
inventory_countinteger?Inventory count
PRODUCT_VARIANT_UPDATED — Variant details changed.
FieldTypeDescription
uidstringUnique variant identifier
product_uidstringParent product identifier
namestring?Variant name
propertiesobject?Variant properties
inventory_countinteger?Inventory count
is_archivedbooleanWhether variant is archived
changed_fieldsstring[]List of fields that changed
PRODUCT_VARIANT_DELETED — Variant removed from a product.
FieldTypeDescription
uidstringUnique variant identifier
product_uidstringParent product identifier
PRODUCT_PRICE_CREATED — Price tier added to a variant.
FieldTypeDescription
uidstringUnique price identifier
variant_uidstringParent variant identifier
namestring?Price name (e.g., Monthly)
priceobjectPrice details ({amount, type})
currencystringCurrency code
recurring_intervalstring?Billing interval (e.g., month)
trial_durationstring?Trial period (e.g., 14d)
is_defaultbooleanWhether this is the default price
PRODUCT_PRICE_UPDATED — Price tier changed.
FieldTypeDescription
uidstringUnique price identifier
variant_uidstringParent variant identifier
namestring?Price name
priceobjectPrice details
currencystringCurrency code
recurring_intervalstring?Billing interval
trial_durationstring?Trial period
is_defaultbooleanWhether this is the default price
changed_fieldsstring[]List of fields that changed
PRODUCT_PRICE_DELETED — Price tier removed.
FieldTypeDescription
uidstringUnique price identifier
variant_uidstringParent variant identifier
PRODUCT_MEDIA_ADDED — Media files attached to a variant.
FieldTypeDescription
variant_uidstringVariant identifier
media_uidsstring[]List of added media identifiers
PRODUCT_MEDIA_REMOVED — Media files removed from a variant.
FieldTypeDescription
variant_uidstringVariant identifier
media_uidsstring[]List of removed media identifiers
PRODUCT_DELIVERABLE_CREATED — New deliverable created.
FieldTypeDescription
uidstringUnique deliverable identifier
typestringDeliverable type (e.g., digital_download)
namestringDeliverable name
configobject?Type-specific configuration
PRODUCT_DELIVERABLE_UPDATED — Deliverable details changed.
FieldTypeDescription
uidstringUnique deliverable identifier
typestringDeliverable type
namestringDeliverable name
configobject?Type-specific configuration
changed_fieldsstring[]List of fields that changed
PRODUCT_DELIVERABLE_ARCHIVED — Deliverable archived.
FieldTypeDescription
uidstringUnique deliverable identifier
PRODUCT_VARIANT_DELIVERABLE_ADDED — Deliverable attached to a variant.
FieldTypeDescription
variant_uidstringVariant identifier
deliverable_uidstringDeliverable identifier
PRODUCT_VARIANT_DELIVERABLE_REMOVED — Deliverable removed from a variant.
FieldTypeDescription
variant_uidstringVariant identifier
deliverable_uidstringDeliverable identifier

Event Summary

EventEntity TypeDescription
ORDER_CREATEDorderCart converted to order
ORDER_CONFIRMEDorderPayment processed
ORDER_COMPLETEDorderPayment and fulfillment done
CUSTOMER_CREATEDcustomerNew customer account
CUSTOMER_UPDATEDcustomerCustomer details changed
CART_CREATEDcartNew cart initialized
CART_ITEM_ADDEDcartItem added to cart
CART_ITEM_UPDATEDcartCart item quantity changed
CART_ITEM_REMOVEDcartItem removed from cart
CHECKOUT_STARTEDcheckoutCheckout session initiated
CHECKOUT_ADDRESS_SETcheckoutBilling address provided
CHECKOUT_PAYMENT_SELECTEDcheckoutPayment provider selected
CHECKOUT_COMPLETEDcheckoutCheckout completed
CHECKOUT_PAYMENT_FAILEDcheckoutPayment failed
CHECKOUT_VALIDATE_DISCOUNT_CODEcheckoutSync return — discount code submitted, workflow returns validation
INVOICE_CREATEDinvoiceInvoice created
INVOICE_PAIDinvoiceInvoice paid
PAYMENT_SUCCEEDEDpaymentPayment completed
PAYMENT_FAILEDpaymentPayment failed
PRODUCT_CREATEDproductNew product created
PRODUCT_UPDATEDproductProduct details changed
PRODUCT_PUBLISHEDproductProduct visible in store
PRODUCT_DRAFT_DISCARDEDproductProduct draft discarded
PRODUCT_ARCHIVEDproductProduct archived
PRODUCT_UNARCHIVEDproductProduct restored
PRODUCT_VARIANT_CREATEDproduct_variantVariant added
PRODUCT_VARIANT_UPDATEDproduct_variantVariant changed
PRODUCT_VARIANT_DELETEDproduct_variantVariant removed
PRODUCT_PRICE_CREATEDproduct_pricePrice tier added
PRODUCT_PRICE_UPDATEDproduct_pricePrice tier changed
PRODUCT_PRICE_DELETEDproduct_pricePrice tier removed
PRODUCT_MEDIA_ADDEDproduct_mediaMedia attached
PRODUCT_MEDIA_REMOVEDproduct_mediaMedia removed
PRODUCT_DELIVERABLE_CREATEDproduct_deliverableDeliverable created
PRODUCT_DELIVERABLE_UPDATEDproduct_deliverableDeliverable changed
PRODUCT_DELIVERABLE_ARCHIVEDproduct_deliverableDeliverable archived
PRODUCT_VARIANT_DELIVERABLE_ADDEDproduct_variant_deliverableDeliverable attached to variant
PRODUCT_VARIANT_DELIVERABLE_REMOVEDproduct_variant_deliverableDeliverable removed from variant

Webhook Security

Agent webhook actions support custom headers, so you can include a secret key to verify that incoming requests are from Colossal. When configuring a webhook action in your agent, add an authorization header with a secret value:
{
  "headers": {
    "X-Webhook-Secret": "your-secret-key"
  }
}
Then verify it on your server:
app.post('/webhooks/colossal', (req, res) => {
  const secret = req.headers['x-webhook-secret'];

  if (secret !== process.env.WEBHOOK_SECRET) {
    return res.status(401).send('Unauthorized');
  }

  // Process webhook
  res.status(200).send('OK');
});

Best Practices

  1. Use a secret header - Add a shared secret to your webhook headers to verify requests
  2. Handle duplicate events - Use correlation_id for idempotency
  3. Return 200 quickly - Process events asynchronously
  4. Handle retries - We retry failed webhooks up to 3 times
  5. Monitor webhook endpoints - Ensure high availability