Source ERP · 51 of 67

TxDownloaderPro ← HubSpot — Sage 300: what the shipped default templates set up

Read it in the terminal with "dlake skills show dlake-txdownloaderpro-hubspot/erps/sage-300". It extends the dlake-txdownloaderpro-hubspot skill, which holds what is true whatever the source ERP.

TxDownloaderPro ← HubSpot — Sage 300: what the shipped default templates set up

Keep this skill current. dlake ships updates often and this text is embedded in the CLI you have installed. Before relying on it, compare dlake --version with npm view @commercient/dlake version; if they differ, run npm install -g @commercient/dlake@latest and then dlake skills install, which overwrites the installed skill files with the current text.

dlake-txdownloaderpro is the parent skill and the authority for everything general: what the writeback objects are and how they are exposed to the Data API (§1–§7), how a key is scoped to them, the TxDownloaderPro configuration table and the TxDownloaderProTrans transaction table and their columns (§9, §10), the SFUpdated state machine (§10), the field-mapping columns ProcessStructure, ResultStructure, XMLResult, ERPResponse, JsonRequest and JsonResponse and the {{Object.Field}} template paths that read them (§11), the filter-operator vocabulary (§12), and the txdownloaderpro_* tools that are the preferred way to configure any of it (§14). Read it first; this page does not repeat it. dlake-txdownloaderpro-hubspot is the HubSpot page and carries the destination-side detail: it is the skill this page is a child of, and the authority for the conventions that hold across every ERP, so read it before this page. This page is dlake-txdownloaderpro-hubspot/erps/sage-300.md, and that skill’s ERP table is what points at it.

What follows is only what the shipped default templates for this pair themselves set, described from their DefaultQuery, DefaultProcessStructure and DefaultResultStructure columns. It is a description of structure: which objects and marker columns are read, which parts and members are filled, which token names appear. No template text is reproduced. This page grows as the default catalogue does. The community templates the catalogue also carries for this pair are listed in a section of their own below, by count, object and name only.

1. What the templates deliver

One row per process the default set ships for this pair. The business language is the catalogue’s own, where it carries any; where it does not, the row says what the source and destination objects are and what the operation flags allow. Operations are the union of the IsInsert, IsUpdate and IsDelete flags over that process’s templates.

ProcessWhat it deliversSource → destinationTemplatesOperations
Create New AR InvoiceHubSpot deals to Sage 300 ARInvoicedealsARInvoice1create
Create New CustomerHubSpot companies to Sage 300 CustomercompaniesCustomer1create
Create or Update M/T ContactHubSpot contacts to Sage 300 M/T ContactcontactsM/T Contact1create
Create or Update PJC Contract MaintenanceHubSpot deals to Sage 300 PJC Contract MaintenancedealsPJC Contract Maintenance1create
Create or Update PJC ProjectHubSpot deals to Sage 300 PJC ProjectdealsPJC Project1create
Sales OrderHubSpot deals to Sage 300 SalesOrderdealsSalesOrder1create

Across the 6 default templates: 6 carry IsInsert, 0 carry IsUpdate, 0 carry IsDelete. A flag decides which operation the process is allowed to perform, not which one it performs on a given record.

2. The process rows the import creates

Importing one of these templates writes one TxDownloaderPro row. The columns the import fills from the template are the ones the parent’s §9 describes: the query goes into Query, the inbound mapping into ProcessStructure, the outbound mapping into ResultStructure, and the operation flags onto the row. In-flight state is never in this table — it is in TxDownloaderProTrans (parent §10), keyed by SFUpdated.

A default template carries no TxDownloaderDllName and no template name of its own. It is identified by its field-process version, and the version is what supplies the DLL on a create. That is where erpProcessId comes from, so a create against the wrong version produces a row that never matches a run.

What the import setsWhere it comes from
Querythe template’s DefaultQuery — section 3
ProcessStructurethe template’s DefaultProcessStructure — section 4
ResultStructurethe template’s DefaultResultStructure — section 5
IsInsert / IsUpdate / IsDeletethe template’s own flags — section 1
the DLL and erpProcessIdthe field-process version, not the template

The field-process versions this pair’s default templates belong to: TxDownloader_15_2, TxDownloader_15_1, TxDownloaderPro_15_7, TxDownloaderPro_15_9, TxDownloaderPro_15_8, TxDownloader_15_5.

