Data flow for document generation
Which data is passed to Create to generate a document
A document is generated based on the recipeId
, unitId
and a JSON representation of the filled out form belonging to the document.
Create needs the following data to generate a document from a recipe:
recipeId
- Identifies the recipe that will generate the desired document.
unitId
- Identifies the unit that contains the needed recipe.
- JSON representation of the filled out form belonging to the document.
- When the user fills out a form, the data that they entered is represented as JSON in order to be passed to the recipe. This allows the data to be passed without user input as well.
Example JSON representation of a form
Here's an example of a form with the text fields filled out, and how that form is passed to the engine to generate a document:

A filled out form.
{
"Name": "Jane Doe",
"Status": "DeclinedIdentifier",
"$Create-StatusContent": {
"Reason": "Bad fit",
"Message": "StandardRejectionIdentifier",
"$Create-MessageContent": {
"TextContent": "We regret to inform you..."
}
}
}
In the JSON representation of the filled-out form, each form component is represented as a key-value pair componentId: response
. Components that insert a text or slide element are called reference components, and their response
value is the base64
representation of the element.
Reference components additionally have a $Create-ComponentIdContent
key following the property representing them. The value assigned to $Create-ComponentIdContent
is the JSON representation of the form belonging to the referenced text element.
Updated 7 months ago