> ## 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.

# Colossal

> Built-in Colossal app actions with input and output schemas for each.

Built-in operations an [automation](/automations/overview) can run as App Action steps on Colossal's commerce primitives. Each action has typed inputs and outputs.

### Customers

<AccordionGroup>
  <Accordion title="create_customer">
    Create a new customer.

    **Input**

    <ResponseField name="email" type="string" required>
      Customer email address
    </ResponseField>

    <ResponseField name="full_name" type="string" required>
      Customer full name
    </ResponseField>

    **Output**

    <ResponseField name="customer" type="CustomerOutput | null">
      <Expandable title="properties">
        <ResponseField name="customer_id" type="integer" />

        <ResponseField name="customer_uid" type="string" />

        <ResponseField name="email" type="string" />

        <ResponseField name="full_name" type="string" />

        <ResponseField name="org_id" type="integer" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="get_customer">
    Retrieve customer by ID, UUID, or email.

    **Input**

    <ResponseField name="customer_id" type="integer | null">
      Customer ID
    </ResponseField>

    <ResponseField name="customer_uid" type="string | null">
      Customer UUID
    </ResponseField>

    <ResponseField name="email" type="string | null">
      Customer email
    </ResponseField>

    **Output**

    <ResponseField name="customer" type="CustomerOutput | null">
      <Expandable title="properties">
        <ResponseField name="customer_id" type="integer" />

        <ResponseField name="customer_uid" type="string" />

        <ResponseField name="email" type="string" />

        <ResponseField name="full_name" type="string" />

        <ResponseField name="org_id" type="integer" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="update_customer">
    Update customer details.

    **Input**

    <ResponseField name="customer_id" type="integer" required>
      Customer ID to update
    </ResponseField>

    <ResponseField name="email" type="string | null">
      New email address
    </ResponseField>

    <ResponseField name="full_name" type="string | null">
      New full name
    </ResponseField>

    **Output**

    <ResponseField name="customer" type="CustomerOutput | null">
      <Expandable title="properties">
        <ResponseField name="customer_id" type="integer" />

        <ResponseField name="customer_uid" type="string" />

        <ResponseField name="email" type="string" />

        <ResponseField name="full_name" type="string" />

        <ResponseField name="org_id" type="integer" />
      </Expandable>
    </ResponseField>

    <ResponseField name="changed_fields" type="string[]" />
  </Accordion>
</AccordionGroup>

### Products

