Skip to main content
Skip table of contents

Extract part of the entry step input

Sometimes you may want to extract a specific part of user input. Especially when using WhatsApp click to chat links with pre-filled messages this can be very beneficial.

Imagine having a customer who is interested in a specific item from a company's inventory but still has questions concerning the item. Knowing exactly what item they are talking about the moment the conversations starts will help with a speedy resolution.

YAML
config:
  conversationOwner: null
  conversationOwners:
    - identifier: conversationOwner
      channel: WhatsApp
  scriptLanguageVersion: 1
  scriptVersion: 1
  defaultDelay: 200
  lists:
    positive-answers:
      items:
        - Ja
    negative-answers:
      source: negative-answers.yml
flows:
  - id: main
    description: Entry flow for the bot
    steps:
      - !entry
        id: Entry-1
        actions: []
        clientActions: []
        matches: []
        regexMatches:
          - I am interested in your inventory item number (?<numberInput>\d+)
        allowRestart: true
        isCaseSensitive: true
        doCatchAll: false
      - !text
        id: Text-1
        actions: []
        clientActions: []
        message: The inventory item you are interested in is {numberInput}.

The entry step documentation within Steps contains all relevant background information.


Previous: examples Intro

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.