Routing Rules can be exported in JSON format, edited and imported back into ONEiO.
This introduces a couple of rule functions not currently available in the UI, such as MultiValueToSingle and Counters. Furthermore it gives customers the possibility to quickly promote changes from QA to Production environments without the need to contact support.
Routing rules can be exported several ways in the UI
- Inside the rule itself
- From the rule list view
1) From inside the rule
This will export the currently viewed Routing Rule in JSON format as a direct download.
2) From the rule list view
A specific version of a Routing Rule can be exported by either:
- choosing the rule in the list view and selecting "export into file" to export the latest version or
- opening the version submenu, selecting the a version and exporting the rule from the right hand menu.
Important differences on where to import (New rule vs New version)
Rules can be imported in several ways depending on the intended effect.
Do you want to create
- A new rule
- A new version of a rule
Creating a new rule
Importing a rule from the rule list view will create a completely new rule.
Select the "Import" button from the rule list view.
Either "drag & drop" the JSON file into the upload modal, or choose the file from the explorer.
The new rule will not be created right away, instead the rule editor will be presented. This way any issues with the rule can be fixed before saving the new rule.
Creating a new version to an existing rule
Importing the new rule from inside the rule or from the side menu in the rule list view will create a new version of an existing rule.
The rule opens up in "Edit" mode to ensure any issues can be fixed before saving the new rule version. In this example the Entity Type is not set as the JSON file had a typographical error, misspelling the entity type, leaving the field empty.
Fore more information on the structure and settings of the exported JSON please visit this article: