Flow defaults
Flow platform defaults¶
For flows, the platform defines a set of default types and variants for both the flow nodes and links. The following is an overview of all base types and variants in the platform.
omit_types: []
omit_variants: []
types:
- caption: Next node
custom_variables: []
kind: link
manual_link:
priority: 1000
schema:
properties: {}
type: object
type: next
ui_schema:
- caption: Labelled choice
custom_variables: []
kind: link
manual_link:
priority: 1100
schema:
additionalProperties: false
properties:
dtmf:
enum:
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '0'
- '*'
- '#'
title: DTMF Key
type: string
intent:
pattern: ^[a-z][a-zA-Z0-9_]*$
title: Intent
type: string
label:
$ref: '#/definitions/__i18nstring'
title: Label
required:
- label
type: object
type: labelled
ui_schema:
intent:
ui:widget: intent_picker
label:
ui:field: i18n
ui:order:
- label
- intent
- dtmf
- caption: Dialog trigger
custom_variables: []
kind: link
manual_link:
priority: 1200
schema:
additionalProperties: false
properties:
intent:
pattern: ^[a-z][a-zA-Z0-9_]*$
title: Intent
type: string
system_dialog:
enum:
- unknown
title: System dialog
type: string
type: object
type: trigger
ui_schema:
intent:
ui:widget: intent_picker
ui:order:
- intent
- system_dialog
- caption: Condition
custom_variables: []
kind: link
manual_link:
priority: 1300
schema:
additionalProperties: false
properties:
condition:
title: Condition
type: array
label:
title: Label
type: string
required:
- condition
type: object
type: condition
ui_schema:
condition:
ui:field: flow_condition
ui:order:
- condition
- label
- caption: Entrypoint
custom_variables: []
kind: node
manual_link:
priority: 1000
schema:
additionalProperties: false
properties:
frontends:
items:
type: string
title: Channels
type: array
guard:
title: When
type: array
type: object
type: entry
ui_schema:
frontends:
ui:field: frontend_picker
guard:
ui:field: flow_condition
ui:order:
- frontends
- guard
- caption: Say
custom_variables: []
kind: node
manual_link:
priority: 1100
schema:
additionalProperties: false
properties:
text:
$ref: '#/definitions/__i18nstring'
title: Text
required:
- text
type: object
type: say
ui_schema:
text:
ui:field: speechmarkdown
ui:widget: autosize_textarea
- caption: Ask
custom_variables: []
kind: node
manual_link:
priority: 1200
schema:
additionalProperties: false
properties:
assign:
pattern: (?!^(?:answer|message|bot|dialog|user|conversation|event)$)^[a-z][a-zA-Z0-9_]*(.[a-z][a-zA-Z0-9_]*)*$
title: Assign to
type: string
remember:
title: Remember
type: boolean
repeat_text:
$ref: '#/definitions/__i18nstring'
title: Try again
text:
$ref: '#/definitions/__i18nstring'
title: Question
required:
- text
type: object
type: ask
ui_schema:
assign:
ui:placeholder: answer
repeat_text:
ui:field: i18n
ui:widget: autosize_textarea
text:
ui:field: i18n
ui:widget: autosize_textarea
ui:order:
- text
- repeat_text
- assign
- remember
- caption: Show
custom_variables: []
kind: node
manual_link:
priority: 1300
schema:
properties:
caption:
$ref: '#/definitions/__i18nstring'
title: Caption
url:
format: uri
title: Media URL
type: string
required:
- url
type: object
type: show
ui_schema:
caption:
ui:field: i18n
- caption: Send
custom_variables: []
kind: node
manual_link:
priority: 1400
schema:
properties:
message:
title: Message
type: string
subject:
title: Subject
type: string
type: object
type: send
ui_schema:
message:
ui:widget: autosize_textarea
ui:order:
- subject
- message
- caption: Escalate
custom_variables: []
kind: node
manual_link:
priority: 1700
schema:
additionalProperties: false
properties:
message:
title: Help message
type: string
tag:
title: Tag
type: string
required:
- message
type: object
type: escalate
ui_schema:
message:
ui:widget: autosize_textarea
ui:order:
- tag
- message
- '*'
- caption: Control flow
custom_variables: []
kind: node
manual_link:
priority: 1800
schema:
additionalProperties: false
properties: {}
type: object
type: control_flow
ui_schema:
- caption: Dial
custom_variables: []
kind: node
manual_link:
priority: 1900
schema:
additionalProperties: false
properties:
number:
title: Number
type: string
sip:
default: invite
enum:
- invite
- refer
title: SIP
type: string
required:
- number
- sip
type: object
type: dial
ui_schema:
number:
ui:widget: phone_number
sip:
ui:options:
inline: true
ui:widget: radio
ui:order:
- number
- sip
- '*'
variables:
bot:
properties:
locale:
description: The primary language of the bot
title: Bot language
type: string
purpose:
description: The purpose description of the bot
title: Purpose
type: string
title:
description: The title of the bot
title: Bot
type: string
type: object
user:
properties:
email:
description: The user's email address
title: Email address
type: string
writeable: true
first_name:
description: The user's first name
title: First name
type: string
writeable: true
last_name:
description: The user's last name
title: Last name
type: string
writeable: true
locale:
description: The user's preferred language
title: Language
type: string
writeable: true
phone:
description: The user's phone number
title: Phone number
type: string
writeable: true
type: object
variants:
- caption: Main
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: entry
type_ui_schema:
ui_schema:
ui_template: ''
variant: default
- caption: Unknown
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1100
schema:
type: entry
type_ui_schema:
ui_schema:
ui_template: ''
variant: unknown
- caption: Root
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1200
schema:
type: entry
type_ui_schema:
ui_schema:
ui_template: ''
variant: root
- caption: Intent
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1300
schema:
additionalProperties: false
properties:
intent:
pattern: ^[a-z][a-zA-Z0-9_]*$
title: Intent
type: string
required:
- intent
type: object
type: entry
type_ui_schema:
ui_schema:
intent:
ui:options:
intents_type: global
ui:widget: intent_picker
ui:order:
- intent
ui_template: ''
variant: trigger
- caption: DTMF
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1400
schema:
additionalProperties: false
properties:
dtmf:
enum:
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '0'
- '*'
- '#'
title: DTMF Key
type: string
required:
- dtmf
type: object
type: entry
type_ui_schema:
ui_schema:
ui:order:
- dtmf
ui_template: ''
variant: dtmf
- caption: Timeout
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1500
schema:
type: entry
type_ui_schema:
ui_schema:
ui_template: ''
variant: timeout
- caption: Closed
custom_variables: []
generator_template: ''
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1500
schema:
type: entry
type_ui_schema:
ui_schema:
ui_template: ''
variant: closed
- caption:
custom_variables: []
generator_template: |
say {{ say.text | as_string }}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: say
type_ui_schema:
ui_schema:
ui_template: ''
variant: default
- caption: Choice
custom_variables: []
generator_template: |
ask [{{ ask.text | as_string -}}
{%- if ask.repeat_text -%}, {{ask.repeat_text | as_string-}}{%- endif -%}
]
{%- if node.out.labelled -%}, expecting: [
{%- for link in node.out.labelled -%}
entity(return: {{ link.labelled.label | as_string }}, label: {{ link.labelled.label | as_string }}, match: json_build({{ link.labelled.label | as_string }})),
{%- endfor -%}
]
{% endif %}
{% if ask.assign %}
{{ ask.assign }} = answer.text
{% if ask.remember %}remember {{ ask.assign }}{% endif %}
{% endif %}
{% if node.out.labelled %}
branch answer do
{% for link in node.out.labelled %}
{{ link.labelled | as_trigger }} ->
{{ link | goto }}
{% endfor %}
end
{% endif %}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
- type: labelled
- type: trigger
priority: 1000
schema:
type: ask
type_ui_schema:
ui_schema:
ui_template: ''
variant: default
- caption: Open question
custom_variables: []
generator_template: |
{% if ask.assign %}{{ ask.assign }} = {% endif -%}
ask {{ ask.text | as_string }}
{% if ask.assign and ask.remember %}
remember {{ ask.assign }}
{% endif %}
{{ node | goto_next}}
kind: node
links:
manual_link:
omit:
- repeat_text
omit_variables: []
out_links:
priority: 1100
schema:
type: ask
type_ui_schema:
ui_schema:
ui_template: ''
variant: open
- caption: Prompt
custom_variables: []
generator_template: |
prompt {{ ask.text | as_string }}
{% for link in node.out.labelled %}
dialog trigger: {{ link.labelled | as_trigger }}, label: {{ link.labelled.label | as_string }} do
{{ link | goto }}
end
{% endfor %}
{% for link in node.out.trigger %}
{% assign t = link.trigger %}
dialog {% if t.system_dialog %}__{{ t.system_dialog }}__{% else %}trigger: @{{ t | as_trigger }}{% endif %} do
{{ link | goto }}
end
{% endfor %}
kind: node
links:
manual_link:
omit:
- assign
omit_variables: []
out_links:
- type: labelled
- type: trigger
priority: 1200
schema:
type: ask
type_ui_schema:
ui_schema:
ui_template: ''
variant: prompt
- caption: Image
custom_variables: []
generator_template: |
show {{ show.variant }}({{ show.url | as_string }}){% if show.caption %}, caption: {{ show.caption | as_string }}{% endif %}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: show
type_ui_schema:
url:
ui:widget: image
ui_schema:
ui_template: ''
variant: image
- caption: Video
custom_variables: []
generator_template: |
show {{ show.variant }}({{ show.url | as_string }}){% if show.caption %}, caption: {{ show.caption | as_string }}{% endif %}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1100
schema:
type: show
type_ui_schema:
url:
ui:options:
accept: video/*
ui:widget: file
ui_schema:
ui_template: ''
variant: video
- caption: Audio
custom_variables: []
generator_template: |
show {{ show.variant }}({{ show.url | as_string }}){% if show.caption %}, caption: {{ show.caption | as_string }}{% endif %}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1200
schema:
type: show
type_ui_schema:
url:
ui:options:
accept: audio/*
ui:widget: file
ui_schema:
ui_template: ''
variant: audio
- caption: File
custom_variables: []
generator_template: |
show {{ show.variant }}({{ show.url | as_string }}){% if show.caption %}, caption: {{ show.caption | as_string }}{% endif %}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1300
schema:
type: show
type_ui_schema:
url:
ui:widget: file
ui_schema:
ui_template: ''
variant: file
- caption: Note
custom_variables: []
generator_template: |
create_todo(description: {{ send.subject | as_string }} + "
" + {{ send.message | as_string }}
{%- if send.note.tag -%}, tags: [{{ send.note.tag | as_string }}]{%- endif -%})
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
additionalProperties: false
properties:
tag:
title: Note tag
type: string
type: object
type: send
type_ui_schema:
ui_schema:
tag:
ui:field: tag_picker
ui_template: ''
variant: note
- caption: E-mail
custom_variables: []
generator_template: |
mail({{ send.email.email | as_string }}, {{ send.subject | as_string }}, {{ send.message | as_string }})
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1100
schema:
additionalProperties: false
properties:
email:
title: E-mail address
type: string
type: object
type: send
type_ui_schema:
ui_schema:
ui_template: 'Send email with subject: {{ send.subject }}'
variant: email
- caption: SMS
custom_variables: []
generator_template: |
sms_notify({{ send.sms.phone | as_string }}, {{ send.subject | as_string }} + " " + {{ send.message | as_string }})
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1200
schema:
additionalProperties: false
properties:
phone:
title: Phone number
type: string
type: object
type: send
type_ui_schema:
ui_schema:
phone:
ui:widget: phone_number
ui_template: 'Send SMS to {{ send.sms.phone }} with subject: {{ send.subject }}'
variant: sms
- caption:
custom_variables: []
generator_template: |
close
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links: []
priority: 1000
schema:
type: close
type_ui_schema:
ui_schema:
ui_template: ''
variant: default
- caption: Pause
custom_variables: []
generator_template: |
pause {{ pause.timeout }}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: pause
type_ui_schema:
ui_schema:
ui_template: ''
variant: default
- caption: Stop
custom_variables: []
generator_template: |
stop
{{ node | goto_next }}
kind: node
links:
manual_link:
omit:
- timeout
omit_variables: []
out_links:
priority: 1100
schema:
type: pause
type_ui_schema:
ui_schema:
ui_template: ''
variant: stop
- caption:
custom_variables: []
generator_template: |
tag "escalated"
{% if escalate.tag %}
tag {{ escalate.tag | as_string }}
{% endif %}
escalate({{ escalate.message | as_string }})
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: escalate
type_ui_schema:
ui_schema:
ui_template: |
Escalate: <b>{{ escalate.message }}</b>
{% if escalate.tag %} to: <b>{{ escalate.tag }}</b>{% endif %}
variant: default
- caption: Branch
custom_variables: []
generator_template: |
branch do
{% for link in node.out.condition %}
{{ link.condition | branch_condition }} ->
{{ link | goto }}
{% endfor %}
end
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
- type: condition
priority: 1000
schema:
type: control_flow
type_ui_schema:
ui_schema:
ui_template: ''
variant: branch
- caption: Go to flow
custom_variables: []
generator_template: |
{% if node.control_flow.goto.flow %}
goto flow_{{ node.control_flow.goto.flow }}
{% endif %}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links: []
priority: 1100
schema:
additionalProperties: false
properties:
flow:
title: Flow
type: string
type: object
type: control_flow
type_ui_schema:
ui_schema:
flow:
ui:widget: flow_picker
ui_template: ''
variant: goto
- caption: Close
custom_variables: []
generator_template: |
close
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links: []
priority: 1200
schema:
type: control_flow
type_ui_schema:
ui_schema:
ui_template: ''
variant: close
- caption: Pause
custom_variables: []
generator_template: |
pause {{ node.control_flow.pause.timeout }}
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1300
schema:
additionalProperties: false
properties:
timeout:
title: Wait time (seconds)
type: number
required:
- timeout
type: object
type: control_flow
type_ui_schema:
ui_schema:
ui_template: ''
variant: pause
- caption: Number
custom_variables: []
generator_template: |
tag "dial:{{ dial.number }}"
{% if dial.sip == 'invite' %}
dial "{{ dial.number }}"
{% else %}
refer "{{ dial.number }}"
{% endif %}
tag "dial:failed"
{{ node | goto_next }}
kind: node
links:
manual_link:
omit: []
omit_variables: []
out_links:
priority: 1000
schema:
type: dial
type_ui_schema:
ui_schema:
ui_template: 'Dial: {{ number }}'
variant: dial