@cxbuilder/flow-config 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,431 @@
1
+ # FlowConfig User Guide - Administrator
2
+
3
+ This guide is for **administrators** with **Full** access who can create, edit, and delete flow configurations.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Getting Started](#getting-started)
8
+ - [Understanding Flow Configurations](#understanding-flow-configurations)
9
+ - [Managing Flow Configurations](#managing-flow-configurations)
10
+ - [Import and Export Configurations](#import-and-export-configurations)
11
+ - [Application Settings](#application-settings)
12
+ - [Working with Variables](#working-with-variables)
13
+ - [Working with Prompts](#working-with-prompts)
14
+ - [Integration with Contact Flows](#integration-with-contact-flows)
15
+ - [Use Case Example](#use-case-example)
16
+
17
+ ---
18
+
19
+ ## Getting Started
20
+
21
+ ### Accessing FlowConfig
22
+
23
+ 1. Log into the **Amazon Connect Agent Workspace**
24
+ 2. Click the **Apps** dropdown in the top right
25
+ 3. Select **FlowConfig** (or your customized app name)
26
+
27
+ ![Landing Page](screenshots/landing-admin.png)
28
+
29
+ The application opens in a panel showing all flow configurations you have access to.
30
+
31
+ ### Your Access Level
32
+
33
+ As an administrator with **Full** access, you can:
34
+
35
+ - **Create** new flow configurations
36
+ - **Edit** existing configurations (ID, description, variables, prompts, and schema)
37
+ - **Delete** flow configurations
38
+ - **Define variable schemas** to control what Edit users can configure
39
+
40
+ ---
41
+
42
+ ## Understanding Flow Configurations
43
+
44
+ A **Flow Configuration** is a collection of variables and prompts that can be retrieved by Amazon Connect contact flows during customer interactions.
45
+
46
+ ### Key Concepts
47
+
48
+ - **ID**: Unique identifier used by contact flows to retrieve the configuration
49
+ - **Description**: Human-readable description of the configuration's purpose
50
+ - **Variables**: Key-value pairs for configurable settings (e.g., `closure: false`, `maxWaitTime: 600`)
51
+ - **Variable Schema**: Data type definitions that control how Edit users interact with variables
52
+ - **Prompts**: Multi-language, multi-channel text content used for customer communications
53
+
54
+ ### Why Use Flow Configurations?
55
+
56
+ Flow configurations allow you to:
57
+
58
+ - Empower business users to change settings without modifying contact flows
59
+ - Support multiple languages and channels (voice/chat) from a single configuration
60
+ - Reuse one contact flow design across multiple scenarios (e.g., branch offices)
61
+ - Reduce IT change requests for simple configuration updates
62
+
63
+ ---
64
+
65
+ ## Managing Flow Configurations
66
+
67
+ ### Creating a Flow Configuration
68
+
69
+ 1. Click the **Create** button in the top right
70
+ 2. Enter the **ID**
71
+ - This ID must be unique
72
+ - This is what contact flows will use to retrieve the configuration
73
+ - Consider using a hierarchical structure for consistency (e.g., `queue/technical-support`, `branch-office/austin`)
74
+ - IDs can be DNIS numbers (e.g., `+18005551234`) to load configurations based on the dialed number
75
+ - Choose a naming convention that works for your organization and use it consistently
76
+ 3. Enter a **Description** (e.g., "Technical support queue for product issues")
77
+ 4. Click **Save Changes** to create the configuration
78
+
79
+ ### Editing a Flow Configuration
80
+
81
+ 1. Click on a flow configuration ID from the list
82
+ 2. Make your desired changes to variables or prompts
83
+ 3. Click **Save Changes** to apply
84
+ 4. Click **Preview** to test voice prompts with Amazon Polly
85
+
86
+ ### Deleting a Flow Configuration
87
+
88
+ 1. Select one or more configurations using the checkboxes
89
+ 2. Click the **Delete** button
90
+ 3. Confirm the deletion
91
+
92
+ **Warning**: Deleting a flow configuration will affect any contact flows that reference it.
93
+
94
+ ### Import and Export Configurations
95
+
96
+ The import/export feature allows you to move configurations between environments or edit multiple configurations in bulk.
97
+
98
+ ![More Actions Menu](screenshots/landing-admin.png)
99
+
100
+ #### Exporting Configurations
101
+
102
+ 1. Select one or more configurations using the checkboxes
103
+ 2. Click the **More Actions** button
104
+ 3. Select **Export**
105
+ 4. A JSON file will be downloaded containing the selected configurations
106
+
107
+ **Use cases for export:**
108
+
109
+ - Moving configurations from development to production
110
+ - Creating backups of critical configurations
111
+ - Bulk editing configurations in your preferred text editor
112
+ - Sharing configuration templates with other administrators
113
+
114
+ #### Importing Configurations
115
+
116
+ 1. Click the **More Actions** button
117
+ 2. Select **Import**
118
+ 3. Choose the JSON file to import
119
+ 4. The configurations will be uploaded
120
+
121
+ **Important**: Importing overwrites existing entries. If a configuration with the same ID already exists, it will be completely replaced with the imported version.
122
+
123
+ **Best Practices:**
124
+
125
+ - Export configurations before importing to create a backup
126
+ - Review the JSON file before importing to ensure it contains the expected data
127
+ - Use import/export to promote configurations across environments (dev → test → prod)
128
+ - Consider keeping exported JSON files in version control for change tracking
129
+
130
+ ---
131
+
132
+ ## Application Settings
133
+
134
+ The Settings page allows administrators to control which locales and voices are available throughout the application. This ensures users can only select approved locales and use official voices for preview.
135
+
136
+ ![Settings Page](screenshots/settings.png)
137
+
138
+ ### Accessing Settings
139
+
140
+ 1. Click the **Settings** icon (gear icon) in the top right of the application
141
+ 2. The Settings page opens showing the current locale and voice configuration
142
+
143
+ ### Configuring Locales
144
+
145
+ Locales define which languages and regional variants are available when creating prompts.
146
+
147
+ **Why limit locales?**
148
+
149
+ - Prevents users from selecting unsupported languages
150
+ - Ensures consistency across all flow configurations
151
+ - Reduces errors from incorrect locale codes
152
+ - Aligns with your organization's supported languages
153
+
154
+ **How to configure:**
155
+
156
+ 1. In the **Locales** section, you'll see a list of configured locales
157
+ 2. Add or remove locales based on your organization's requirements
158
+ 3. Each locale includes:
159
+ - **Code**: The locale identifier (e.g., `en-US`, `es-US`, `fr-CA`)
160
+ - **Voices**: The list of Amazon Polly voices available for that locale
161
+
162
+ ### Configuring Voices
163
+
164
+ For each locale, you can specify which Amazon Polly voices are available for preview.
165
+
166
+ **Why limit voices?**
167
+
168
+ - Simplifies the voice selection dropdown for users
169
+
170
+ **How to configure:**
171
+
172
+ 1. For each locale, specify the allowed Amazon Polly voice IDs
173
+ 2. Users will only be able to select from these voices when previewing prompts
174
+ 3. Common voice examples:
175
+ - `en-US`: Joanna, Matthew, Kendra, Stephen
176
+ - `es-US`: Lupe, Pedro, Penelope
177
+ - `fr-CA`: Chantal, Gabrielle
178
+
179
+ ---
180
+
181
+ ## Working with Variables
182
+
183
+ Variables are key-value pairs that contact flows can use to drive behavior and routing decisions.
184
+
185
+ ![Variables Admin View](screenshots/detail-variables-admin.png)
186
+
187
+ ### Adding a Variable
188
+
189
+ 1. Click **Add Variable** in the Variables section
190
+ 2. Enter the **Variable Name** (e.g., `closure`, `maxWaitTime`)
191
+ 3. Select the **Schema Type** from the dropdown
192
+ 4. Enter the **Value**
193
+ 5. The variable is automatically saved
194
+
195
+ ### Variable Schema Types
196
+
197
+ As an administrator, you define the **schema type** for each variable, which controls how Edit users interact with it:
198
+
199
+ | Schema Type | Purpose | Example Use Case |
200
+ | ----------- | -------------------------------- | ------------------------------------------------ |
201
+ | **Text** | Free-form text input | Skill level, queue name |
202
+ | **Number** | Numeric values only | Wait time, retry count, max queue depth |
203
+ | **Boolean** | True/false toggle | Feature flags (e.g., `closure`, `offerCallback`) |
204
+ | **Select** | Dropdown with predefined options | Priority levels, routing modes |
205
+
206
+ **Why use schema types?**
207
+ Schema types ensure Edit users can only enter valid values. For example, a Boolean prevents typos like "tru" or "flase", and Select ensures users choose from approved options like "low", "medium", "high" rather than entering arbitrary text.
208
+
209
+ ### Configuring Select Options
210
+
211
+ ![Select Options Modal](screenshots/detail-variables-admin-select-options.png)
212
+
213
+ For **Select** type variables:
214
+
215
+ 1. Choose **Select** from the Schema dropdown
216
+ 2. Click **Options (0)** next to the schema type
217
+ 3. Enter one option per line in the modal
218
+ 4. Click **Save**
219
+
220
+ Edit users will only be able to choose from these predefined options.
221
+
222
+ ### Removing a Variable
223
+
224
+ Click the trash icon next to the variable you want to remove.
225
+
226
+ ---
227
+
228
+ ## Working with Prompts
229
+
230
+ Prompts are text messages played or displayed to customers. FlowConfig allows you to define prompts per language and channel (voice/chat).
231
+
232
+ ![Prompts Section](screenshots/detail-prompts-admin.png)
233
+
234
+ ### Adding a Prompt
235
+
236
+ 1. Click **Add Prompt** in the Prompts section
237
+ 2. Enter the **Prompt ID** (e.g., `welcome`, `hold`, `closure`)
238
+ 3. Click **Add Language** (+ icon) to add a language variant
239
+ 4. Select the language code (e.g., `en-US`, `es-US`)
240
+
241
+ ### Configuring Prompt Content
242
+
243
+ For each language:
244
+
245
+ 1. **Voice Content** (required)
246
+
247
+ - Enter the text that will be spoken to voice callers
248
+ - SSML tags are supported for enhanced speech synthesis
249
+ - Example: `<speak>Thank you for calling. Please continue to hold.</speak>`
250
+
251
+ 2. **Chat Content** (optional)
252
+
253
+ - Enter text specifically for chat customers
254
+ - If left blank, voice content will be used (with SSML tags automatically removed)
255
+ - Use this to customize phrasing for chat (e.g., "Thank you for contacting us" instead of "Thank you for calling")
256
+
257
+ 3. **Preview Voice**
258
+ - Select a voice from the dropdown
259
+ - Click the speaker icon to hear the prompt using Amazon Polly
260
+
261
+ ### Multi-Language Support
262
+
263
+ Add multiple language variants to support international customers:
264
+
265
+ 1. Click **Add Language** (+)
266
+ 2. Select language code (e.g., `es-US`, `fr-CA`)
267
+ 3. Enter content for that language
268
+ 4. Repeat for each language you support
269
+
270
+ Contact flows will automatically select the correct language based on the customer's language preference.
271
+
272
+ ### Voice vs. Chat Channels
273
+
274
+ - **Voice Content**: Played to customers on phone calls (supports SSML)
275
+ - **Chat Content**: Displayed to customers in chat (no SSML)
276
+
277
+ **Best Practice**: Use chat content to adapt messaging for the chat channel. For example:
278
+
279
+ - Voice: "Thank you for calling XYZ Company"
280
+ - Chat: "Thank you for contacting XYZ Company"
281
+
282
+ ### Removing a Prompt or Language
283
+
284
+ - Click the trash icon next to a prompt to remove it entirely
285
+ - Click the trash icon next to a language to remove that language variant
286
+
287
+ ---
288
+
289
+ ## Integration with Contact Flows
290
+
291
+ ### How Contact Flows Use Flow Configurations
292
+
293
+ Contact flow designers integrate your flow configurations using the **GetConfig Lambda function**, which is automatically deployed with FlowConfig.
294
+
295
+ ### Accessing Variables and Prompts
296
+
297
+ When a contact flow calls the GetConfig Lambda with a configuration ID:
298
+
299
+ 1. The Lambda retrieves your flow configuration from DynamoDB
300
+ 2. It returns all variables and prompts as a flat key-value structure
301
+ 3. The contact flow can then:
302
+ - Use variables for routing decisions (e.g., `if closure = true`)
303
+ - Play prompts to customers (e.g., Play prompt `$.External.welcome`)
304
+ - Set contact attributes for downstream processing
305
+
306
+ ### Example Lambda Call
307
+
308
+ In the contact flow "Invoke AWS Lambda function" block:
309
+
310
+ ```json
311
+ {
312
+ "id": "technical-support-queue"
313
+ }
314
+ ```
315
+
316
+ The Lambda returns:
317
+
318
+ ```json
319
+ {
320
+ "closure": "false",
321
+ "maxWaitTime": "600",
322
+ "offerCallback": "true",
323
+ "priority": "medium",
324
+ "skillLevel": "advanced",
325
+ "hold": "Your call is important to us. Please continue to hold...",
326
+ "welcome": "Thank you for calling technical support..."
327
+ }
328
+ ```
329
+
330
+ ### Size Considerations
331
+
332
+ - Amazon Connect limits Lambda responses to **32KB**
333
+ - The combined size of all variables and prompts should stay under this limit
334
+ - For large configurations, consider splitting into multiple flow configs
335
+
336
+ ---
337
+
338
+ ## Use Case Example
339
+
340
+ ### Multi-Branch Office Configuration
341
+
342
+ **Scenario**: A company has 50 branch offices, each with local phone numbers but sharing the same contact flow design. Each office needs custom welcome prompts and configuration settings.
343
+
344
+ **Solution**: Create one flow configuration per office using the office code as the ID.
345
+
346
+ #### Flow Configuration: `branch-office-austin`
347
+
348
+ **Variables:**
349
+
350
+ - `maxQueueDepth`: `25`
351
+ - `offerCallback`: `true`
352
+ - `businessHours`: `8-5`
353
+ - `specialtyServices`: `true`
354
+
355
+ **Prompts:**
356
+
357
+ **welcome** (en-US):
358
+
359
+ - Voice: "Thank you for calling the Austin branch. Please hold while we connect you to the next available representative."
360
+ - Chat: "Thank you for contacting the Austin branch. We'll connect you with a representative shortly."
361
+
362
+ **welcome** (es-US):
363
+
364
+ - Voice: "Gracias por llamar a la sucursal de Austin. Por favor espere mientras lo conectamos con el siguiente representante disponible."
365
+ - Chat: "Gracias por contactar la sucursal de Austin. Lo conectaremos con un representante en breve."
366
+
367
+ **agentWhisper** (en-US):
368
+
369
+ - Voice: "Incoming call from Austin branch"
370
+
371
+ #### Contact Flow Integration
372
+
373
+ The contact flow:
374
+
375
+ 1. Extracts the DNIS (dialed number) or a queue parameter
376
+ 2. Maps it to the office code (e.g., `austin`)
377
+ 3. Calls GetConfig Lambda: `{ "id": "branch-office-austin" }`
378
+ 4. Uses `$.External.maxQueueDepth` for queue management
379
+ 5. Plays `$.External.welcome` in the customer's language
380
+ 6. Whispers `$.External.agentWhisper` to the agent
381
+
382
+ #### Benefits
383
+
384
+ - **Single contact flow** serves all 50 offices
385
+ - **Local customization** without changing the contact flow
386
+ - **Easy onboarding**: Clone an existing office config and update prompts
387
+ - **Business user empowerment**: Office managers can update their own prompts and settings
388
+
389
+ ---
390
+
391
+ ## Best Practices
392
+
393
+ 1. **ID Naming Convention**: Establish and follow a consistent naming convention
394
+ - Use hierarchical structures for organization (e.g., `queue/technical-support`, `branch/austin/main`)
395
+ - DNIS-based IDs for phone-number-driven routing (e.g., `+18005551234`)
396
+ - Document your naming convention for your team
397
+ - Avoid cryptic abbreviations (e.g., `queue/tech-support` is better than `q1`)
398
+ 2. **Schema Types**: Always define schema types for variables that Edit users will modify
399
+ 3. **Test Prompts**: Use the Preview feature to verify voice prompts before saving
400
+ 4. **Size Management**: Keep configurations under 30KB (combined variables + prompts)
401
+ 5. **Documentation**: Use descriptive descriptions to help other users understand each config's purpose
402
+ 6. **Version Control**: Consider keeping a record of major changes to critical configurations
403
+
404
+ ---
405
+
406
+ ## Troubleshooting
407
+
408
+ ### "Configuration not found" in Contact Flow
409
+
410
+ - Verify the ID in your contact flow matches the configuration ID exactly (case-sensitive)
411
+ - Check that the configuration exists and hasn't been deleted
412
+
413
+ ### Variables Not Updating in Contact Flow
414
+
415
+ - Contact flows may cache Lambda results briefly
416
+ - Verify you clicked "Save Changes" after editing
417
+ - Test with a fresh contact to ensure changes are retrieved
418
+
419
+ ### Preview Voice Not Working
420
+
421
+ - Check your network connection
422
+ - Verify the prompt contains text (not just SSML tags)
423
+ - Try a different voice from the dropdown
424
+
425
+ ---
426
+
427
+ ## Need Help?
428
+
429
+ - **Technical Issues**: Contact your IT administrator
430
+ - **Contact Flow Integration**: Consult with your contact flow designers
431
+ - **Access Requests**: Contact your Amazon Connect administrator