Skip to main content
Commerce Layer logo
  • Category: commerce
  • Auth: S2S_OAUTH2
  • Composio-managed OAuth available? No
  • Tools: 10
  • Triggers: 0
  • Slug: COMMERCE_LAYER
  • Version: 20261101_00

Tools

Slug: COMMERCE_LAYER_CREATE_CUSTOMERCreate one Commerce Layer customer from an email and optional external-reference metadata. Use a unique email or reference for automation. This mutation is cleanly undoable with DELETE_CUSTOMER using the returned customer ID.

Input Parameters

string
required
Customer email address.
object
Optional JSON metadata to store on the customer.
string
External system reference for the customer.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_DELETE_CUSTOMERPermanently delete one Commerce Layer customer by exact ID. This irreversible operation requires explicit confirmation and is intended only for confirmed cleanup or erasure, never bulk deletion. Never infer or enumerate customer IDs; call GET_CUSTOMER first unless deleting a fixture created in the same workflow.

Input Parameters

string
required
Exact Commerce Layer customer resource ID to permanently delete. Call GET_CUSTOMER first unless deleting a fixture created in the same workflow.
boolean
required
Must be true to confirm this irreversible deletion. This confirmation is validated locally and is not sent to Commerce Layer.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_GET_CUSTOMERRetrieve one customer by its Commerce Layer resource ID.

Input Parameters

string
required
Commerce Layer customer resource ID.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_GET_ORDERRetrieve one Commerce Layer order by ID, optionally including customer, line-item, shipment, or return context.

Input Parameters

array
Optional non-empty list of related resources to include: customer, line_items, shipments, or returns. Use only what the task needs.
string
required
Commerce Layer order resource ID.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_GET_ORDER_METRICCompute one common order KPI over optional date, market, currency, and status filters using the Commerce Layer Metrics API.

Input Parameters

string ("order_count" | "unique_customers" | "gross_revenue" | "net_revenue" | "average_order_value")
required
KPI to compute: order_count, unique_customers, gross_revenue, net_revenue, or average_order_value.
string
Optional inclusive UTC end timestamp in YYYY-MM-DDTHH:MM:SSZ format.
array
Optional non-empty list of order statuses: placed, approved, or cancelled.
string
Optional inclusive UTC start timestamp in YYYY-MM-DDTHH:MM:SSZ format.
string ("created_at" | "updated_at" | "approved_at" | "placed_at")
Order timestamp used by date_from and date_to: created_at, updated_at, approved_at, or placed_at.
array
Optional non-empty list of Commerce Layer market IDs to include.
array
Optional non-empty list of three-letter ISO 4217 currency codes to include. Values are normalized to uppercase.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_LIST_CUSTOMERSReturn one page of customers, optionally filtered by an exact email address.

Input Parameters

string
Exact customer email to match; omit to list customers.
string ("email" | "status" | "total_orders_count" | "created_at" | "updated_at" | "reference")
Optional customer field to sort by: email, status, total_orders_count, created_at, updated_at, or reference.
integer
Customers to return per page (1-25).
string
Opaque continuation cursor returned by a previous call; omit for the first page.
string ("ascending" | "descending")
Sort direction when sort_by is set: ascending or descending.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_LIST_ORDERSReturn one page of orders, newest first by default, for operational review and follow-up by order ID.

Input Parameters

string ("number" | "status" | "payment_status" | "fulfillment_status" | "currency_code" | "total_amount_cents" | "placed_at" | "approved_at" | "cancelled_at" | "created_at" | "updated_at")
Order field to sort by. Choose number, status, payment_status, fulfillment_status, currency_code, total_amount_cents, placed_at, approved_at, cancelled_at, created_at, or updated_at.
integer
Orders to return per page (1-25).
string
Opaque continuation cursor returned by a previous call; omit for the first page.
string ("ascending" | "descending")
Sort direction: ascending or descending.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_LIST_SKUSReturn one page of catalog SKUs for product discovery and ID lookup.

Input Parameters

string ("code" | "name" | "do_not_ship" | "do_not_track" | "created_at" | "updated_at" | "reference")
Optional SKU field to sort by: code, name, do_not_ship, do_not_track, created_at, updated_at, or reference.
integer
SKUs to return per page (1-25).
string
Opaque continuation cursor returned by a previous call; omit for the first page.
string ("ascending" | "descending")
Sort direction when sort_by is set: ascending or descending.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_LIST_STOCK_ITEMSReturn one page of stock items with inventory quantities and SKU codes when available.

Input Parameters

string ("quantity" | "created_at" | "updated_at" | "reference" | "reference_origin")
Optional stock item field to sort by: quantity, created_at, updated_at, reference, or reference_origin.
integer
Stock items to return per page (1-25).
string
Opaque continuation cursor returned by a previous call; omit for the first page.
string ("ascending" | "descending")
Sort direction when sort_by is set: ascending or descending.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: COMMERCE_LAYER_UPDATE_CUSTOMERUpdate selected attributes of one Commerce Layer customer. Supply at least one of email, reference, or metadata; explicit null values are rejected.

Input Parameters

string
Replacement email; omit to preserve the current email.
object
Replacement metadata object; omit to preserve it.
string
Replacement external reference; omit to preserve it.
string
required
Commerce Layer customer resource ID.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not