Search Knowledge Base by Keyword

JSON Integrations

No Code JSON Integrations

The new JSON Integration feature exponentially increases the integration capabilities between Legito and any third party software.

With the JSON Integration feature, it is possible to create new Documents from Templates based on data from received JSON files with no coding required.

JSON Integrations Administration

Your Workspace can have multiple JSON Integrations.

Users can manage JSON Integrations in the JSON Integrations section of the Workspace Settings area.

New JSON Integration can be added by clicking on the Create button in the upper right corner.

Legito_release_2022-09-22

Before a JSON Integration is created, the user has to insert at least the name, upload a JSON file for the purposes of the no code JSON Integration Editor, and select the Template Suite from which a Document (or Document Bundle) shall be created. It is also possible to insert a description of the integration.

JSON Integration Editor

JSON Integration Editor opens when a user clicks the Edit button in the administration.

The JSON Integration Editor is similar to the Workflow Editor. The content of the example of a JSON file is displayed in the main area. The right bar contains either JSON Integration settings or JSON Object settings.

JSON Integration settings

  • Integration Trigger
  • Assigned Template Suites and their triggers
  • Versioning

JSON Object settings

  • Matching the JSON Object to an Element or Document Settings
  • Data Transformations of the JSON Object when used in a Template Suite
  • Filtering of sub-objects (array) for the purposes of a Template Suite
  • Ordering of sub-objects (array) for the purposes of a Template Suite
  • Application of the JSON Object in a Template Editor

Versions

Similar to other Legito areas such as Workflows, Templates, or Scripts, each JSON Integration contains two types of versions: (a) Drafts that are available only for purposes of testing, and (b) Published version that are used for common creation of Documents from Templates. Draft version is created when a user clicks the Save button. Published versions are created when a user clicks the Publish button.

It is also possible to go back to any previous version.

Conditional Triggering of a JSON Integration

Each JSON Integration has 3 ways to identify if that JSON Integration will be used when the Workspace receives a JSON file:

  • String: JSON Integration will be used if the JSON file contains defined unique string

  • Conditions: For more complex use cases, it is possible to define a condition based on the content of a received JSON file and if the condition is met, the JSON Integration will be used

  • None: In this case, the ID of the JSON Integration has be to contained in the REST API call (details below)

Matching JSON Objects and Template Elements

Similar to Import from a Sheet and Import from a Legito Document, it is possible to match each JSON Object to an Element in the assigned Template Suite to populate the a value from a JSON file to the content of a Template.

Additionally, it is possible to set other Document Settings such as an Owner according to a value of the JSON Object.

In addition to selecting the Template and its certain Element, it is possible to insert a System Name.

Matching arrays from JSON with repeated content of Templates

Tick the checkbox “Use in repeated content” to populate values from arrays in the JSON file to repeated Elements and Clauses in the assigned Template Suite. Values from instances in such an array will be then populated to instances of the released Clauses or Elements. For example, the first instance of the array will be populated in the first repeated Clause, the second instance to the second Clause and so on.

Filtering

It is possible to filter instances of an array in the JSON file and populate only the instances that meet the filtering criteria.

Sorting

It is possible to reorder instances of an array according to a selected attribute either ascending or descending.

Data Transformations

Advanced use cases may require transformation of data from JSON before they are inserted into Templates. The JSON Integration Editor contains several types of popular data transformations, for example, transform a URL address to an image that is placed on the URL address and insert an image to the Document instead of a URL address.

Connecting JSON Integration with multiple Template Suites

It is also possible to assign multiple Template Suites to one JSON Integration.

In case there are at least 2 Templates Suites assigned to the same JSON Integration, users have to set conditional logic to determine which of the Templates Suites will be used. Only one Template Suite can be triggered from one JSON file. Features described in the “Conditional Triggering of a JSON Integration” section above are also applicable for triggering Template Suites.

Other JSON Editor Features

Search within the content of the example JSON file uploaded to the JSON Integration.

Undo and Redo actions in the Template Editor.

Auto-matching of JSON Objects and Template Suite Elements based on an exact match between the name of the objects and system name of Elements.

REST API

JSON files are sent to Legito using our REST API (supported from version 6). 

Limitations

Too large JSON files – if there are a lot of JSON Integrations and the Integration ID is not contained in the REST API call.