Skip to main content

Read Methods

All read methods are available to both standalone and quoting_extension tool types.

context.get()

Returns the current user and tenant context.

customers.list(options?)

Returns a paginated list of customers.

products.list(options?)

Returns a paginated list of products/services. The sku field is the human-readable product code from Stock_SKU.SKU - use this for stable cross-environment product references (GUIDs can vary between environments).
Response item fields: id (GUID), sku (human-readable code), name, price (retail sell price), unit (UOM token).

taskTemplates.list(options?)

Returns task templates from G_Task_Templates, filtered to active rows in the current tenant. Use this to resolve a task template’s code (e.g. T_DEFAULT_INSTALLATION_TASK) to its GUID so the GUID can be passed as linkedItemId on a lineType: "task" line in quotes.addLines. When codes is provided, page/pageSize are ignored and all matching rows are returned. When codes is omitted, results paginate the full active task-template list.
Request fields: codes (string[], optional), page (number, optional), pageSize (number, optional). Response item fields: id (GUID), code (stable token), name.

costItems.list(options?)

Deprecated for new quoting extensions. Prefer jobCostTemplates.list with lineType: "jobcost". The COB → JobCostTemplate migration replaces lineType: "cost" + COB_Items with lineType: "jobcost" + a JobCostTemplate link. costItems.list is retained for back-compat with Ziptrak v2.1.2 and earlier extensions.
Returns cost-of-business items from COB_Items, filtered to active rows in the current tenant. Use this to resolve a COB item’s code (e.g. COS-TRAVEL-TIME, COS-SITE-VISIT) to its GUID for use as linkedItemId on a lineType: "cost" line.
Request fields: codes (string[], optional), page (number, optional), pageSize (number, optional). Response item fields: id (GUID), code (stable token), name, type (COB_Items.T_Type token, e.g. "T_FINANCIAL", "T_TRAVEL").

jobCostTemplates.list(options?)

Returns job-cost templates from JobCostTemplate, filtered to active rows in the current tenant and ordered by CostCode. This is the modern replacement for costItems.list: use it to resolve a template’s code (e.g. SHIPPING, DISPOSAL, TRAVEL, CHECK-MEASURE) to its GUID for use as linkedItemId on a lineType: "jobcost" line. When the resolved GUID is passed back as linkedItemId, the host routes the line’s GL via the template’s cost code; the extension-supplied unitPrice / costPrice always win (the template contributes classification and GL routing only, not pricing). When codes is provided, page/pageSize are ignored and all matching rows are returned. When codes is omitted, results paginate the full active job-cost-template list.
Request fields: codes (string[], optional), page (number, optional), pageSize (number, optional). Response item fields: id (GUID), code (JobCostTemplate.CostCode), name (CostName), type (T_CostType token: "T_ADHOC" | "T_PURCHASED_ITEM" | "T_THIRD_PARTY_COST" | "T_EXPENSE").

jobs.list(options?)

Returns a paginated list of active jobs for the tenant. Available to all tool types.
Response item fields: id (GUID), ref (human-readable job reference), customerName, customerIdGuid (GUID), status.

quotes.list(options?)

Returns a paginated list of quotes.

Write Methods

quotes.create(request)

Creates a new quote in Pipeline. Available to all tool types. Marketplace tools do NOT need API keys or inbound tokens - the bridge handles all authentication through the current user’s Pipeline session.
Request fields: Line item fields: Validation rules:
  • Lines array must not be empty
  • Maximum 200 line items per quote
  • Quantity must be > 0 and <= 10,000
  • Unit price must be >= 0 and <= 1,000,000

quotes.addLines(lines)

Available to quoting_extension tools only. Appends one or more lines to the currently-open quote. No server round-trip - the host merges the lines into its in-memory quote and the user saves normally. Calling this method from a standalone tool will return an error.
BridgeAddLineDto fields: Four line kinds (lineType → linkedItemId target table): Validation: the host rejects the entire addLines batch if any line has an unknown lineType, a section longer than 100 chars, or a non-null linkedItemId that does not resolve to an active row in the indicated table. A jobcost line with a null linkedItemId is valid (ad-hoc). summaryOnly is never a validation failure - it defaults to false when absent or non-boolean. Failures surface to the extension as an exception from addLines.