Agent skill

dlake-txdownloaderpro-hubspot

When an agent should use it: What the shipped default TxDownloaderPro templates set up when HubSpot is the writeback destination: the three-member JSON `Query` naming the module to retrieve, why the stored `Where` member is not a filter on this destination, the modules the default set names, the flat `ProcessStructure` mapping and its small `Line.` section, the `$FUN_` value-token names the mapping documents carry, the single `ResultStructure` part the templates fill for the write back to HubSpot, and the `TxDownloaderPro` process row each template becomes on import. Use it when importing or reading a HubSpot writeback template set, when a process retrieves nothing, when a mapped field arrives empty, or when deciding where a change belongs. It extends `dlake-txdownloaderpro`, which covers operating TxDownloaderPro generally; the per-ERP pages `dlake-txdownloaderpro-<erp>-hubspot` carry each ERP's own default template set.

Extends dlake-txdownloaderpro.

67 source-ERP pages: what the shipped templates set up for each (also readable with dlake skills show dlake-txdownloaderpro-hubspot/erps/<erp>)

Install with "dlake skills install" or read it in the terminal with "dlake skills show dlake-txdownloaderpro-hubspot". Skills ship inside the CLI; the copy below mirrors the GitHub repository.

TxDownloaderPro ← HubSpot: 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.

The source ERP has its own page under this skill. erps/<erp>.md is a child file of this skill and describes what the shipped templates for that ERP → HubSpot pair set up. §7 lists every one of them and how to pick the right row; read this page first, then that one.

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 and TxDownloaderProTrans tables and their columns (§9, §10), the SFUpdated state machine (§10), the field-mapping columns 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.

What follows is only what the shipped default templates for this destination themselves set, described from their DefaultQuery, DefaultProcessStructure and DefaultResultStructure columns — structure only. No template text is reproduced. This page grows as the default catalogue does.

HubSpot is a large destination in the default set: 404 default templates across 64 ERP names, in 319 field-process versions. The CRM catalogue registers HubSpot with OAuth authentication. Each of those ERPs has its own page, dlake-txdownloaderpro-<erp>-hubspot.

1. What the templates deliver

Transaction familyWhat the templates deliverOperations the flags carry
Customer / companyA HubSpot company becomes a receivable customer in the ERP, with its addressescreate, update, delete
ContactA HubSpot contact under a synced company becomes an ERP customer contactcreate, update
VendorA company becomes an ERP vendorcreate, update, delete
Sales order / invoiceA deal, with its line items where the template maps them, becomes an ERP sales order or invoicecreate, update
JobA deal becomes the ERP’s job object, on the ERPs that have onecreate, update

Across the 404 default templates, 260 carry IsInsert, 135 carry IsUpdate and 16 carry IsDelete. A flag decides which operation the process is allowed to perform, not which one it performs on a given record.

The catalogue carries no BusinessDescription on any HubSpot row. The business language on the per-ERP pages is each row’s Message, which is the direction of travel and the two object names — a label, not a specification. Nearly all of the processes have a Message that survives publication; the rest are named by their field-process version instead. If you need a sentence about what one of these templates is for, the source is the ERP’s own page or the integration owner, not this catalogue.

2. The process rows the import creates

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

A default template carries no TxDownloaderDllName and no template name of its own; it is identified by its field-process version, and that version supplies the DLL on a create. None of the 404 HubSpot rows carries a licence-group id, so the picker offers the whole set to any tenant whose ERP matches.

In-flight state is in TxDownloaderProTrans, keyed by SFUpdated — parent §10.

3. The queries

A HubSpot Query is a JSON object with three members, on all 404 templates: ModuleName, selectedFields and Where.

  • ModuleName names the module to retrieve. The default set names companies, contacts, deals and products, and three templates spell the contacts module with a leading capital. The spelling matters twice: it is what the engine calls, and it is the path root the mapping document has to use (section 4).
  • selectedFields is non-empty on all 404 and holds the field list to request.
  • Where is non-empty on 44 of the 404, and it is not a filter. What those rows store in it is not a condition — it is a leftover of the stored shape, and the platform’s own HubSpot retrieval path does not read it on the preview route. Its contents are not reproduced here and should not be treated as documentation of anything. Do not put a filter in Where and expect it to narrow a run.

Where the filtering happens is therefore the important difference on this destination. The query names a module, not a condition, so a run retrieves what the module returns and the selection described by the parent’s §12 is applied after retrieval. There is no marker column convention in the default HubSpot queries — none of them names one — so a process that picks up more records than expected is not fixed by editing its query the way a Salesforce one is. Scope it in the module, or in the process configuration the parent’s §14 tools reach.

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). All 404 default templates carry one, but 12 of them do not parse as JSON — and those are counted, never described. A parseable document carries about 12 members.

  • Path roots the documents use: companies, contacts, deals, products, LineItem, and the capitalised contacts spelling. Eight documents are rooted on a misspelling of the contacts module, which resolves to nothing; a path root has to match the element the engine emits.
  • 125 templates carry a Line. section, and 123 of them name the collection through Line.mainXml; the other two spell that member with a different capitalisation, which is a different key. The members beside it are the usual item, quantity, amount and description members in each ERP’s spelling, resolved against the collection’s own root rather than through the header.
  • $FUN_ value tokens the documents carry: $FUN_UNESCAPEXML, $FUN_SUBSTR, $FUN_SPLIT, $FUN_DATEFORMAT, $FUN_ISNULL, $FUN_IF, $FUN_TIMESTAMPTODATE, $FUN_STRREPLACE. Names only; no semantics are claimed. The parent’s §12 is explicit that the platform-side resolver is dotted path substitution only — these tokens are evaluated by the TxDownloaderPro service on the customer’s own host.

5. Result structure — what goes back to HubSpot

Of the 404 default templates, 206 carry a parseable DefaultResultStructure and 198 carry none. None fails to parse.

PartFilled byWhat it addressesMembers the default set uses
Part1206 templatesthe record the run is already working witha source-path-to-property map
Part2none (explicitly null on all 206)the child/line records under it
Part3none (explicitly null on all 206)a new record
Part4none (explicitly null on all 206)a different record

Part1 and nothing else. Even the 125 templates that map lines inbound write nothing back to the line records.

  • HubSpot properties Part1 writes to: arcustomercode, externalkey and a capitalised spelling of the external key — the customer code and the external key, in HubSpot’s lower-case property style bar that one spelling. That is the whole outbound surface of this destination’s default set.
  • Response members it reads them from: internalId, ObjectID, CustomerID, VendorId, ClientId, ListID, TxnID, LineID, number, and several per-ERP response members. Which exists depends on the source system’s response.

A template with no ResultStructure writes nothing back, and the ERP’s key then lives only in TxDownloaderProTrans. If a tenant expects the customer code to appear on the HubSpot company and it does not, check for this column being empty before looking at anything else.

6. Verifying

# 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 order of diagnosis here: is the module name right and does the preview return a record (section 3); does each path root match the module the engine emitted (section 4) — this is where the misspelled root and the unparseable documents bite; and is there a ResultStructure at all (section 5). The parent’s §14 is the authority on the tools, §10 on the state.

7. The source ERP’s own page

One row per source ERP the catalogue ships default HubSpot templates for. Each page is a child file of this skill, addressed as dlake-txdownloaderpro-hubspot/erps/<erp>dlake skills show dlake-txdownloaderpro-hubspot/erps/<erp> prints one, and dlake skills install writes them beside this file.

ERPPageWhat its templates deliver
Abas Business Softwareerps/abas-business-software.md8 default templates in 8 processes, mostly JSON module objects; writes back through Part1
Acumatica Clouderps/acumatica-cloud.md6 default templates in 5 processes, mostly JSON module objects; writes back through Part1
Applied Epicerps/applied-epic.md2 default templates in 2 processes, mostly JSON module objects; writes back through Part1; 2 community templates
Aptean Encompixerps/aptean-encompix.md1 default template in 1 process, mostly JSON module objects; nothing written back
Aptean Made2Manageerps/aptean-made2manage.md6 default templates in 3 processes, mostly JSON module objects; nothing written back
Aptean Rosserps/aptean-ross.mdno default templates; 1 community template
Commercient CPQerps/commercient-cpq.md2 default templates in 2 processes, mostly JSON module objects; nothing written back
DELMIAworkserps/delmiaworks.md1 default template in 1 process, mostly JSON module objects; writes back through Part1
Deltek Vantagepointerps/deltek-vantagepoint.md3 default templates in 3 processes, mostly JSON module objects; writes back through Part1; 6 community templates
Deltek Visionerps/deltek-vision.md7 default templates in 6 processes, mostly JSON module objects; writes back through Part1
EBMSerps/ebms.md6 default templates in 3 processes, mostly JSON module objects; writes back through Part1; 3 community templates
ECi Spruceerps/eci-spruce.md2 default templates in 2 processes, mostly JSON module objects; writes back through Part1
Epicor 10erps/epicor-10.md8 default templates in 7 processes, mostly JSON module objects; writes back through Part1; 16 community templates
Epicor 9 and 9.5erps/epicor-9-and-9-5.md5 default templates in 3 processes, mostly JSON module objects; writes back through Part1
Epicor BisTrackerps/epicor-bistrack.md2 default templates in 2 processes, mostly JSON module objects; writes back through Part1
Epicor Clouderps/epicor-cloud.md8 default templates in 4 processes, mostly JSON module objects; writes back through Part1; 27 community templates
Epicor Eclipseerps/epicor-eclipse.md1 default template in 1 process, mostly JSON module objects; writes back through Part1
Epicor Prophet 21 (P21)erps/epicor-prophet-21-p21.md10 default templates in 7 processes, mostly JSON module objects; writes back through Part1; 9 community templates
Exact Globe Nexterps/exact-globe-next.md4 default templates in 4 processes, mostly JSON module objects; writes back through Part1
Exact MAXerps/exact-max.md1 default template in 1 process, mostly JSON module objects; nothing written back
GenericDLLserps/genericdlls.mdno default templates; 41 community templates
GlobalShoperps/globalshop.md5 default templates in 3 processes, mostly JSON module objects; writes back through Part1
IFSerps/ifs.md22 default templates in 22 processes, mostly JSON module objects; writes back through Part1
IFS 9erps/ifs-9.md4 default templates in 4 processes, mostly JSON module objects; writes back through Part1
IFS Clouderps/ifs-cloud.md5 default templates in 5 processes, mostly JSON module objects; writes back through Part1
Infor SXeerps/infor-sxe.md1 default template in 1 process, mostly JSON module objects; writes back through Part1; 1 community template
Infor SyteLineerps/infor-syteline.md24 default templates in 21 processes, mostly JSON module objects; writes back through Part1; 13 community templates
Infor Visual 9erps/infor-visual-9.md2 default templates in 2 processes, mostly JSON module objects; nothing written back
Infor10 Distribution Businesserps/infor10-distribution-business.md1 default template in 1 process, mostly JSON module objects; writes back through Part1
Infusionsofterps/infusionsoft.md1 default template in 1 process, mostly JSON module objects; writes back through Part1
JD Edwardserps/jd-edwards.md5 default templates in 3 processes, mostly JSON module objects; writes back through Part1
JobBOSSerps/jobboss.md4 default templates in 2 processes, mostly JSON module objects; writes back through Part1
Macola ESerps/macola-es.md1 default template in 1 process, mostly JSON module objects; nothing written back
Maconomyerps/maconomy.md4 default templates in 2 processes, mostly JSON module objects; writes back through Part1
Microsoft Business Centralerps/microsoft-business-central.md8 default templates in 5 processes, mostly JSON module objects; writes back through Part1; 12 community templates
Microsoft Dynamics AXerps/microsoft-dynamics-ax.md4 default templates in 4 processes, mostly JSON module objects; writes back through Part1
Microsoft Dynamics GPerps/microsoft-dynamics-gp.md6 default templates in 5 processes, mostly JSON module objects; writes back through Part1
Microsoft Dynamics NAVerps/microsoft-dynamics-nav.md15 default templates in 8 processes, mostly JSON module objects; writes back through Part1
MYOB AccountRighterps/myob-accountright.md8 default templates in 7 processes, mostly JSON module objects; writes back through Part1; 2 community templates
NetSuiteerps/netsuite.md14 default templates in 7 processes, mostly JSON module objects; writes back through Part1; 13 community templates
Plexerps/plex.md4 default templates in 4 processes, mostly JSON module objects; nothing written back
Print EPSerps/print-eps.md3 default templates in 3 processes, mostly JSON module objects; writes back through Part1
QADerps/qad.md2 default templates in 2 processes, mostly JSON module objects; writes back through Part1
QuickBooks Desktoperps/quickbooks-desktop.md9 default templates in 6 processes, mostly JSON module objects; writes back through Part1; 67 community templates
QuickBooks Onlineerps/quickbooks-online.md19 default templates in 18 processes, mostly JSON module objects; writes back through Part1
QuickBooks POSerps/quickbooks-pos.md1 default template in 1 process, mostly JSON module objects; writes back through Part1
Sage 100 (US)erps/sage-100-us.md29 default templates in 22 processes, mostly JSON module objects; writes back through Part1; 22 community templates
Sage 100 Contractorerps/sage-100-contractor.md8 default templates in 4 processes, mostly JSON module objects; writes back through Part1; 2 community templates
Sage 100 Contractor 2018erps/sage-100-contractor-2018.md6 default templates in 2 processes, mostly JSON module objects; writes back through Part1
Sage 200 UKerps/sage-200-uk.md4 default templates in 3 processes, mostly JSON module objects; writes back through Part1
Sage 300erps/sage-300.md6 default templates in 6 processes, mostly JSON module objects; nothing written back; 8 community templates
Sage 50 Canadaerps/sage-50-canada.md10 default templates in 8 processes, mostly JSON module objects; writes back through Part1
Sage 50 UKerps/sage-50-uk.md2 default templates in 2 processes, mostly JSON module objects; nothing written back; 6 community templates
Sage 50 USerps/sage-50-us.md10 default templates in 10 processes, mostly JSON module objects; writes back through Part1; 10 community templates
Sage 500erps/sage-500.md5 default templates in 4 processes, mostly JSON module objects; writes back through Part1
Sage Intaccterps/sage-intacct.md8 default templates in 8 processes, mostly JSON module objects; writes back through Part1
Sage Liveerps/sage-live.md5 default templates in 4 processes, mostly JSON module objects; writes back through Part1
Sage X3erps/sage-x3.md1 default template in 1 process, mostly JSON module objects; writes back through Part1; 2 community templates
SAP B1erps/sap-b1.md8 default templates in 5 processes, mostly JSON module objects; writes back through Part1; 4 community templates
SAP Business ByDesignerps/sap-business-bydesign.md6 default templates in 3 processes, mostly JSON module objects; writes back through Part1; 4 community templates
SouthWareerps/southware.md2 default templates in 2 processes, mostly JSON module objects; nothing written back
SQLConnectorerps/sqlconnector.mdno default templates; 8 community templates
SYSPRO 6erps/syspro-6.md19 default templates in 18 processes, mostly JSON module objects; writes back through Part1; 13 community templates
Traverse 11erps/traverse-11.md4 default templates in 4 processes, mostly JSON module objects; nothing written back
VAI S2Kerps/vai-s2k.md7 default templates in 4 processes, mostly JSON module objects; writes back through Part1
Workdayerps/workday.md5 default templates in 3 processes, mostly JSON module objects; writes back through Part1
Xeroerps/xero.md4 default templates in 3 processes, mostly JSON module objects; writes back through Part1

Work out which row applies before reading one. The source is the ERP the tenant was registered with: dlake register erps lists the catalogue’s names and codes, and dlake admin crmpro_templates shows what that tenant can actually import. Match that ERP to a row above, then read its page alongside this one — this page for the conventions that hold across every source, that page for what this source’s own templates set. If no row matches the tenant’s ERP, this skill alone applies: the catalogue ships no default templates for that pair, so there is nothing ERP-specific to read and nothing to import.

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-<erp>-hubspot — one page per ERP that ships default templates for HubSpot.
  • dlake-integration-setup — registration, CRM choice and the ERP connector.
  • dlake-crmpro and dlake-normalsync — the inbound leg.
  • dlake — general tenant operation.