Guide
Article Markdown

Use Case 7: Complaint in Custom Data

Level: basic · Modules: Scenario Builder, Custom Data · Action: custom_modules__set

Required permissions and access

What you need Where in the menu Why
Scenario Builder Menu → Scenario Builder Collect text/phone, write to CD
Custom Data Menu → Custom Data Model complaints

If a section is missing from the menu — check your account permissions or contact ConnectiveOne support.

Business context

The customer leaves a complaint — the record goes into a Custom Data table with an ID for confirmation (“Your complaint №…”). This is the pattern for any forms: requests, inquiries, feedback without CSAT.

Expected result

  • Custom Data model complaints (fields text, phone, status).
  • custom_modules__set creates a record; ID is available for customer confirmation ({{complaint:id}}).
  • Edges success / error are handled — no silence.

Flow architecture

MessageKeyboard ("Leave a complaint") → WaitForInput (text) → WaitForInput (phone)
   → custom_modules__set
      ├─ success → “Complaint №{{complaint:id}} accepted”
      └─ error → “Could not save”

Step-by-step implementation

Step 0. Custom Data — model

Custom Data → New model:

Field Type Alias / name
Complaint text text text
Phone phone phone
Status text or select status (default new)

Model alias: complaints — must match module_name in the action exactly (case matters).


Step 1. MessageKeyboard — enter the flow

Parameter Value
Text “Want to leave a complaint?”
Button “Yes” · complaint_yes

Edges: → WaitForInput (complaint text).


Step 2. WaitForInput — text and phone

Node 1 — text

Parameter Value Why
messageText “Describe the complaint”
outputVariable complaints:text Format module:field for custom_modules__set
Validation none or min characters

Node 2 — phone

| outputVariable | complaints:phone | | Validation | phone |

Edges: chain → Action set.


Step 3. Action — custom_modules__set

What it does: creates a new row in the complaints table from constants complaints:*.

node_params Value Why
module_name complaints Model alias in Custom Data
set_to complaint Record object → {{complaint:id}}, {{complaint:text}}

You can also set complaints:status = new via a Set node or a previous WaitForInput.

Edges:

Edge Where Why
success MessageKeyboard “Thank you! Complaint number: {{complaint:id}} Customer has a reference
error “Could not save the complaint” Check model alias and fields

Step 4. Verification

  1. Custom Data → module complaints — a new row appeared.
  2. Runs → after success constants contain complaint with id.

Acceptance criteria (self-check Runs)

Common mistakes

Symptom Cause What to do
__set error Wrong module_name or field Match model alias and constants
No complaint:id Wrong set_to Check set_to: complaint
Bot “goes silent” Edge error not connected Connect error → MessageKeyboard
Row without phone Phone validation rejected Check format or Validation none
Using your own AI agent?Install the open skill so your AI agent can work with current official ConnectiveOne documentation.Get the skillNeed support?Couldn’t find the answer or need help from the ConnectiveOne team? Create a request in Client Portal.Create a request