Chat Flow User Guide
User GuidesRelease NotesFAQsSupport
5.52.0
5.52.0
  • 🏠Return to Home Page
  • 🔎Overview
    • Chat Flow Overview
    • Quick Start
  • 🪛Configuration
    • Access Chat Flow
    • Configure a route
    • Add an API integration
    • Set up keywords
    • Set up session timeout events
    • Manage your workflow assets
  • ✅Channel Capabilities
    • Configure channel display type
    • Use WhatsApp with Chat Flow
      • Initiate WhatsApp conversations
      • Send WhatsApp message templates
      • WhatsApp Interactive Messages
      • WhatsApp Commerce Messages
    • Use Apple Messaging for Business with Chat Flow
      • Apple Interactive Messages
      • Apple User-Facing Nodes
  • 🔃Workflow management
    • Build a workflow
      • Add a workflow
      • Delete and restore nodes
      • Repeat a step in a workflow
      • Dynamic API Workflows
    • Edit/delete a workflow
    • Search, Find & Replace in a workflow
    • Duplicate, rename, or move a workflow
    • Preview workflows
      • Preview flow on different channels
      • Preview logs
    • Approve and deploy workflows
      • View flow details
      • Submit a workflow for approval
      • Approve/decline a workflow
      • Deploy a workflow to production
  • 😎User-Facing Nodes
    • Display nodes
      • Contact Sending
      • External Link
      • Location sharing
      • Media
      • OTP Menu
      • Rich Link
      • Text Display
    • Product nodes
      • Clickatell AI node
      • Chat Desk node
    • Input nodes
      • Contact Receiving
      • OAuth Request
      • Request Input
      • Send Form
      • Time Picker
    • Commerce
      • Chat 2 Pay
      • Multi Product
    • Branch/logic split
      • Dynamic List
        • Apply patterns, custom indexes, filtering, and exclusions
      • Menu
      • Multiple Choice Input
  • 🎬Action Nodes
    • API Integration node
    • Calculate
    • Date Format
    • Display List
    • Encrypt
    • Is Empty
    • Is Null
    • Number Format
    • Regular Expression
    • Remap
    • Send Template
    • Set Variable
    • Switch Case
    • Wait For Callback
    • Opt-Out nodes
  • 🔗Integrations
    • Integration nodes
  • 🔡Variable management
  • Using system variables
  • Referring to variables
  • 📊Reporting & Analytics
    • Analytics Settings
    • Collections & reporting labels
    • Clickatell Portal Reports
  • ❗System error codes
    • System Error Codes
  • 💡Help & Information
    • What's New? 🎈
    • Release Notes
    • FAQs
    • Return to Home Page
Powered by GitBook
LogoLogo

© Copyright 2024 Clickatell. All rights reserved.

On this page
  • Examples
  • "Pattern" field
  • "Custom Index" field
  • "Filter By" field
  • "Exclude" field

Was this helpful?

  1. User-Facing Nodes
  2. Branch/logic split
  3. Dynamic List

Apply patterns, custom indexes, filtering, and exclusions

Was this helpful?

This page provides examples of regular expression patterns and how they could be structured to create display lists.

Creating these regular expression patterns will be determined by the information available via your APIs and how they are structured.

The examples provided here are intended to provide guidance in creating meaningful ways of presenting information to your users via the use of and .

Examples

{
    "products": [
        {
            "id": "1001",
            "desc": "Potatoes",
            "unitPrice": 100,
            "category": "veg"
        },
        {
            "id": "1002",
            "desc": "Melon",
            "unitPrice": 200,
            "category": "fruit"
        },
        {
            "id": "1003",
            "desc": "Grapes",
            "unitPrice": 300,
            "category": "fruit"
        },
        {
            "id": "1004",
            "desc": "Milk",
            "unitPrice": 400,
            "category": "dairy"
        }
    ]
}
  • "[[EXAMPLE:products.1.id]]": "1001"

  • "[[EXAMPLE:products.1.desc]]": "Potatoes"

  • "[[EXAMPLE:products.1.unitPrice]]": 100

  • "[[EXAMPLE:products.1.category]]": "veg"

  • "[[EXAMPLE:products.2.id]]": "1002"

  • "[[EXAMPLE:products.2.desc]]": "Melon"

  • "[[EXAMPLE:products.2.unitPrice]]": 200

  • "[[EXAMPLE:products.2.category]]": "fruit"

  • "[[EXAMPLE:products.3.id]]": "1003"

  • "[[EXAMPLE:products.3.desc]]": "Grapes"

  • "[[EXAMPLE:products.3.unitPrice]]": 300

  • "[[EXAMPLE:products.3.category]]": "fruit"

  • "[[EXAMPLE:products.4.id]]": "1004"

  • "[[EXAMPLE:products.4.desc]]": "Milk"

  • "[[EXAMPLE:products.4.unitPrice]]": 400

  • "[[EXAMPLE:products.4.category]]": "dairy"

"Pattern" field

The Pattern field is used to match possible session variables that would be used to display to the user as a list. The pattern may contain the # character. If so, it is replaced with '1' and checked if it exists in the session store. If it exists, it is added to the list and it tries '2', etc. If it is not found then it is done and the list is returned.

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc] ([EXAMPLE:products.#.unitPrice] cents)" will (with a numbered list) return a list of

  1. Potatoes (100)

  2. Melon (200)

  3. Grapes (300)

  4. Milk (400)

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc]" will (with a numbered list and ". " seperator/indexPattern) return a list of

  1. Potatoes

  2. Melon

  3. Grapes

  4. Milk

"Custom Index" field

This is the separator field above and can also contain the "#" character to be replaced with the incrementing list counter. This field is not resolved (unlike with "pattern")

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc]" will (with a numbered list and "--#--" indexPattern) return a list of

--1-- Potatoes

--2-- Melon

--3-- Grapes

--4-- Milk

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc]" will (with a numbered list and "--->>" indexPattern) return a list of

--->> Potatoes

--->> Melon

--->> Grapes

--->> Milk

"Filter By" field

Optional map of key value pairs where:

  • key: contains the expected text to include if matched by the pattern (the value).

  • value: the pattern to evaluate (same as pattern fields above) to test against the key.

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc]", and with a Filter By map of

  • key: "fruit"

  • value: "[EXAMPLE:products.#.category]"

will (with a numbered list and ". " seperator/indexPattern) return a list of

  1. Melon

  2. Grapes

"Exclude" field

Optional map of key-value pairs where (same as "Filter By")

  • key: contains the expected text to exclude if matched by the pattern (the value).

  • value: the pattern to evaluate (same as pattern fields above) to test against the key.

For the above session variables, a "pattern" of "[EXAMPLE:products.#.desc]", and with an "Exclude" map of

  • key: "fruit"

  • value: "[EXAMPLE:products.#.category]"

will (with a numbered list and ". " seperator/indexPattern) return a list of

  1. Potatoes

  2. Milk

Example session variables that will be used in the below explanations (produced for example as a result of an earlier node):

😎
Display List nodes
Dynamic List node
API Integration