Colossal app triggers run in one of three modes. A trigger is just a routing key — a string identifier that workflows subscribe to. The invocation mode (async, sync side-effect, sync return) is set by the platform code that fires the trigger, not by the trigger string itself. The categories below describe how the platform invokes each trigger and what guarantees the workflow has.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.
Async triggers
Most events trigger agents asynchronously. The event is dispatched to a message queue, the originating operation completes immediately, and matching agents run in the background. Async events include:ORDER_CREATED,ORDER_CONFIRMED,ORDER_COMPLETEDCUSTOMER_CREATED,CUSTOMER_UPDATEDCHECKOUT_STARTED,CHECKOUT_ADDRESS_SET,CHECKOUT_PAYMENT_SELECTED,CHECKOUT_COMPLETED,CHECKOUT_PAYMENT_FAILEDPAYMENT_SUCCEEDED,PAYMENT_FAILEDINVOICE_CREATED,INVOICE_PAID- All product, variant, price, and media events
Sync side-effect triggers
Cart mutation events trigger agents synchronously to modify state. The mutation waits for matching agents to complete before returning a response to the caller. This lets agents modify the cart in the middle of a user action. Sync side-effect events:CART_ITEM_ADDEDCART_ITEM_UPDATEDCART_ITEM_REMOVED
Cart modifications
When a cart mutation triggers a sync agent, the agent runs before the response is returned to the customer. This enables use cases like:- Applying automatic discounts when an item is added
- Validating inventory before allowing an item to be added
- Adding complementary products automatically
Sync return triggers
Some triggers are synchronous request/response — the platform calls the workflow and waits for typed data back. The workflow’s result is consumed by the platform to make a decision (e.g., apply a discount, validate a code, calculate shipping). Sync return events:CHECKOUT_VALIDATE_DISCOUNT_CODE— the customer entered a discount code; the workflow looks it up and returns whether it’s valid plus the discount amount.
Constraints
Sync return workflows are subject to additional rules enforced at save time:- Must end in a
transformstep that produces the trigger’s required output type - Cannot use
delay,wait_for_event,parallel,map, orai_reasoningsteps (these would stall the user-facing operation) - Only one enabled workflow per sync return trigger per workspace
- Execution timeout: 10 seconds
Output contracts
Each sync return trigger has a required output type exposed viaget_workflow_schema. The transform step’s output_schema and mapping must produce this shape. The platform validates the result with Pydantic at runtime — invalid results are rejected.
For example, CHECKOUT_VALIDATE_DISCOUNT_CODE must return a DiscountValidationResult: