/ Search

Search Epistola

Find documentation, integration guides, tour steps, blog posts and pages.

DocsIntegrationsTourBlogPage
↑↓↵esc

Map Case Data

Connect case information from Valtimo to the fields an Epistola template needs.

Map case data

Mapping tells Valtimo which case information should fill each document field.

Before mapping

Check that the Epistola template has clear fields and realistic examples. If the field list is unclear, fix the template first.

Where the values come from

The mapping is a JSONata expression. It can read these values:

  • $doc: the case data, for example $doc.applicant.name.
  • $pv: the process variables, for example $pv.decision.
  • $case: information about the case itself.
  • $plugin: only $plugin.defaultEnvironmentId, the default environment of the configuration.

An expression without one of these finds nothing. The editor warns you about this.

Map fields

  1. Open the Generate Document action.
  2. Select the template. Valtimo reads the fields from its data contract.
  3. In Simple mode, fill in for each field where its value comes from. Required fields are marked.
    • A new field opens in the visual editor. Type @ and pick the value from the case data or the process variables. Text you type becomes fixed text.
    • To type a JSONata expression, switch the field to the Advanced editor with the button next to it (Switch to Advanced editor).
  4. Use Advanced mode when you need one expression for the whole mapping.
  5. Open Schema & Preview, enter the ID of a realistic case, and run the preview. You see the expected and the produced data, and any required fields that are missing.
  6. Save the process link. Valtimo refuses to save if a required field has no mapping, or if an expression is invalid.

Rich text

If a field expects rich text, say in the Advanced editor of that field in which format the case keeps the text. For example: $richText($doc.explanation, "html"). The format can be "html", "markdown" or "plain". Without this, Epistola refuses the text.

Review with users

Ask a business user to review the document itself, not just the mapping screen. A mapping can be technically valid and still put the wrong value in a sentence.

More detail

See the Valtimo mapping reference for the technical rules.

Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →