Contract Generator

Configuration

Standard contract terms per pipeline, and the Word templates they are merged into. Changes apply to contracts generated from now on — documents already generated keep the wording they were built with.

Colonial Pipeline

Applies to trades whose carrier contains COLONIAL. All terms are the ones that ship with this build.

builder only

The quality standard the product is sold against. `{product}` is replaced with the traded product when "use the traded product" is set. Fills {{Product Quality}}.

builder only

Short name of the specification, as the contract refers to it. Fills {{Quality Spec}}.

builder only

The delivery basis — FOB, PTO, in-situ transfer. Fills {{Delivery Terms}}.

builder only

Standing notes printed under the delivery terms. One per line; each becomes its own line in the document. Fills {{Delivery Notes}}.

in 4 templates

The origin or transfer point. Fills {{Location}}.

builder only

How title moves — pipeline, book transfer, in-system transfer. Fills {{Method of Transfer}}.

builder only

Where title and risk of loss pass from Seller to Buyer. Fills {{Place of Title}}.

setting

On when "Product / quality" contains `{product}` and should be filled with the trade record's product.

Magellan Pipeline

Applies to trades whose carrier contains MAGELLAN, ONEOK. All terms are the ones that ship with this build.

builder only

The quality standard the product is sold against. `{product}` is replaced with the traded product when "use the traded product" is set. Fills {{Product Quality}}.

builder only

Short name of the specification, as the contract refers to it. Fills {{Quality Spec}}.

builder only

The delivery basis — FOB, PTO, in-situ transfer. Fills {{Delivery Terms}}.

builder only

Standing notes printed under the delivery terms. One per line; each becomes its own line in the document. Fills {{Delivery Notes}}.

in 4 templates

The origin or transfer point. Fills {{Location}}.

builder only

How title moves — pipeline, book transfer, in-system transfer. Fills {{Method of Transfer}}.

builder only

Where title and risk of loss pass from Seller to Buyer. Fills {{Place of Title}}.

setting

On when "Product / quality" contains `{product}` and should be filled with the trade record's product.

Buckeye Pipeline

Applies to trades whose carrier contains BUCKEYE. All terms are the ones that ship with this build.

builder only

The quality standard the product is sold against. `{product}` is replaced with the traded product when "use the traded product" is set. Fills {{Product Quality}}.

builder only

Short name of the specification, as the contract refers to it. Fills {{Quality Spec}}.

builder only

The delivery basis — FOB, PTO, in-situ transfer. Fills {{Delivery Terms}}.

builder only

Standing notes printed under the delivery terms. One per line; each becomes its own line in the document. Fills {{Delivery Notes}}.

in 4 templates

The origin or transfer point. Fills {{Location}}.

builder only

How title moves — pipeline, book transfer, in-system transfer. Fills {{Method of Transfer}}.

builder only

Where title and risk of loss pass from Seller to Buyer. Fills {{Place of Title}}.

setting

On when "Product / quality" contains `{product}` and should be filled with the trade record's product.

Contract templates

Which .docx serves each pipeline and role. An upload wins over the file that ships with the build, matched on filename the same way generation matches it — the pipeline's first word and the role, anywhere in the name.

PipelineRoleTemplate in useSource
Colonial Pipeline Buyer COLONIAL Pipeline - Buyer template.docx ships with build
Colonial Pipeline Seller COLONIAL Pipeline - Seller template.docx ships with build
Magellan Pipeline Buyer MAGELLAN Pipeline - Buyer template.docx ships with build
Magellan Pipeline Seller MAGELLAN Pipeline - Seller template.docx ships with build
Buckeye Pipeline Buyer BUCKEYE Pipeline - Buyer template.docx ships with build
Buckeye Pipeline Seller BUCKEYE Pipeline - Seller template.docx ships with build

Word .docx only, up to 10 MB. Name it so it contains the pipeline and the role — for example COLONIAL Pipeline - Seller template.docx. Uploading a file with an existing name replaces it.

Nothing uploaded. Every pipeline is using the template that ships with this build.

Users

Who a contract can be assigned to on the queue. Nobody yet — until someone is added, every trade reads Unassigned and the queue's picker is empty.

Removing someone later leaves their existing assignments alone — the queue shows such a name as no longer on the list rather than silently reassigning their work.

Email recipients

Who the Review tab's Send to Desk, Approved by Desk and Send to Contracts drafts are addressed to, and who is copied when an approved contract is sent to a counterparty. Nobody yet — until addresses are added, those buttons still record the move but have no email to draft.

Group Addressed when To Cc Save
Desk Addressed when Contracts sends a contract over for approval.
Contracts Addressed when the Desk approves a contract, or sends one back with changes.
Counterparty Copied on the approved contract when it is sent to a counterparty. The To line is left blank for the counterparty's own addresses. Left blank — the counterparty's addresses are typed into each draft.

One address per line, or separated by commas. Cc is copied on the draft; it cannot stand in for a To address, so a group with only Cc still has no email to open.

Database connection

Where the queue's trades come from. Configured in the server's .env; this shows what it says and tries it.

Enginemssql
Server10.101.4.8:1433
DatabaseNovumHorizonProduction
UserNovumCopilot
Trade query sql/allegro_trades.sql — the desk's Allegro query, run as a derived table with the queue's date range around it
Queue filter tradetype = Physical Pipe, and a carrier with a template
Sample data off — an outage shows an empty queue, never invented trades
Connects, reads the server version, and checks the trade table and its lookups answer. Errors are reported in the driver's own words.

Queue feed

Today the queue opens on trades from 2026-09-11 to 2026-09-11, measured on the creation date. The Trade Date range on the queue page overrides this for one visit.

Field sources

The Builder prints one of these beside every merge field, naming the system that owes the value. When a field is blank, the chip is what tells you where to go and fix it.

Chip Where it comes from When it is blank
ALG The trade row itself, exported from Allegro into Postgres. The trade was booked without it. It has to be corrected in Allegro — or the column has not been added to the export yet.
DIR The trader named on the trade, matched by name in the users table. No user is named as the trade's trader is. Add them to the users table, or correct whichever of the two names is misspelled.
TPL The pipeline registry and its .docx template — standing wording that is the same on every contract for that pipeline. The pipeline has no such term configured. Set it on this page, under the pipeline it belongs to.
YOU Typed by the drafter on the builder. Nothing upstream supplies it. Nobody has filled it in yet. It is typed on the builder, beside the field itself.

A chip says where a value should come from, not that you are locked out of it. Several fields are editable on the Builder even when a directory owes them — typing there fixes the contract in front of you, fixing the directory fixes every contract after it.