Prefilling forms
Using query parameters to set default values
Create integrations allow data exchange between third-party apps and Create. One of the benefits of this is support for prefilling forms with data from third-party apps. There are several bespoke integrations to some of the most popular platforms, but Create also offers a default data integration adapter that is used if and only if no other data integration has been set up.
Query parameters
The default adapter enables passing data to Create using query parameters. Consider a template placed inside a unit abcd
with template ID 1234
. In that case, the link to the document generation flow of that template will be https://omnidocs.documotor.ai/units/abcd/documents/create/1234
.
General format
Query parameters can be added to this URL. The general format is:
https://omnidocs.documotor.ai/units/abcd/documents/create/1234?parameter1=value1¶meter2=value2
.
The parameters are, in general, keys of the form fields that should be prefilled, and values are the values that they should be prefilled with. The keys of the form fields can be seen by admins when editing a recipe.
Query parameters can also be used to specify a delivery integration, in which case the query string should start with ?integrationID=[id]
. The integration ID can be viewed in the admin app.
Content type can also be specified, with the key content-type
. This specifies the type of the content that's returned. For example, one can return the JSON data after transformation, or request the document as .pdf
.
Here's an example for returning a JSON:
?integrationId=aaaa1111bbbb2222cccc3333&content-type=application%2Fvnd.omnidocs.transformed-data%2Bjson
.
Updated about 2 months ago