LogoLogo
API Documentation
Version 1.19.5 and Older
Version 1.19.5 and Older
  • DecisionRules Documentation
  • API
    • API Introduction
    • API Keys
      • Solver API Keys
      • Management API keys
      • BI API keys
    • Rule Solver API
    • Management API
      • Deprecated Endpoints
    • Console Logs API
    • Business Intelligence API
      • Deprecated Endpoints
    • Datacenters & Locations
      • Global Cloud
      • Regional Cloud
    • Apache Kafka Solver API
    • Endpoint Settings
    • Archive
      • Rule Flow Solver API (DEPRECATED)
  • Decision tables
    • Decision Tables Introduction
    • Table Designer
    • Input & Output JSON Model
      • Simple Editor
      • JSON Editor
      • Binding to Model
    • Supported Data Types
    • Operators and Functions
      • Basic operators
      • Date operators
      • Functions
        • Logical Functions
        • Math Functions
        • Date and Time Functions
        • Text Functions
        • Data Functions
        • Array Functions
        • Integration functions
        • Functions and JSON
    • Export & Import of Decision Tables
      • Export Decision Table
      • Import Decision Table
      • File Structure of JSON Format
      • Managing Decision Table in Excel/Google Sheets
      • Deprecated Formats: XLSX v.1 and CSV
    • Table Operations
      • Filter Values
      • Valid Values
      • Sorting
  • Decision Trees
    • Decision Trees Introduction
    • Decision Tree Designer
    • Export & Import Decision Trees
      • Export Decision Tree
      • Import Decision Tree
  • Scripting Rules
    • Scripting Rule Introduction
    • Custom functions in Scripting Rules
    • Calling external API within ScriptingRules
    • Use Rule Variables in Scripting Rules
    • Call Embedded Rules in Scripting Rules
    • Export & Import Scripting Rules
      • Export Scripting Rule
      • Import Scripting Rule
    • Tips
  • Rule Flow
    • Rule Flow Designer
    • Rule Flow Mapping
    • Rule States in Rule Flow
    • Warnings & Errors
    • Rule Flow Limits
    • Export & Import Rule Flows
      • Export Rule Flow
      • Import Rule Flow
  • Workflow
    • Workflow Introduction
    • Workflow Designer
    • Workflow Nodes Overview
    • Workflow Limits
  • Other
    • Rule Alias
    • Execution Strategy
    • Rule State
    • Rule Versioning
    • Favorite Rules
    • Rule Variables
    • Rule Comparison
      • Decision Table Comparison
      • Decision Tree Comparison
      • Scripting Rule Comparison
    • Rule Tags
    • Rule Dependencies
    • Test Bench
    • Single Sign-On (SSO)
    • Event timeline
    • Rule Lock
    • Rule Migration Strategies
    • Changes in Version 1.19.0 (10/2024)
  • Organizations
    • Introduction
      • Access to Organization
    • Structure
      • Organization Roles
      • Members
      • Teams
      • Spaces
      • Space Roles
      • Policies
      • Settings
  • Teamwork
    • Dashboard
    • Folders
    • Spaces
    • Manage Spaces
    • Share Rules Between Spaces
    • Users & Roles
    • Teamwork Indicator
  • SDK and Integrations
    • Languages / Frameworks
      • SQL Server
      • Oracle PL/SQL
      • PostgreSQL
      • JavaScript
      • Java Spring Example
      • PHP Library
      • Python Library
      • .NET Library
      • Google Tag Manager
    • Excel Add-in
  • Business Intelligence
    • Audit Logs
    • Create a Power BI Report
    • Connect Power BI to Business Intelligence API
    • Connecting from Power BI (deprecated)
    • Connect DecisionRules to Power BI Using Our Custom Connector
  • Billing
    • Invoices & Billing
    • Change Product Plan
    • Billing Information
    • Plan Limits Explained
  • Regional Cloud
    • Regional Cloud
    • Region Specific API URLs
  • On-Premise / Docker
    • Environment Variables
    • Redis Connection Modes
    • Setup Single Sign-On (SSO)
      • Set up Microsoft Entra ID SSO
      • Set up Google SSO
    • DecisionRules Application
      • Minimal Requirements
      • DecisionRules Server
      • DecisionRules Client
      • DecisionRules Business Intelligence
      • Networking Between Docker Containers
    • Docker Showcase App
      • Showcase
      • Showcase + Business Intelligence
    • AWS Setup
      • AWS ECS/Fargate
      • Cache - Amazon ElastiCache
    • Microsoft Azure Setup
      • Database - Azure CosmosDB
      • Cache - Azure Cache for Redis
      • Azure Container Apps
    • Azure Red Hat OpenShift
    • Google Kubernetes Engine (GKE)
    • Kubernetes Setup
      • Kubernetes Setup with Business Intelligence
    • Logging options
    • CD/CI Pipelines
      • Azure DevOps CICD Pipelines
      • Using Migration script (old way)
    • Offline License
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
    • Service Level Agreement
      • Community Support
      • Standard Cloud (SaaS)
      • Silver SLA
      • Gold SLA
      • Custom SLA
    • Sub-Processor List
  • Roadmap 🚲 🗺️
  • Release Notes
    • Public Cloud
    • On-Premise / Private Cloud