3. What the query retrieves

Query does not have one shape across the product (parent §9). For this pair, 6 carry a JSON object naming the module to retrieve. No query text is reproduced here; what follows is what those queries read and filter on.

  • Objects read: deals, companies, contacts.
  • Members present in the JSON query object: selectedFields (6), ModuleName (6), Where (6). Where a Where member is present it is empty. 6 carry a non-empty selectedFields list.
  • Where the filtering happens: the query names a module rather than a condition, so the selection the parent’s §12 describes is applied after retrieval, not by the query.

4. The inbound mapping document

ProcessStructure is a flat JSON object: each member names a field on the source side and its value is a template resolved against the retrieved record’s XML document (parent §11). Of this pair’s 6 default templates, 6 carry a DefaultProcessStructure. A parseable document carries about 11 members.

  • Template path roots used: deals, contacts, companies, LineItem. A path’s first segment has to match the element the engine emits, and the document root itself is never part of the path.
  • Line. section members present: Line.mainXML, Line.ITEM, Line.DESC, Line.QTYORDERED, Line.UNITPRICE.

5. Result structure — what goes back to the CRM

ResultStructure is the outbound half: up to four parts, each optional, filled from the source system’s response after the write (parent §11). Of this pair’s 6 default templates, 0 carry a parseable DefaultResultStructure, 6 carry none.

No default template for this pair fills a part. Nothing is written back to HubSpot by these templates: the source system’s key stays in TxDownloaderProTrans and the CRM record is left as the user flagged it. If a tenant needs the key on the CRM record, ResultStructure is the column to fill, and the parent’s §11 gives its shape.

6. Community templates

The catalogue carries community templates for this pair as well as the default set above: templates written on a tenant rather than shipped. Their content is not read and not described here — no query, no mapping document, no field. What this section states is how many there are, which objects they start from, what they are called where the name is a product artefact name, and which field-process versions they belong to.

  • How many: 8 community templates, across 2 field-process versions.
  • Operations: 3 carry IsInsert, 1 carries IsUpdate, 0 carry IsDelete. A flag decides which operation the template is allowed to perform, as it does for a default template.
Source → destinationTemplates
Customer → —5
Order Entry → —3

None of these rows carries a destination object name in the catalogue, so the destination side of every shape above is empty.

  • Template names the catalogue carries: Create New Sales Order (2), New Account (2), Create New Customer (1), New Account 2 (1), New Quote (1), Update Account (1).
  • Field-process versions they belong to: TxDownloader_15_1, TxDownloader_15_5.

Importing one of these writes the same TxDownloaderPro row that importing a default template writes (parent §9); what differs is where the template came from, not how it is stored. What any one of them contains is read from the imported row itself, with the tools below.

7. Verifying

Read the imported row before a run, not after. The parent’s §14 is the authority on these tools and §10 on the state they report.

# the processes this tenant has, with their unresolved-error counts
dlake admin txdownloaderpro_list_processes

# one process in its edit shape, including the query and both mapping documents
dlake admin txdownloaderpro_get_process --processId <id>

# retrieve one record through the SAVED query and render it as the engine sees it
dlake admin txdownloaderpro_preview_xml --processId <id>

# the state breakdown the parent §10 reads
dlake txdownloaderpro transactions <processId> --status <state>

The two failures this pair’s templates actually produce: a run that retrieves nothing, which is the module the query names, since these queries carry no condition of their own; and a record that arrives with fields empty, which is a path that does not match the emitted document. Both are read through txdownloaderpro_preview_xml, against a real record.

8. Where this sits

  • dlake-txdownloaderpro — the parent: exposure, key scoping, the two tables, SFUpdated, the mapping columns, the filter vocabulary, the txdownloaderpro_* tools. Read it first.
  • dlake-txdownloaderpro-hubspot — the HubSpot destination page, which this page is a child of: the query shape, marker conventions and mapping conventions this destination uses across every ERP, and the ERP table that lists this page and its siblings.
  • dlake-integration-setup — registration, CRM choice and the ERP connector, of which writeback is one step.
  • dlake-crmpro and dlake-normalsync — the inbound leg, going the other way.
  • dlake — general tenant operation.

This page describes the shipped default template set for this pair, and grows as that set does.