<AccordionGroup>
  <Accordion title="archive_deliverable">
    Archive a product deliverable.

    **Input**

    <ResponseField name="deliverable_uid" type="string" required />

    **Output**

    <ResponseField name="deliverable_uid" type="string | null" />
  </Accordion>

  <Accordion title="archive_product">
    Archive a product to hide it from the project.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    **Output**

    <ResponseField name="product_uid" type="string | null" />
  </Accordion>

  <Accordion title="create_deliverable">
    Create a new product deliverable in the project.

    **Input**

    <ResponseField name="type" type="string" required />

    <ResponseField name="name" type="string" required />

    <ResponseField name="config" type="object | null" />

    **Output**

    <ResponseField name="deliverable_uid" type="string | null" />

    <ResponseField name="name" type="string | null" />
  </Accordion>

  <Accordion title="create_price">
    Create a new price for a product variant.

    **Input**

    <ResponseField name="variant_uid" type="string" required />

    <ResponseField name="name" type="string | null" />

    <ResponseField name="amount" type="number" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="currency" type="string">
      *Default: `"USD"`.*
    </ResponseField>

    <ResponseField name="recurring_interval" type="string | null" />

    <ResponseField name="is_default" type="boolean">
      *Default: `false`.*
    </ResponseField>

    **Output**

    <ResponseField name="price_uid" type="string | null" />

    <ResponseField name="is_default" type="boolean | null" />
  </Accordion>

  <Accordion title="create_product">
    Create a new product in the project with optional price and images.

    **Input**

    <ResponseField name="name" type="string" required />

    <ResponseField name="handle" type="string" required />

    <ResponseField name="description" type="string | null" />

    <ResponseField name="tagline" type="string | null" />

    <ResponseField name="price" type="number | null" />

    <ResponseField name="currency" type="string | null" />

    <ResponseField name="image_urls" type="string[]" />

    **Output**

    <ResponseField name="product_uid" type="string | null" />

    <ResponseField name="name" type="string | null" />

    <ResponseField name="handle" type="string | null" />
  </Accordion>

  <Accordion title="get_product">
    Retrieve product details by UID.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    **Output**

    <ResponseField name="product_id" type="integer | null" />

    <ResponseField name="product_uid" type="string | null" />

    <ResponseField name="name" type="string | null" />

    <ResponseField name="handle" type="string | null" />

    <ResponseField name="description" type="string | null" />

    <ResponseField name="is_published" type="boolean | null" />

    <ResponseField name="is_archived" type="boolean | null" />

    <ResponseField name="default_variant" type="ProductVariantOutput | null">
      <Expandable title="properties">
        <ResponseField name="uid" type="string" />

        <ResponseField name="name" type="string | null" />

        <ResponseField name="inventory_count" type="integer | null" />

        <ResponseField name="prices" type="ProductPriceOutput[]">
          <Expandable title="properties">
            <ResponseField name="uid" type="string" />

            <ResponseField name="name" type="string | null" />

            <ResponseField name="currency" type="string" />

            <ResponseField name="unit_price" type="number | null" />

            <ResponseField name="is_default" type="boolean" />
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="publish_product">
    Publish a product to make it visible in the project.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    **Output**

    <ResponseField name="product_uid" type="string | null" />

    <ResponseField name="name" type="string | null" />
  </Accordion>

  <Accordion title="set_default_price">
    Mark a price as the default for its variant.

    **Input**

    <ResponseField name="price_uid" type="string" required />

    **Output**

    <ResponseField name="price_uid" type="string | null" />
  </Accordion>

  <Accordion title="unarchive_product">
    Restore an archived product.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    **Output**

    <ResponseField name="product_uid" type="string | null" />
  </Accordion>

  <Accordion title="update_deliverable">
    Update a product deliverable's name, type, or config.

    **Input**

    <ResponseField name="deliverable_uid" type="string" required />

    <ResponseField name="name" type="string | null" />

    <ResponseField name="type" type="string | null" />

    <ResponseField name="config" type="object | null" />

    **Output**

    <ResponseField name="deliverable_uid" type="string | null" />
  </Accordion>

  <Accordion title="update_product">
    Update an existing product's details.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    <ResponseField name="name" type="string | null" />

    <ResponseField name="handle" type="string | null" />

    <ResponseField name="description" type="string | null" />

    <ResponseField name="tagline" type="string | null" />

    **Output**

    <ResponseField name="product_uid" type="string | null" />

    <ResponseField name="name" type="string | null" />
  </Accordion>

  <Accordion title="update_product_price">
    Update the default price of a product.

    **Input**

    <ResponseField name="product_uid" type="string" required />

    <ResponseField name="price" type="number" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="currency" type="string | null" />

    **Output**

    <ResponseField name="product_uid" type="string | null" />

    <ResponseField name="price_uid" type="string | null" />

    <ResponseField name="new_price" type="number | null" />

    <ResponseField name="currency" type="string | null" />
  </Accordion>
</AccordionGroup>

### Orders

