LogoLogo
API Documentation
Current Version
Current Version
  • DecisionRules Documentation
  • DecisionRules Academy
  • API
    • API Introduction
    • API Keys
      • Solver API Keys
      • Management API keys
      • BI API keys
    • Rule Solver API
    • Management API
      • Rule Migration Strategies
      • 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)
  • AI Assistant
    • About Assistant
    • Assistant Setup
      • Gemini Assistant
  • RULES
    • Rules Introduction
    • Rule List
    • Rule Mode
    • Common Rule Features
      • Input & Output Model
        • Simple Editor
        • JSON Editor
      • Test Bench
      • Rule Alias
      • Rule State
      • Versioning
      • Rule Variables
      • Execution Strategy
      • Rule Dependencies
      • Rule Export & Import
        • Rule Export
        • Rule Import
        • Managing Decision Table in Excel/Google Sheets
        • Deprecated Formats: XLSX v.1 and CSV
      • Tags
      • Rule Comparison
        • Decision Table Comparison
        • Decision Tree Comparison
        • Scripting Rule Comparison
      • Rule Lock
      • Teamwork Indicator
      • Event Timeline
    • Data Types & Functions
      • 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
    • Decision Table
      • Table Designer
        • Table Operations
          • Filter Values
          • Valid Values
          • Sorting
      • Binding to Model
    • Decision Tree
      • Tree Designer
    • Workflow
      • Workflow Designer
      • Workflow Nodes Overview
      • Workflow Limits
    • Scripting Rule
      • Custom functions in Scripting Rules
      • Calling external API within ScriptingRules
      • Use Rule Variables in Scripting Rules
      • Call Embedded Rules in Scripting Rules
      • Tips
    • Rule Flow
      • Rule Flow Designer
      • Rule Flow Mapping
      • Rule States in Rule Flow
      • Warnings & Errors
      • Rule Flow Limits
  • SPACE
    • Space Introduction
    • Space Info
    • Dashboard
    • Access
    • API Keys
    • Audit Logs
  • Organization
    • Organization Introduction
    • Organization List
    • Members
    • Teams
    • Spaces
    • Space Roles
    • Policies
    • Statistics
    • Settings
  • Profile
    • Profile Introduction
    • General
    • Dashboard
    • Plans
    • Add-ons
    • Limits
      • Plan Limits Explained
    • Subscriptions
    • Invoices
  • Access
    • Sign Up & Login
    • Invitations & Permissions
    • Single Sign-On (SSO)
  • Business Intelligence
    • Audit Logs
    • Power BI Connectivity
      • 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
  • OTHER DEPLOYMENT OPTIONS
    • Regional Cloud
      • Region Specific API URLs
    • Docker & On-Premise
      • Environment Variables
      • Redis Connection Modes
      • DecisionRules Application
        • Minimal Requirements
        • DecisionRules Server
        • DecisionRules Client
        • DecisionRules Business Intelligence
        • Networking Between Docker Containers
      • Setup Single Sign-On (SSO)
        • Set up Microsoft Entra ID SSO
        • Set up Google SSO
      • 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
      • White Labeling
  • 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
  • Terms & Conditions
    • Terms and Conditions
    • Privacy Policy
    • Service Level Agreement
      • Community Support
      • Standard Cloud (SaaS)
      • Silver SLA
      • Gold SLA
      • Custom SLA
    • Sub-Processor List
  • Product Updates
    • Release Notes
      • Public Cloud
      • On-Premise / Private Cloud
    • Major Updates
      • Changes in Version 1.19.0 (10/2024)
      • Changes in Version 1.20.0 (4/2025)
    • Roadmap
Powered by GitBook
On this page
  • List of Integration functions
  • Solve function (SOLVE)
  • Examples
  • Version
  • Strategy
  • Path
  • Excluded and included condition columns
  • HTTP functions
  • Caching
  • Limits
  • HTTP_GET
  • HTTP_POST
  • HTTP_PATCH
  • HTTP_PUT
  • HTTP_DELETE

Was this helpful?

  1. RULES
  2. Data Types & Functions
  3. Operators and Functions
  4. Functions

Integration functions

Last updated 11 months ago

Was this helpful?

List of Integration functions

  • SOLVE

  • HTTP_GET

  • HTTP_POST

  • HTTP_PUT

  • HTTP_PATCH

  • HTTP_DELETE

