Read Methods
All read methods are available to bothstandalone 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. Thesku field is the human-readable
product code from Stock_SKU.SKU — use this for stable cross-environment product
references (GUIDs can vary between environments).
id (GUID), sku (human-readable code), name, price (retail sell price), unit (UOM token).
taskTemplates.list(options?)
Returns task templates fromG_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.
codes (string[], optional), page (number, optional), pageSize (number, optional).
Response item fields: id (GUID), code (stable token), name.
costItems.list(options?)
Returns cost-of-business items fromCOB_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.
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").
jobs.list(options?)
Returns a paginated list of active jobs for the tenant. Available to all tool types.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.| Field | Type | Required | Description |
|---|---|---|---|
| customerName | string | No | Customer display name |
| customerEmail | string | Conditional | Required when upsertByEmail is true |
| customerPhone | string | No | Customer phone number |
| upsertByEmail | boolean | No | If true, creates or matches customer by email |
| title | string | No | Quote title |
| quoteRef | string | No | Custom quote reference |
| lines | array | Yes | At least one line item required |
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | No | Line item description |
| productCode | string | No | Product code reference |
| qty | number | Yes | Quantity (1-10000) |
| unitPrice | number | Yes | Unit price (0-1000000) |
| taxRate | number | Yes | Tax rate as decimal (e.g. 0.15 for 15%) |
- Lines array must not be empty
- Maximum 200 line items per quote
- Quantity must be
> 0and<= 10,000 - Unit price must be
>= 0and<= 1,000,000
quotes.addLines(lines)
Available toquoting_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.
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | optional | Free-text line description. Displayed as the line name in the quote. |
| productCode | string | optional | Human-readable SKU/code. Stored as WorkObjectCode on the quote line. |
| qty | number | required | Line quantity. Must be > 0. |
| unitPrice | number | required | Retail/sell price per unit. Markup must already be applied — the host does not re-mark up. |
| costPrice | number | optional | Buy/cost price per unit. When provided: BUY column = costPrice, SELL column = unitPrice (real margin visible in COB panel). When omitted: both BUY and SELL use unitPrice. |
| taxRate | number | required | Tax rate. Accepted as percentage (e.g. 15) or decimal fraction (e.g. 0.15) — the host normalises. |
| location | string | optional | Location or zone label. Maps to QuoteLine.FreeTextField2. Use for room, area, or zone labels (e.g. "Patio", "Living Room"). |
| specification | string | optional | Configuration or specification detail. Maps to QuoteLine.FreeTextField. Use for dimensions, colours, or model info. |
| unit | string | optional | Unit of measure token. Valid values: "T_ITEM" (default), "T_SQUARE_METRE" (m²), "T_LINEAR_METRE" (lm). |
| groupKey | string | optional | Arbitrary stable string identifier. Lines sharing the same groupKey receive the same QuoteLine.GroupId on the host, keeping related lines visually grouped within their section. Lines without a groupKey are ungrouped (GroupId = 0). |
| lineType | string | optional | One of "product" | "task" | "cost". Defaults to "product". Selects which Pipeline table linkedItemId resolves into — see “Three line kinds” below. |
| linkedItemId | string (GUID) | optional | GUID into Stock_SKU / G_Task_Templates / COB_Items based on lineType. Replaces productId for new tools. The whole addLines batch is rejected if the GUID does not resolve to an active row in the indicated table. |
| section | string | optional | Categorical section label (e.g. "Blinds", "Motorisation", "Installation", "Extras", "Removal"). Persisted on QuoteLine.Section. The host quote UI groups lines visually by section. Max 100 chars; trimmed; null/empty renders under “Ungrouped”. |
| productId | string (GUID) | deprecated | Use linkedItemId with lineType="product" instead. Retained for back-compat with Ziptrak v2.1.2 and earlier. When set without linkedItemId, behaves as linkedItemId with lineType="product" — triggers task-sequence auto-injection if the SKU has one configured. |
lineType | Target table | Behaviour |
|---|---|---|
"product" (default) | Stock_SKU.IdGuid | If the linked SKU has a task sequence configured, the host auto-injects its task template lines (e.g. installation tasks). |
"task" | G_Task_Templates.IdGuid | The line is the task. No auto-injection. Use taskTemplates.list to resolve codes to GUIDs. |
"cost" | COB_Items.IdGuid | The line is a cost-of-business item (shipping, travel, disposal, etc.). No auto-injection. Use costItems.list to resolve codes to GUIDs. |
addLines batch if any line has an unknown lineType, a section longer than 100 chars, or a linkedItemId that does not resolve to an active row in the indicated table. Failures surface to the extension as an exception from addLines.