Add a party to a template.
Use this tool when:
- The user wants to add a party (e.g. a counterparty, customer, or employer) to a template
- You are building up a template and need parties before adding signatories or signature blocks
There are two ways to add a party:
- Internal (saved) party: send `account_party_uuid` (from list-account-parties) together with `reference`. No other
fields may be sent in this case.
- External party: send `reference` and `scope`, and optionally `entity_name` and `address`.
The two names on a party say different things:
- `reference` is the generic label for the party's role on the template (e.g. "Employer", "Customer"), and stays
the same for every document made from it.
- `entity_name` is the name of the legal entity itself: a company's name ("Acme GmbH") or, when the party is an
individual rather than an organisation, that person's name. On a template it is usually only known for the
account's own side; a counterparty's is filled in per document, so leave it out rather than inventing one.
To render the party's details inline in the template text, reference the returned `ref_uuid` in the body
(via replace-template-content) as:
<span data-party data-ref-uuid="<party ref_uuid>" data-format="name"></span>
where `data-format` selects what is rendered: "name" (the party's entity/company name), "reference" (its
reference label), "address", or "address:inline". A data-format is required.
Note: adding a party does not, by itself, give that party anywhere to sign. If the party is meant to sign documents
created from the template, follow up with create-template-signature-block for the party — and remember that the
signature block must in turn be placed in the template content (via replace-template-content) inside a signature
container, `<div data-signatures><span data-signature-block data-ref-uuid="..."></span></div>`, before it will appear on any
document.