Powered by GitBook
On this page

Was this helpful?

  1. Decision Trees

Export & Import Decision Trees

Was this helpful?

File Structure of JSON format

Imported & Exported files need to have some mandatory structural information:

  • name: name of the decision tree

  • description: description of the decision tree

  • type: type of the decision tree

  • status:

  • inputSchema: input schema of the decision tree

  • outputSchema: output schema of the decision tree

  • nodes: rules of the decision tree

Type: there are two types:

  • "decision-table" - for decision tables

  • "decision-tree" - for decision trees

  • "complex-rule" - for scripting rules

Minimal File Structure Example:

{
    "name": "",
    "description": "",
    "type": "",
    "status": "",
    "inputSchema": {
    },
    "outputSchema": {
    },
    "nodes": []
}

File Structure Example:

{
    "type": "decision-tree",
    "name": "Sample Tree",
    "description": "Sample Decision Tree description",
    "inputSchema": {
        "package": {
            "weight": {}
        }
    },
    "outputSchema": {
        "price": {},
        "currency": {},
        "deliveryInHours": {}
    },
    "status": "published",
    "tags": [],
    "nodes": [
        {
            "id": "eb9c8cdf-f1a4-e22b-7a78-9956dfc51f32",
            "operandText": "If",
            "type": "if",
            "nodes": [
                {
                    "id": "12680fa0-4269-f594-05f5-7fb41ff66aec",
                    "type": "condition",
                    "scalarCondition": {
                        "operator": "between",
                        "value": [
                            "10",
                            "30"
                        ],
                        "type": "general"
                    },
                    "modelVariablePath": "package.weight"
                },
                {
                    "id": "ba6cef9b-9e3f-9d17-9348-4b5ffdb2811b",
                    "operandText": "Then",
                    "type": "then",
                    "nodes": [
                        {
                            "id": "77dec4e9-0f42-a752-266a-8f5ea0611971",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "28",
                                "type": "common"
                            },
                            "modelVariablePath": "price"
                        },
                        {
                            "id": "f8cc604e-b453-fb35-5594-5e98eaae1743",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "USD",
                                "type": "common"
                            },
                            "modelVariablePath": "currency"
                        },
                        {
                            "id": "433b7386-2389-d2a5-45c0-e87f50bbe3e9",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "24 Hours",
                                "type": "common"
                            },
                            "modelVariablePath": "deliveryInHours"
                        }
                    ]
                }
            ]
        },
        {
            "id": "e899c5ab-20cd-ce60-6cd8-ca1d2c19a27d",
            "operandText": "Else",
            "type": "else",
            "nodes": [
                {
                    "id": "505af7be-7c5d-710c-b303-6b094a758653",
                    "operandText": "Then",
                    "type": "then",
                    "nodes": [
                        {
                            "id": "b38ba39e-34ae-4957-d6ce-5ca937ef4076",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "99",
                                "type": "common"
                            },
                            "modelVariablePath": "price"
                        },
                        {
                            "id": "1834f163-48b7-c982-923a-98db7849ddc3",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "USD",
                                "type": "common"
                            },
                            "modelVariablePath": "currency"
                        },
                        {
                            "id": "ec058c7a-6d7b-79f5-727c-6120f331c835",
                            "type": "result",
                            "outputScalarValue": {
                                "value": "48 Hours",
                                "type": "common"
                            },
                            "modelVariablePath": "deliveryInHours"
                        }
                    ]
                }
            ]
        }
    ],
    "auditLog": {
        "active": false,
        "debug": {
            "active": false
        },
        "ttl": 14
    },
    "createdIn": "2023-01-09T15:22:58.235Z",
    "lastUpdate": "2023-01-09T15:23:35.840Z",
    "ruleAlias": "hollow-roundworm"
}
status of the decision tree