Solve function (SOLVE)

The SOLVE function has the ability to call any other rule within your space and retrieve the output of the rule depending on the provided input data.

  • Takes 2 or 3 arguments.

  • The first argument is the rule ID or alias of the rule you would like to call.

  • The second argument is the object containing input data for the rule you are trying to solve.

  • The third optional argument is an object specifying further options like execution strategy, version of the rule or JSON path to the value you want to return.

If you are using alias, make sure it is unique in your space, otherwise the solve will fail.

Note that when specifying the input data object, you can take advantage of our notation to specify dynamical values in your data.

SOLVE("rule-id", {"foo":"bar"})

SOLVE("rule-alias", {"foo":"bar"})

SOLVE("rule-id",
    {"foo":"bar"}, 
    {"version": "1","strategy":"FIRST_MATCH","path":"person.name"}
)

Examples

The below provided decision table contains examples for the SOLVE function. Import the decision table to your space to review them. For the examples to actually work, you will also need to import another decision table which will be called via the SOLVE function. This dependent table is also provided below.

Take care to import the following dependent table only once, otherwise the provided examples will not work. For the SOLVE function to work, it must be given rule ID or a unique alias.

Version

Defines the version of the rule you want to call. If not specified, the SOLVE function calls the latest published version.

Strategy

If you are solving a decision table, you can use the strategy option to specify one of the existing execution strategies. The allowed values are as follows.

STANDARD
ARRAY
FIRST_MATCH
EVALUATE_ALL

Path

The path option allows you to reach for a value inside the output data returned when the desired rule is solved. It takes a string specifying the JSON path to the value you want to retrieve. For example, suppose that the output of the rule is the following.

[
    {
        person: {
            name: "Joe" 
        }
    }
]

Then you can use "path":"person.name". As a result, your solve function will only return

"Joe"

and not the whole object above. Therefore, the path option is handy when you want to get just a small portion of the output.

First Match

The the path option behaves as expected with the First Match strategy. It reaches inside the returned output object, as shown in the example above.

Standard and Evaluate All

For these strategies, the output is an array that may contain more than one element with output data, depending on how many (passing) rows you have in your decision table.

The path will always look into the first element of the array. For example, if the whole output of the called table is

[
    {
        person: {
            name: "Joe" 
        }
    },
    {
        person: {
            name: "Jane" 
        }
    }
]

and we use "path":"person.name", the solve function will simply return

"Joe"

and it will ignore the other matched rows.

Array

In case of the Array Strategy, the output data take another form. They may look for example as follows.

[
    {
        person: {
            name: ["Joe","Jane"] 
        }
    }
]

By using "path":"person.name", we tell the SOLVE function to unpack the name attribute for us, and it will return

["Joe","Jane"]

Therefore, if you are interested in an array of values where each value comes from one of the outputted rows of the solved decision table, you may use the SOLVE function with the Array Strategy and the path option.

Excluded and included condition columns

SOLVE("plant-items",{data},
{"strategy":"ARRAY","path":"name","excludedConditionCols":["group"]}
)

HTTP functions

These functions allow you to send an HTTP request to an external API, with using any of the HTTP methods. Before we describe the individual functions and their syntax, we provide some general information on how the functions work.

Caching

Calling an external API always takes some time. To minimize the effect on the overall execution time of the rule, the rule solver automatically caches the responses. If you use an HTTP function exactly once in your rule, caching does not do anything. However, if you use the same HTTP function with the same arguments on multiple places in your rule, the request is sent upon evaluation of the first occurrence of the HTTP function, and the response is cached. Then, when another occurrence of the same function with the same arguments is encountered, the HTTP request is not sent again, but rather instantly read from the cache.

For example, imagine that you use the function

HTTP_GET("my.api.com")

in every cell within one row of your decision table. If you have 10 rows, there will be overall 10 identical functional expressions including this expression. When the decision table is solved, the solver first encounters this function on row 1 and sends the GET request. It waits for the response, and when it arrives, it continues the evaluation. Each time it encounters the same function again (on row 2, 3, 4, ...), it uses the data from the first call. Therefore, the actual HTTP call only happens once.

Now imagine you add a new column with another HTTP function in every cell of that column, e.g.

HTTP_GET("another.api.com")

