Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • Getting Started
  • Administrator documentation
  • Functional characteristics
  • Technology description
  • System requirements
  • Admin Panel
  • Platform installation
  • Platform configuration
  • Platform maintenance
  • Custom channels guide
    • Overview
    • Creating and configuring a channel
    • Entity field configuration
    • Template language
    • Entities
    • Pipes
      • Pipe: Basic Concepts
      • Result
      • Errors
      • Log
      • Pack
      • Unpack
      • HTTP Request
      • Store Set
      • Store Get
      • Selector
      • SQL
      • Eventer
      • Scheduler
    • Pipelines
  • Extra
  • Processing HTTP/HTTPS traffic
  • Administrator API
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Custom channels guide
  • Pipes
  • Selector
Documentation for version v72

Selector

Description​

Selector the pipe redirects events to different pipes based on the condition.

Peculiarities:

  • If none of the conditions from params.outs are met, the event will go to outs.success (if one is specified).

Structure​

FieldType of valueExampleRequiredDescription
idnumber10yesPipe's ID
typestring"selector"yesType of a pipe
paramsSelectorParamsObject
noType-specific parameters
outsOutsObject
noPipe's outputs

SelectorParamsObject
FieldTypeExampleReqieredDefaultDescription
outsarray (SelectorOutsObject)yes-Array of outputs with conditions

SelectorOutsObject
FieldTypeExampleReqieredDefaultDescription
query

string

"($template.show_push = true)"yes-JsonQL query that should return true or false
outnumber15yes-

ID of the pipe to which the event will go if the query is completed successfully.


Errors​

  1. Error processing params.outs.query.

  2. Error executing JsonQL query.

Examples​

  1. {
    "id": 15,
    "type": "selector",
    "params": {
    "outs": [
    {
    "query": "('$template.show_push' = 'true')",
    "out": 102
    },
    {
    "query": "('$template.show_push' = 'false')",
    "out": 103
    }
    ]
    },
    "outs": {
    "success": 104,
    "error": 105
    }
    }
  2. {
    "id": 15,
    "type": "selector",
    "params": {
    "outs": [
    {
    "query": "('$in.data.status' = 'success')",
    "out": 26
    },
    {
    "query": "('$in.data.status' = 'error')",
    "out": 27
    }
    ]
    }
    "outs": {
    "success": 28,
    "error": 29
    }
    }
Last updated on Jan 26, 2023
Previous
Store Get
Next
SQL
  • Description
  • Structure
  • Errors
  • Examples
© 2015 - 2025 Altcraft, LLC. All rights reserved.