Syntax Cheat Sheet

All supported SAL features and when to use them


*show_products Show all products

An end user utterance “Show all products” will return an intent show_products

Intents are defined by an asterisk *. The whole sentence after the *-sign will be recognized as this intent.


*show_products Show [jeans](category)

Entities are defined by [entity value](entity type) notation.

An end user utterance “Show jeans” will return an entity jeans for entity type category.


category = [

*show_products Show $category(category)

Variables are defined by variable = [] notation and used by $variable. Variables can contain all valid SAL syntax.

Define variables before using them

Variables need to be defined before you use them in your examples.

Inline lists

*show_products [Show|view] products

Inline lists are a type of variable shorthand that can be used for simple substations.

Optional input

*show_products Show products {please}

Optional input is a part of end user utterance that may or may not exist.

Multi-intent utterances

*show_products Show products {and} *order order by price

You can define multiple intents in one sentence. This example would return two intents for the end user utterance “Show products and order by price”


*book Book a restaurant for $SPEECHLY.DATE(date)

Supports end user utterances such as “Book a resturant for next Monday” or “Book a restaurant for the fifth of July”

$SPEECHLY.DATE is a standard entity type for dates.


*add_expense Add an expense for $SPEECHLY.NUMBER(amount) dollars"

Supports end user utterances such as “Add an expense for two thousand five hundred and sixty dollars”

$SPEECHLY.NUMBER is a standard entity type for numbers.

Alphanumeric sequences

*add_product add $SPEECHLY.IDENTIFIER_MEDIUM(product_id) to cart

*Supports end user utterance such as “Add ABC123 to cart” or “Add 4FG13L to cart”

$SPEECHLY.IDENTIFIER_SHORT, $SPEECHLY.IDENTIFIER_MEDIUM and $SPEECHLY.IDENTIFIER_LONG are standard entity types for alphanumeric sequences of various lengths. These can be used for product codes, license plates or other identifiers.


*book Book a ticket ![[from Helsinki](from) | [to London](to) | for [two](amount)]

*Supports end user utterances such as “Book a ticket for two from Helsinki to London” or “Book a ticket for two to Helsinki from London”

Permutations enable users to utter the parts of the utterance in any order.

Profile image for ottomatias

Last updated by ottomatias on November 24, 2020 at 15:41 +0200

Found an error on our documentation? Please file an issue or make a pull request