The solver will now also have to evaluate many HTTP functions, but now there are two kinds of them, one using my.api.com, another using another.api.com. When solving the given decision table, the solver will send a request to the external API upon the first occurrence of each of the two different HTTP functions, therefore waiting only for 2 requests. All other results of the HTTP functions will be drawn from the cache.

Limits

Note that there may be a limit on the allowed number of HTTP functions in a rule. In general, the limit depends on your plan.

HTTP_GET

HTTP_GET function can perform classic GET request with given URL. HTTP_GET returns JSON object of called API.

Syntax

The HTTP_GET function syntax has the following arguments:

  • URL - Required. Target url.

  • OPTIONS - Optional. Object of optional arguments that can enhance HTTP request. Only available options at this moment is headers object that can contain custom request headers that are appended to request before sending.

Examples

1) HTTP_GET without options

HTTP_GET("my.api.com")

2) HTTP_GET with options

HTTP_GET("my.api.com", {"headers": {"X-DEMO": "1"}})

HTTP_POST

HTTP_POST function can perform classic POST request with given URL and request DATA. HTTP_POST returns JSON object of called API.

Syntax

The HTTP_POST function syntax has the following arguments:

  • URL - Required. Target url.

  • DATA - Required. Request body as valid JSON object.

  • OPTIONS - Optional. Object of optional arguments that can enhance HTTP request. Only available options at this moment is headers object that can contain custom request headers that are appended to request before sending.

Examples

1) HTTP_POST without options

HTTP_POST("my.api.com", {"foo":"bar"})

2) HTTP_POST with options

HTTP_POST("my.api.com", {"foo":"bar"}, {"headers": {"X-DEMO": "1"}})

HTTP_PATCH

HTTP_PATCH function can perform classic PATCH request with given URL and request DATA. HTTP_PATCH returns JSON object of called API.

Syntax

The HTTP_PATCH function syntax has the following arguments:

  • URL - Required. Target url.

  • DATA - Required. Request body as valid JSON object.

  • OPTIONS - Optional. Object of optional arguments that can enhance HTTP request. Only available options at this moment is headers object that can contain custom request headers that are appended to request before sending.

Examples

1) HTTP_PATCH without options

HTTP_PATCH("my.api.com", {"foo":"bar"})

2) HTTP_PATCH with options

HTTP_PATCH("my.api.com", {"foo":"bar"}, {"headers": {"X-DEMO": "1"}})

HTTP_PUT

HTTP_PUT function can perform classic PUT request with given URL and request DATA. HTTP_PUT returns JSON object of called API.

Syntax

The HTTP_PUT function syntax has the following arguments:

  • URL - Required. Target url.

  • DATA - Required. Request body as valid JSON object.

  • OPTIONS - Optional. Object of optional arguments that can enhance HTTP request. Only available options at this moment is headers object that can contain custom request headers that are appended to request before sending.

Examples

1) HTTP_PUT without options

HTTP_PUT("my.api.com", {"foo":"bar"})

2) HTTP_PUT with options

HTTP_PUTH("my.api.com", {"foo":"bar"}, {"headers": {"X-DEMO": "1"}})

HTTP_DELETE

HTTP_DELETE function can perform classic GET request with given URL. HTTP_DELETE returns JSON object of called API.

Syntax

The HTTP_DELETE function syntax has the following arguments:

  • URL - Required. Target url.

  • OPTIONS - Optional. Object of optional arguments that can enhance HTTP request. Only available options at this moment is headers object that can contain custom request headers that are appended to request before sending.

Examples

1) HTTP_DELETE without options

HTTP_DELETE("my.api.com")

2) HTTP_DELETE with options

HTTP_DELETE("my.api.com", {"headers": {"X-DEMO": "1"}})

Their effect is described at the page.

If you are calling a decision table, note that the path option will have different effect for different . Below, we will describe the behavior for each of them in detail.

If you need some more complex transformation of the output data, you may be able to perform it with the help of or .

When you are calling a decision table with the SOLVE function, you can specify the excluded and included condition columns within the options object. These work the same way as in the options.

Within On-premise / Docker, the default limit is 100 HTTP functions per rule. Nevertheless, it can be set arbitrarily by the environment variable.

Functions in JSON
Execution Strategy
execution strategies
Data Functions
Array Functions
Solver API
DT_HTTP_CALL_LIMIT
37KB
Solve_Example_v1.json
9KB
Plant_Items_Example_v1.json