<AccordionGroup>
  <Accordion title="get_order">
    Retrieve order details by ID.

    **Input**

    <ResponseField name="order_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    **Output**

    <ResponseField name="order_id" type="integer | null" />

    <ResponseField name="order_uid" type="string | null" />

    <ResponseField name="status" type="string | null" />

    <ResponseField name="customer_id" type="integer | null" />

    <ResponseField name="customer_email" type="string | null" />

    <ResponseField name="subtotal_amount" type="number | null" />

    <ResponseField name="total_amount" type="number | null" />

    <ResponseField name="tax" type="number | null" />

    <ResponseField name="line_items" type="OrderLineItemOutput[]">
      <Expandable title="properties">
        <ResponseField name="line_item_id" type="integer" />

        <ResponseField name="product_id" type="integer" />

        <ResponseField name="product_name" type="string" />

        <ResponseField name="quantity" type="integer" />

        <ResponseField name="unit_price" type="number" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="get_order_history">
    Retrieve orders for a specific customer.

    **Input**

    <ResponseField name="customer_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="limit" type="integer">
      *min: 1, max: 100. Default: `50`.*
    </ResponseField>

    **Output**

    <ResponseField name="customer_id" type="integer | null" />

    <ResponseField name="orders" type="CustomerOrderOutput[]">
      <Expandable title="properties">
        <ResponseField name="order_id" type="integer" />

        <ResponseField name="order_uid" type="string" />

        <ResponseField name="status" type="string" />

        <ResponseField name="total_amount" type="number" />

        <ResponseField name="created_at" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="count" type="integer" />
  </Accordion>

  <Accordion title="lookup_order_count">
    Get the total number of orders placed by a specific customer.

    **Input**

    <ResponseField name="customer_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    **Output**

    <ResponseField name="customer_id" type="integer | null" />

    <ResponseField name="order_count" type="integer | null" />
  </Accordion>

  <Accordion title="update_billing_address">
    Update an order's billing address.

    **Input**

    <ResponseField name="order_uid" type="string" required />

    <ResponseField name="line1" type="string" required />

    <ResponseField name="city" type="string" required />

    <ResponseField name="postal_code" type="string" required />

    <ResponseField name="country" type="string" required />

    <ResponseField name="line2" type="string | null" />

    <ResponseField name="state" type="string | null" />

    **Output**

    <ResponseField name="order_id" type="integer | null" />
  </Accordion>

  <Accordion title="update_order">
    Update order fields in a secure project-scoped manner.

    **Input**

    <ResponseField name="order_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="updates" type="object" required>
      Fields to update on the order
    </ResponseField>

    **Output**

    <ResponseField name="message" type="string | null" />
  </Accordion>

  <Accordion title="update_order_metadata">
    Update order integration metadata.

    **Input**

    <ResponseField name="order_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="metadata" type="object" required>
      Metadata fields to merge into the order
    </ResponseField>

    **Output**

    <ResponseField name="order_id" type="integer | null" />
  </Accordion>

  <Accordion title="update_order_status">
    Update the status of an order.

    **Input**

    <ResponseField name="order_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="status" type="enum (`pending`, `confirmed`, `complete`)" required>
      New order status
    </ResponseField>

    **Output**

    <ResponseField name="order_id" type="integer | null" />

    <ResponseField name="previous_status" type="string | null" />

    <ResponseField name="new_status" type="string | null" />
  </Accordion>

  <Accordion title="update_shipping_address">
    Update an order's shipping address.

    **Input**

    <ResponseField name="order_uid" type="string" required />

    <ResponseField name="line1" type="string" required />

    <ResponseField name="city" type="string" required />

    <ResponseField name="postal_code" type="string" required />

    <ResponseField name="country" type="string" required />

    <ResponseField name="line2" type="string | null" />

    <ResponseField name="state" type="string | null" />

    **Output**

    <ResponseField name="order_id" type="integer | null" />
  </Accordion>
</AccordionGroup>

### Payments

<AccordionGroup>
  <Accordion title="get_invoice_payments">
    Retrieve all payments for an invoice.

    **Input**

    <ResponseField name="invoice_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="limit" type="integer">
      *min: 1, max: 50. Default: `10`.*
    </ResponseField>

    **Output**

    <ResponseField name="invoice_id" type="integer | null" />

    <ResponseField name="payments" type="PaymentSummary[]">
      <Expandable title="properties">
        <ResponseField name="payment_id" type="integer" />

        <ResponseField name="payment_uid" type="string" />

        <ResponseField name="status" type="string" />

        <ResponseField name="amount" type="integer" />

        <ResponseField name="currency" type="string" />

        <ResponseField name="payment_provider" type="string" />

        <ResponseField name="payment_method" type="string | null" />
      </Expandable>
    </ResponseField>

    <ResponseField name="total_count" type="integer" />
  </Accordion>

  <Accordion title="get_payment">
    Retrieve payment details by UID.

    **Input**

    <ResponseField name="payment_uid" type="string" required />

    **Output**

    <ResponseField name="payment_id" type="integer | null" />

    <ResponseField name="payment_uid" type="string | null" />

    <ResponseField name="invoice_id" type="integer | null" />

    <ResponseField name="status" type="string | null" />

    <ResponseField name="amount" type="integer | null" />

    <ResponseField name="currency" type="string | null" />

    <ResponseField name="payment_provider" type="string | null" />

    <ResponseField name="payment_method" type="string | null" />

    <ResponseField name="card_brand" type="string | null" />

    <ResponseField name="card_last4" type="string | null" />

    <ResponseField name="transaction_id" type="string | null" />

    <ResponseField name="failure_code" type="string | null" />

    <ResponseField name="failure_message" type="string | null" />
  </Accordion>
</AccordionGroup>

### Invoices

<AccordionGroup>
  <Accordion title="create_invoice">
    Create a new invoice with line items.

    **Input**

    <ResponseField name="customer_id" type="integer | null" />

    <ResponseField name="currency" type="string | null" />

    <ResponseField name="bill_to_name" type="string | null" />

    <ResponseField name="bill_to_email" type="string | null" />

    <ResponseField name="line_items" type="CreateInvoiceLineItemInput[]" required>
      <Expandable title="properties">
        <ResponseField name="title" type="string" required />

        <ResponseField name="quantity" type="integer" required>
          *min: 1.*
        </ResponseField>

        <ResponseField name="unit_price" type="integer" required>
          *min: 0.*
        </ResponseField>

        <ResponseField name="product_id" type="integer | null" />

        <ResponseField name="description" type="string | null" />
      </Expandable>
    </ResponseField>

    **Output**

    <ResponseField name="invoice_id" type="integer | null" />

    <ResponseField name="invoice_uid" type="string | null" />

    <ResponseField name="status" type="string | null" />

    <ResponseField name="total" type="integer | null" />
  </Accordion>

  <Accordion title="create_invoice_line_item">
    Append a line item to an existing invoice.

    **Input**

    <ResponseField name="invoice_uid" type="string" required />

    <ResponseField name="title" type="string" required />

    <ResponseField name="quantity" type="integer" required>
      *min: 1.*
    </ResponseField>

    <ResponseField name="unit_price" type="integer" required>
      *min: 0.*
    </ResponseField>

    <ResponseField name="product_id" type="integer | null" />

    <ResponseField name="description" type="string | null" />

    **Output**

    <ResponseField name="line_item_id" type="integer | null" />

    <ResponseField name="invoice_id" type="integer | null" />
  </Accordion>

  <Accordion title="get_invoice">
    Retrieve invoice details by UID.

    **Input**

    <ResponseField name="invoice_uid" type="string" required />

    **Output**

    <ResponseField name="invoice_id" type="integer | null" />

    <ResponseField name="invoice_uid" type="string | null" />

    <ResponseField name="invoice_number" type="string | null" />

    <ResponseField name="status" type="string | null" />

    <ResponseField name="source" type="string | null" />

    <ResponseField name="customer_id" type="integer | null" />

    <ResponseField name="order_id" type="integer | null" />

    <ResponseField name="currency" type="string | null" />

    <ResponseField name="subtotal" type="integer | null" />

    <ResponseField name="discount" type="integer | null" />

    <ResponseField name="tax" type="integer | null" />

    <ResponseField name="total" type="integer | null" />

    <ResponseField name="bill_to_name" type="string | null" />

    <ResponseField name="bill_to_email" type="string | null" />

    <ResponseField name="line_items" type="InvoiceLineItemOutput[]">
      <Expandable title="properties">
        <ResponseField name="line_item_id" type="integer" />

        <ResponseField name="product_id" type="integer | null" />

        <ResponseField name="title" type="string" />

        <ResponseField name="quantity" type="integer" />

        <ResponseField name="unit_price" type="integer" />

        <ResponseField name="total" type="integer" />
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

### Inventory

<AccordionGroup>
  <Accordion title="check_inventory">
    Check current inventory level for a product and determine if stock is low.

    **Input**

    <ResponseField name="product_id" type="integer" required>
      *min: > 0.*
    </ResponseField>

    <ResponseField name="threshold" type="integer">
      *min: 0. Default: `10`.*
    </ResponseField>

    **Output**

    <ResponseField name="product_id" type="integer | null" />

    <ResponseField name="product_name" type="string | null" />

    <ResponseField name="inventory_count" type="integer | null" />

    <ResponseField name="is_low_stock" type="boolean | null" />

    <ResponseField name="threshold" type="integer | null" />
  </Accordion>
</AccordionGroup>
