Changes data

quotecloud_convert_data_item_placeholders

Convert {{Label}} placeholders in a document’s text blocks, table cells and header or footer blocks into real merge-field references. A placeholder is the text {{Label}} in a text block, a table cell, or a header or footer block, where Label is the exact label (case-sensitive) of a data item on the document or of a system item such as Document ID, Document Title, Your Company Name or Recipient First Name: list them with quotecloud_list_custom_data_definitions (connection document, includeSystemItems true). Each placeholder becomes the merge-field node the renderer resolves. If any placeholder matches no item, or matches more than one (a short system label such as First Name or Company Name belongs to both the sender and the recipient; use the item’s uniqueLabel, such as Recipient First Name or Recipient Company Name), the whole call is refused and nothing is written. With placeholders, only the listed labels are converted and other placeholders are left as they are. Markup and existing merge fields are never touched. All-or-nothing: any refusal leaves the document unchanged, and the response lists every converted label with its reference id and count. Works in either contentMode; a data_file_blob document is rewritten in storage with the usual version snapshot. Acquires the editor lease and the structure lock. Requires documents:write and only runs when documents.edit is enabled; on a template also templates.contentEdits and manageDocumentTemplates. Not dangerous: no confirmation is required.

Inputs

documentIdRequired
Convex document ID or company-scoped numeric display ID. string
lockTokenRequired
Stable opaque token for this agent edit session. Reuse it to heartbeat owned element locks. string
placeholdersOptional
Labels to convert (without braces). Omit to convert every placeholder in the document. list of string