November 29, 2026

CONTRACT in Yardi Voyager Is a Shared Master: Decode It by Workflow ObjectType

CONTRACT reads like a table you can query directly. It carries a status, a vendor, a payment frequency, a start and end date, and a code. Write a report against it and you'll get contract rows back. The problem is that CONTRACT isn't one thing — it's a shared master record that several different kinds of commitment write into: service contracts, construction works, consultancy engagements, variations and change orders, and at least one budget-revision authorization ladder. The table tells you a contract exists. It doesn't tell you what kind, and it won't warn you when you've mixed kinds into one report.

What discriminates between them lives in the workflow engine: the ObjectType on wf_tran_header.iType, with hRecord pointing at CONTRACT.HMY. The anchor is not on CONTRACT itself, so the only reliable way to classify a contract row is to work backwards from the workflow driving it.

One table, several contract kinds

PropETL's round-20 query-testing pass went after the "workflow siblings" backlog item expecting a project-budget workflow that hung off JOB. It came back with a correction instead of a new decoder. Mapping wf_tran_header.iType to hRecord → CONTRACT.HMY for the contract-side flows gives:

So the "project budget" flow that earlier notes assumed was job-anchored turned out to be a contract-anchored change-control ladder. A CONTRACT row can be a maintenance agreement, a variation order, or an authorization to revise a budget — and every column on the row reads identically in all three cases.

The HMY-collision trap: don't find the anchor by probing

It's worth spelling out why the earlier reading looked job-anchored, because it's the trap that catches anyone repeating the exercise. A contract-anchored workflow instance carries an hRecord value that also happens to exist as a JOB.HMY on the same install — HMY ranges overlap across transactional tables. Probe with "does hRecord match a JOB row?" and you get a hit rate that looks like a real relationship, when the anchor is somewhere else entirely.

What settles it is exclusive membership, not hit rate: classify each hRecord as CONTRACT-only, JOB-only, or both. On the install where this was verified live, the 126 ladder came out overwhelmingly contract-only, with the "both" rows behaving exactly as the collision predicts — and job-only membership was effectively nil. The apparent JOB linkage was an artifact of how the probe was written, not a fact about the data.

The general rule, carried as objecttype-registry-anchor-resolution, is that the ObjectType registry is the authoritative selector for a polymorphic anchor. OrionObjects and SPOLObjects map an ObjectType to its sTableName, sPrimaryKey, and sForeignLink; CustomTableConstants carries the same shape but can hand back a logical or dynamic-pointer name that isn't a physical base table, so verify the name resolves before joining:

SELECT sTableName AS AnchorTable, sPrimaryKey AS AnchorKey, sForeignLink AS ForeignLink
FROM SPOLObjects
WHERE sTableName IN ('CONTRACT', 'JOB')

Don't infer the anchor from row-count similarity to the workflow instance count, and don't read it off wf_tran_step.sTablename — that column is commonly blank on a live install. The selection order is ObjectType → registry → confirm the table exists → confirm near-total binding.

Service-contract status has its own decoder — and it isn't universal

For the 22003 cohort, CONTRACT.ISTATUS decodes through the standard ServiceContractStatus enum carried in vSPOL_ServiceContractData: 5 Pending, 6 Approved, 7 Rejected. A new service contract attaches an approval ladder automatically and sits at Pending until that ladder completes; because service contracts post to purchase orders, the ladder typically includes a PO sub-approval, so the meaningful sequence runs SC Approved → PO Approved rather than a single stamp.

Two cautions. First, that 5/6/7 decode is a service-contract decoder — observed live, works-contract rows on the same table carry states outside that set, so applying it to every CONTRACT row will quietly mislabel them. Second, ISTATUS is the record's current state, not its approval trail: it reads Approved whether the ladder just completed or the record was edited afterwards.

Vendor resolution runs CONTRACT.HVENDOR → VENDOR.HMYPERSON, with one correction worth carrying from the VAT round: VENDOR has no SCODE — the vendor code is UCODE. A join written against VENDOR.SCODE fails or returns nothing rather than silently mis-joining. Recurrence lives in CONTRACT.spofrequency, decodable through ServiceContractFrequency (0 Monthly through 6 Weekly), and bindexation marks a contract as renewable.

Approval outcome is a step name plus a completion date

The workflow columns that look like the approval answer mostly aren't. On the engine as observed live, wf_tran_step.dtApprove and dtDeny are unused — zero across the board. A step is actioned when dtComplete is set, and the outcome is encoded in the terminal step's name: "SC Approved", "SC Rejected", "Approved", "Rejected". An open step is one where dtComplete IS NULL and dtCancel IS NULL.

In practice that means the status report joins the instance header for the workflow and the step table for the trail, then reads pending-ness off completion rather than off a flag:

SELECT c.SCODE AS ContractCode,
       CASE c.ISTATUS WHEN 5 THEN 'Pending' WHEN 6 THEN 'Approved' WHEN 7 THEN 'Rejected' END AS ContractState,
       h.sName AS WorkflowName, h.dtAttach, h.dtComplete,
       ws.sName AS StepName, ws.dtComplete AS StepDone
FROM CONTRACT c
  JOIN wf_tran_header h   ON h.hRecord = c.HMY AND h.iType = 22003
  LEFT JOIN wf_tran_step ws ON ws.hTranHeader = h.hMy
WHERE ws.bCurrent <> 0 AND ws.dtComplete IS NULL
ORDER BY h.dtAttach DESC

That returns contracts whose approval is genuinely still open. Swap the step filter for the terminal step and the same query hands you the outcome instead of the backlog.

The JOB budget columns that look right and aren't

One adjacent dead end is worth flagging, because it costs the same half-hour to discover. JOB.cProposedBudget and JOB.cApprovedBudget can read zero on every job on an install — they aren't "no budget set," they're unused columns. The job budget lives in JOBDETL and in the GL, not on the JOB header. A job-budget report written off the header produces a clean, empty-looking result rather than an error, which is the most expensive kind of wrong.

What to carry forward

CONTRACT is a shared master; the ObjectType on the workflow instance is what tells you which kind of contract you're holding, and the registry is what tells you where that ObjectType anchors. Status decoding is per-kind, not per-table. Approval outcomes are step names plus dtComplete, not approve/deny flags. None of this is visible from the schema — CONTRACT carries no column saying "this row is a variation order," and the collision between hRecord values and JOB.HMY only surfaces once you try to locate the anchor by probing.

PropETL's SQL Query Assistant carries it as verified knowledge: the contract-workflow ObjectType map, the service-contract status and frequency decoders, the registry-first anchor protocol, and the collision disambiguation that stops a probe from inventing a relationship that isn't there.

It ships in every tier. Start the free 7-day trial — no credit card — and ask it which ObjectTypes drive your contract approvals before you write the join.

Featured on FoundrListFeatured & Verified on TrustMRRPropETL on PeerPushLaunchpadly Startup DirectoryPropETL — Featured on LaunchBuck