User Guide
10.4 · Templates

Embedded Resources in Templates

A template usually stores line items as references — a line says "labourer hourly rate" by name, and when applied, TX1 tries to match a resource in the current project. Embedded resources bundle the actual resource record (and its built-up breakdowns) inside the template, guaranteeing fidelity.

When to Embed

  • When a template depends on resources your organisation's other projects may not have.
  • When the resources have specific rates you want to land untouched.
  • When you want to port the template to a different organisation or a sharing partner.

What Gets Stored

Field on TemplateEmbeddedResourcePurpose
ResourceDataJsonFull ResourceDto serialised.
BreakdownsJsonList of BuiltUpBreakdownDto — for built-up resources.
ResourceNameDenormalised for search.
ResourceTypeDenormalised.
IsBuiltUpTrue if the resource has a built-up breakdown.
DirectRateSnapshot of rate at time of save.
BreakdownCountFor UI preview.
IsComponentBuilt-up components are tagged so they import first.
ImportOrderControls dependency ordering on apply.
OriginalResourceIdFor provenance / debugging.
SourceProjectIdWhere the resource came from.

Creating a Template with Embedded Resources

  1. Select items using the resources you want to embed.
  2. Save as Template.
  3. Tick Embed Resources.
  4. TX1 walks the items, collects referenced resources (including component resources of built-ups), and bundles them.

Component resources are detected recursively — a built-up "Formwork Package" that depends on "Timber", "Labour" and "Nails" will embed all four.

Applying a Template with Embedded Resources

On Apply you get a conflict dialog:

OptionBehaviour
Skip existingDon't create resources that already exist with the same name. Link to them instead.
RenameCreate fresh resources with a suffix (e.g. " (from template)").
OverwriteReplace existing resource data with the template's snapshot. Warning — this can break unrelated projects.
Fail on conflictCancel the apply if any conflict is detected.

Default is Skip existing.

Dependency Resolution

Embedded resources import in ImportOrder to ensure components exist before the built-ups that depend on them. You never need to think about this manually.

Preview

PreviewTemplateResourceImportAsync returns:

  • List of resources that would be created.
  • List that would be skipped (already exist).
  • List that have a name clash.
  • Warnings.

Embedding Later

You can embed resources into an existing template: Templates → Embed Resources. Useful when a template was created early without embedding, and you now want to share it externally.

Limitations

  • Embedded resources can bloat a template's storage. A template with hundreds of resources is uncommon; consider splitting.
  • Embedded resources are snapshots — updates to the source resource do not flow into the template. Re-embed if you need fresh data.