@cloudstreamsoftware/claude-tools 1.0.0 → 1.1.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.
- package/README.md +152 -37
- package/agents/INDEX.md +183 -0
- package/agents/architect.md +247 -0
- package/agents/build-error-resolver.md +555 -0
- package/agents/catalyst-deployer.md +132 -0
- package/agents/code-reviewer.md +121 -0
- package/agents/compliance-auditor.md +148 -0
- package/agents/creator-architect.md +395 -0
- package/agents/deluge-reviewer.md +98 -0
- package/agents/doc-updater.md +471 -0
- package/agents/e2e-runner.md +711 -0
- package/agents/planner.md +122 -0
- package/agents/refactor-cleaner.md +309 -0
- package/agents/security-reviewer.md +582 -0
- package/agents/tdd-guide.md +302 -0
- package/config/versions.json +63 -0
- package/dist/hooks/hooks.json +209 -0
- package/dist/index.js +47 -0
- package/dist/lib/asset-value.js +609 -0
- package/dist/lib/client-manager.js +300 -0
- package/dist/lib/command-matcher.js +242 -0
- package/dist/lib/cross-session-patterns.js +754 -0
- package/dist/lib/intent-classifier.js +1075 -0
- package/dist/lib/package-manager.js +374 -0
- package/dist/lib/recommendation-engine.js +597 -0
- package/dist/lib/session-memory.js +489 -0
- package/dist/lib/skill-effectiveness.js +486 -0
- package/dist/lib/skill-matcher.js +595 -0
- package/dist/lib/tutorial-metrics.js +242 -0
- package/dist/lib/tutorial-progress.js +209 -0
- package/dist/lib/tutorial-renderer.js +431 -0
- package/dist/lib/utils.js +380 -0
- package/dist/lib/verify-formatter.js +143 -0
- package/dist/lib/workflow-state.js +249 -0
- package/hooks/hooks.json +209 -0
- package/package.json +5 -1
- package/scripts/aggregate-sessions.js +290 -0
- package/scripts/branch-name-validator.js +291 -0
- package/scripts/build.js +101 -0
- package/scripts/commands/client-switch.js +231 -0
- package/scripts/deprecate-skill.js +610 -0
- package/scripts/diagnose.js +324 -0
- package/scripts/doc-freshness.js +168 -0
- package/scripts/generate-weekly-digest.js +393 -0
- package/scripts/health-check.js +270 -0
- package/scripts/hooks/credential-check.js +101 -0
- package/scripts/hooks/evaluate-session.js +81 -0
- package/scripts/hooks/pre-compact.js +66 -0
- package/scripts/hooks/prompt-analyzer.js +276 -0
- package/scripts/hooks/prompt-router.js +422 -0
- package/scripts/hooks/quality-gate-enforcer.js +371 -0
- package/scripts/hooks/session-end.js +156 -0
- package/scripts/hooks/session-start.js +195 -0
- package/scripts/hooks/skill-injector.js +333 -0
- package/scripts/hooks/suggest-compact.js +58 -0
- package/scripts/lib/asset-value.js +609 -0
- package/scripts/lib/client-manager.js +300 -0
- package/scripts/lib/command-matcher.js +242 -0
- package/scripts/lib/cross-session-patterns.js +754 -0
- package/scripts/lib/intent-classifier.js +1075 -0
- package/scripts/lib/package-manager.js +374 -0
- package/scripts/lib/recommendation-engine.js +597 -0
- package/scripts/lib/session-memory.js +489 -0
- package/scripts/lib/skill-effectiveness.js +486 -0
- package/scripts/lib/skill-matcher.js +595 -0
- package/scripts/lib/tutorial-metrics.js +242 -0
- package/scripts/lib/tutorial-progress.js +209 -0
- package/scripts/lib/tutorial-renderer.js +431 -0
- package/scripts/lib/utils.js +380 -0
- package/scripts/lib/verify-formatter.js +143 -0
- package/scripts/lib/workflow-state.js +249 -0
- package/scripts/onboard.js +363 -0
- package/scripts/quarterly-report.js +692 -0
- package/scripts/setup-package-manager.js +204 -0
- package/scripts/sync-upstream.js +391 -0
- package/scripts/test.js +108 -0
- package/scripts/tutorial-runner.js +351 -0
- package/scripts/validate-all.js +201 -0
- package/scripts/verifiers/agents.js +245 -0
- package/scripts/verifiers/config.js +186 -0
- package/scripts/verifiers/environment.js +123 -0
- package/scripts/verifiers/hooks.js +188 -0
- package/scripts/verifiers/index.js +38 -0
- package/scripts/verifiers/persistence.js +140 -0
- package/scripts/verifiers/plugin.js +215 -0
- package/scripts/verifiers/skills.js +209 -0
- package/scripts/verify-setup.js +164 -0
- package/skills/INDEX.md +157 -0
- package/skills/backend-patterns/SKILL.md +586 -0
- package/skills/backend-patterns/catalyst-patterns.md +128 -0
- package/skills/bigquery-patterns/SKILL.md +27 -0
- package/skills/bigquery-patterns/performance-optimization.md +518 -0
- package/skills/bigquery-patterns/query-patterns.md +372 -0
- package/skills/bigquery-patterns/schema-design.md +78 -0
- package/skills/cloudstream-project-template/SKILL.md +20 -0
- package/skills/cloudstream-project-template/structure.md +65 -0
- package/skills/coding-standards/SKILL.md +524 -0
- package/skills/coding-standards/deluge-standards.md +83 -0
- package/skills/compliance-patterns/SKILL.md +28 -0
- package/skills/compliance-patterns/hipaa/audit-requirements.md +251 -0
- package/skills/compliance-patterns/hipaa/baa-process.md +298 -0
- package/skills/compliance-patterns/hipaa/data-archival-strategy.md +387 -0
- package/skills/compliance-patterns/hipaa/phi-handling.md +52 -0
- package/skills/compliance-patterns/pci-dss/saq-a-requirements.md +307 -0
- package/skills/compliance-patterns/pci-dss/tokenization-patterns.md +382 -0
- package/skills/compliance-patterns/pci-dss/zoho-checkout-patterns.md +56 -0
- package/skills/compliance-patterns/soc2/access-controls.md +344 -0
- package/skills/compliance-patterns/soc2/audit-logging.md +458 -0
- package/skills/compliance-patterns/soc2/change-management.md +403 -0
- package/skills/compliance-patterns/soc2/deluge-execution-logging.md +407 -0
- package/skills/consultancy-workflows/SKILL.md +19 -0
- package/skills/consultancy-workflows/client-isolation.md +21 -0
- package/skills/consultancy-workflows/documentation-automation.md +454 -0
- package/skills/consultancy-workflows/handoff-procedures.md +257 -0
- package/skills/consultancy-workflows/knowledge-capture.md +513 -0
- package/skills/consultancy-workflows/time-tracking.md +26 -0
- package/skills/continuous-learning/SKILL.md +84 -0
- package/skills/continuous-learning/config.json +18 -0
- package/skills/continuous-learning/evaluate-session.sh +60 -0
- package/skills/continuous-learning-v2/SKILL.md +126 -0
- package/skills/continuous-learning-v2/config.json +61 -0
- package/skills/frontend-patterns/SKILL.md +635 -0
- package/skills/frontend-patterns/zoho-widget-patterns.md +103 -0
- package/skills/gcp-data-engineering/SKILL.md +36 -0
- package/skills/gcp-data-engineering/bigquery/performance-optimization.md +337 -0
- package/skills/gcp-data-engineering/dataflow/error-handling.md +496 -0
- package/skills/gcp-data-engineering/dataflow/pipeline-patterns.md +444 -0
- package/skills/gcp-data-engineering/dbt/model-organization.md +63 -0
- package/skills/gcp-data-engineering/dbt/testing-patterns.md +503 -0
- package/skills/gcp-data-engineering/medallion-architecture/bronze-layer.md +60 -0
- package/skills/gcp-data-engineering/medallion-architecture/gold-layer.md +311 -0
- package/skills/gcp-data-engineering/medallion-architecture/layer-transitions.md +517 -0
- package/skills/gcp-data-engineering/medallion-architecture/silver-layer.md +305 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/data-extraction.md +543 -0
- package/skills/gcp-data-engineering/zoho-to-gcp/real-time-vs-batch.md +337 -0
- package/skills/security-review/SKILL.md +498 -0
- package/skills/security-review/compliance-checklist.md +53 -0
- package/skills/strategic-compact/SKILL.md +67 -0
- package/skills/tdd-workflow/SKILL.md +413 -0
- package/skills/tdd-workflow/zoho-testing.md +124 -0
- package/skills/tutorial/SKILL.md +249 -0
- package/skills/tutorial/docs/ACCESSIBILITY.md +169 -0
- package/skills/tutorial/lessons/00-philosophy-and-workflow.md +198 -0
- package/skills/tutorial/lessons/01-basics.md +81 -0
- package/skills/tutorial/lessons/02-training.md +86 -0
- package/skills/tutorial/lessons/03-commands.md +109 -0
- package/skills/tutorial/lessons/04-workflows.md +115 -0
- package/skills/tutorial/lessons/05-compliance.md +116 -0
- package/skills/tutorial/lessons/06-zoho.md +121 -0
- package/skills/tutorial/lessons/07-hooks-system.md +277 -0
- package/skills/tutorial/lessons/08-mcp-servers.md +316 -0
- package/skills/tutorial/lessons/09-client-management.md +215 -0
- package/skills/tutorial/lessons/10-testing-e2e.md +260 -0
- package/skills/tutorial/lessons/11-skills-deep-dive.md +272 -0
- package/skills/tutorial/lessons/12-rules-system.md +326 -0
- package/skills/tutorial/lessons/13-golden-standard-graduation.md +213 -0
- package/skills/tutorial/lessons/14-fork-setup-and-sync.md +312 -0
- package/skills/tutorial/lessons/15-living-examples-system.md +221 -0
- package/skills/tutorial/tracks/accelerated/README.md +134 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-1.md +161 -0
- package/skills/tutorial/tracks/accelerated/assessment/checkpoint-2.md +175 -0
- package/skills/tutorial/tracks/accelerated/day-1-core-concepts.md +234 -0
- package/skills/tutorial/tracks/accelerated/day-2-essential-commands.md +270 -0
- package/skills/tutorial/tracks/accelerated/day-3-workflow-mastery.md +305 -0
- package/skills/tutorial/tracks/accelerated/day-4-compliance-zoho.md +304 -0
- package/skills/tutorial/tracks/accelerated/day-5-hooks-skills.md +344 -0
- package/skills/tutorial/tracks/accelerated/day-6-client-testing.md +386 -0
- package/skills/tutorial/tracks/accelerated/day-7-graduation.md +369 -0
- package/skills/zoho-patterns/CHANGELOG.md +108 -0
- package/skills/zoho-patterns/SKILL.md +446 -0
- package/skills/zoho-patterns/analytics/dashboard-patterns.md +352 -0
- package/skills/zoho-patterns/analytics/zoho-to-bigquery-pipeline.md +427 -0
- package/skills/zoho-patterns/catalyst/appsail-deployment.md +349 -0
- package/skills/zoho-patterns/catalyst/context-close-patterns.md +354 -0
- package/skills/zoho-patterns/catalyst/cron-batch-processing.md +374 -0
- package/skills/zoho-patterns/catalyst/function-patterns.md +439 -0
- package/skills/zoho-patterns/creator/form-design.md +304 -0
- package/skills/zoho-patterns/creator/publish-api-patterns.md +313 -0
- package/skills/zoho-patterns/creator/widget-integration.md +306 -0
- package/skills/zoho-patterns/creator/workflow-automation.md +253 -0
- package/skills/zoho-patterns/deluge/api-patterns.md +468 -0
- package/skills/zoho-patterns/deluge/batch-processing.md +403 -0
- package/skills/zoho-patterns/deluge/cross-app-integration.md +356 -0
- package/skills/zoho-patterns/deluge/error-handling.md +423 -0
- package/skills/zoho-patterns/deluge/syntax-reference.md +65 -0
- package/skills/zoho-patterns/integration/cors-proxy-architecture.md +426 -0
- package/skills/zoho-patterns/integration/crm-books-native-sync.md +277 -0
- package/skills/zoho-patterns/integration/oauth-token-management.md +461 -0
- package/skills/zoho-patterns/integration/zoho-flow-patterns.md +334 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# Zoho Flow Patterns
|
|
2
|
+
|
|
3
|
+
## Flow vs Deluge Decision Framework
|
|
4
|
+
|
|
5
|
+
| Criteria | Use Flow | Use Deluge |
|
|
6
|
+
|----------|----------|-----------|
|
|
7
|
+
| Non-developer can maintain | Yes | No |
|
|
8
|
+
| Complex conditional logic | No | Yes |
|
|
9
|
+
| Multi-step with branching | Limited | Yes |
|
|
10
|
+
| Third-party app integration | Yes (800+ connectors) | Requires invokeUrl |
|
|
11
|
+
| Real-time event triggers | Yes | Yes |
|
|
12
|
+
| Batch processing > 100 records | No | Yes (scheduled) |
|
|
13
|
+
| Custom data transformation | Limited | Yes |
|
|
14
|
+
| Statement limit concerns | N/A (no limit) | Yes (5000 limit) |
|
|
15
|
+
| Error handling granularity | Basic | Full try-catch |
|
|
16
|
+
| Audit/compliance logging | Limited | Full control |
|
|
17
|
+
| Cost | Per-task pricing | Included in plan |
|
|
18
|
+
| Execution timeout | 10 min per flow | 40s (invokeUrl), varies |
|
|
19
|
+
|
|
20
|
+
### When to Use Flow
|
|
21
|
+
|
|
22
|
+
1. Simple trigger → action patterns (e.g., new CRM lead → send Slack message)
|
|
23
|
+
2. Connecting Zoho apps to third-party services (Slack, Teams, Stripe)
|
|
24
|
+
3. Non-technical team needs to modify automation
|
|
25
|
+
4. Rapid prototyping of integration workflows
|
|
26
|
+
5. Scheduled data pulls from external APIs (no Deluge needed)
|
|
27
|
+
|
|
28
|
+
### When to Use Deluge
|
|
29
|
+
|
|
30
|
+
1. Complex business logic with multiple conditionals
|
|
31
|
+
2. Batch processing hundreds of records
|
|
32
|
+
3. Custom error handling and retry logic
|
|
33
|
+
4. Performance-critical operations
|
|
34
|
+
5. Operations requiring transaction-like behavior
|
|
35
|
+
6. Tight integration within a single Zoho app
|
|
36
|
+
|
|
37
|
+
## Flow Triggers
|
|
38
|
+
|
|
39
|
+
### App Triggers (Event-Based)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Zoho CRM:
|
|
43
|
+
- New record created (Contact, Deal, Lead, etc.)
|
|
44
|
+
- Record updated (specific field changes)
|
|
45
|
+
- Record deleted
|
|
46
|
+
- Stage change (Blueprint transitions)
|
|
47
|
+
|
|
48
|
+
Zoho Books:
|
|
49
|
+
- Invoice created/updated
|
|
50
|
+
- Payment received
|
|
51
|
+
- Expense created
|
|
52
|
+
|
|
53
|
+
Zoho Creator:
|
|
54
|
+
- Form submission
|
|
55
|
+
- Record update via workflow
|
|
56
|
+
|
|
57
|
+
External:
|
|
58
|
+
- Webhook received (custom payload)
|
|
59
|
+
- Schedule (cron-like)
|
|
60
|
+
- Email received (Zoho Mail)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Schedule Triggers
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Every 15 minutes (minimum)
|
|
67
|
+
Every hour
|
|
68
|
+
Daily at specific time
|
|
69
|
+
Weekly on specific day
|
|
70
|
+
Monthly on specific date
|
|
71
|
+
Custom cron expression
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Webhook Triggers
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Flow provides a unique webhook URL:
|
|
78
|
+
https://flow.zoho.com/webhook/catch/<flow-id>/<token>
|
|
79
|
+
|
|
80
|
+
Send POST request with JSON body to trigger flow.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Flow Actions
|
|
84
|
+
|
|
85
|
+
### Data Operations
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Get Record → Fetch single record by ID
|
|
89
|
+
Get Records → Fetch multiple with criteria
|
|
90
|
+
Create Record → Insert new record
|
|
91
|
+
Update Record → Modify existing record
|
|
92
|
+
Delete Record → Remove record
|
|
93
|
+
Search Records → Find by criteria/keyword
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Logic Operations
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
If/Else → Conditional branching
|
|
100
|
+
Switch → Multi-path routing
|
|
101
|
+
Loop → Iterate over list (max 500 items)
|
|
102
|
+
Delay → Wait before next action (min 1 minute)
|
|
103
|
+
Stop → End flow execution
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Data Manipulation
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Format Date → Convert date formats
|
|
110
|
+
Math → Calculations
|
|
111
|
+
Text → String operations
|
|
112
|
+
JSON Parse → Extract from JSON
|
|
113
|
+
List Operations → Filter, map, sort
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Custom Connections in Flow
|
|
117
|
+
|
|
118
|
+
For APIs not in Flow's built-in connector list:
|
|
119
|
+
|
|
120
|
+
### Creating Custom Connection
|
|
121
|
+
|
|
122
|
+
1. Go to Flow > Settings > Connections > Custom
|
|
123
|
+
2. Define:
|
|
124
|
+
- Base URL: `https://api.example.com`
|
|
125
|
+
- Authentication: OAuth2 / API Key / Basic Auth
|
|
126
|
+
- Default headers
|
|
127
|
+
|
|
128
|
+
### Using Custom Connection
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Action: Custom API Call
|
|
132
|
+
Method: POST
|
|
133
|
+
URL: /v1/orders
|
|
134
|
+
Headers:
|
|
135
|
+
Content-Type: application/json
|
|
136
|
+
Body:
|
|
137
|
+
{
|
|
138
|
+
"customer_id": "${crm.contact.id}",
|
|
139
|
+
"amount": "${crm.deal.amount}",
|
|
140
|
+
"description": "${crm.deal.deal_name}"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### OAuth2 Custom Connection Setup
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Authorization URL: https://api.example.com/oauth/authorize
|
|
148
|
+
Token URL: https://api.example.com/oauth/token
|
|
149
|
+
Client ID: [from API provider]
|
|
150
|
+
Client Secret: [from API provider]
|
|
151
|
+
Scopes: read write
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Error Handling in Flow
|
|
155
|
+
|
|
156
|
+
### Built-in Error Handling
|
|
157
|
+
|
|
158
|
+
Flow provides:
|
|
159
|
+
- **Retry on failure:** 1, 2, or 3 retries with exponential backoff
|
|
160
|
+
- **Error branch:** Route to alternate path on failure
|
|
161
|
+
- **Error notification:** Email alert on flow failure
|
|
162
|
+
|
|
163
|
+
### Error Branch Pattern
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
[Trigger: CRM Deal Won]
|
|
167
|
+
↓
|
|
168
|
+
[Action: Create Invoice in Books]
|
|
169
|
+
├── Success → [Send confirmation email]
|
|
170
|
+
└── Error → [Log error to Creator]
|
|
171
|
+
↓
|
|
172
|
+
[Send alert to Slack channel]
|
|
173
|
+
↓
|
|
174
|
+
[Create follow-up task in CRM]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Error Logging via Flow
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
On Error:
|
|
181
|
+
1. Create record in Creator "Flow_Error_Log" form:
|
|
182
|
+
- Flow_Name: "CRM to Books Invoice"
|
|
183
|
+
- Error_Message: ${error.message}
|
|
184
|
+
- Error_Step: ${error.step_name}
|
|
185
|
+
- Trigger_Record: ${trigger.record_id}
|
|
186
|
+
- Timestamp: ${system.current_time}
|
|
187
|
+
|
|
188
|
+
2. Post to Cliq:
|
|
189
|
+
- Channel: #flow-errors
|
|
190
|
+
- Message: "Flow failed: ${flow.name} at step ${error.step_name}"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Flow Limitations vs Deluge
|
|
194
|
+
|
|
195
|
+
| Limitation | Flow | Deluge Alternative |
|
|
196
|
+
|-----------|------|-------------------|
|
|
197
|
+
| Loop iterations | Max 500 per loop | 5000 statement limit (but flexible) |
|
|
198
|
+
| Execution time | 10 min per flow | Scheduled: 5 min, Cron: 15 min |
|
|
199
|
+
| Data size | 10MB per execution | Limited by API response size |
|
|
200
|
+
| Nested conditions | 5 levels deep | Unlimited nesting |
|
|
201
|
+
| API calls per flow | 25 actions | Limited by statement count |
|
|
202
|
+
| Custom functions | Not available | Full Deluge functions |
|
|
203
|
+
| File operations | Limited | Full file manipulation |
|
|
204
|
+
| Database queries | Via app connectors | Direct ZCQL, criteria |
|
|
205
|
+
| String manipulation | Basic formatters | Full string operations |
|
|
206
|
+
| Error detail | Step-level only | Line-level with stack trace |
|
|
207
|
+
|
|
208
|
+
## Multi-Step Workflow Examples
|
|
209
|
+
|
|
210
|
+
### Lead Qualification Pipeline
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
Trigger: New Lead in CRM
|
|
214
|
+
|
|
215
|
+
Step 1: [Get] Fetch lead details
|
|
216
|
+
Step 2: [If] Check lead score
|
|
217
|
+
├── Score >= 80:
|
|
218
|
+
│ Step 3a: [Update] Set status to "Hot Lead"
|
|
219
|
+
│ Step 4a: [Create] Task for sales rep
|
|
220
|
+
│ Step 5a: [Send] Slack notification to #hot-leads
|
|
221
|
+
├── Score >= 50:
|
|
222
|
+
│ Step 3b: [Update] Set status to "Warm Lead"
|
|
223
|
+
│ Step 4b: [Create] Scheduled follow-up
|
|
224
|
+
└── Score < 50:
|
|
225
|
+
Step 3c: [Update] Set status to "Nurture"
|
|
226
|
+
Step 4c: [Add] to email campaign
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Invoice Reminder Automation
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
Trigger: Schedule (Daily at 9 AM)
|
|
233
|
+
|
|
234
|
+
Step 1: [Get Records] Overdue invoices from Books
|
|
235
|
+
Step 2: [Loop] For each overdue invoice:
|
|
236
|
+
Step 3: [If] Days overdue check
|
|
237
|
+
├── 7+ days:
|
|
238
|
+
│ [Send] Reminder email to customer
|
|
239
|
+
│ [Update] Reminder_Sent_Count + 1
|
|
240
|
+
├── 30+ days:
|
|
241
|
+
│ [Send] Urgent reminder
|
|
242
|
+
│ [Create] Task for collections team
|
|
243
|
+
└── 60+ days:
|
|
244
|
+
[Send] Final notice
|
|
245
|
+
[Update] Status to "Collections"
|
|
246
|
+
[Notify] Finance manager via Cliq
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Cross-Platform Data Sync
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
Trigger: Webhook from external system
|
|
253
|
+
|
|
254
|
+
Step 1: [Parse] JSON payload
|
|
255
|
+
Step 2: [Search] CRM for matching contact by email
|
|
256
|
+
Step 3: [If] Contact exists?
|
|
257
|
+
├── Yes:
|
|
258
|
+
│ [Update] CRM contact with new data
|
|
259
|
+
│ [Get] Associated Books contact
|
|
260
|
+
│ [Update] Books contact (custom fields)
|
|
261
|
+
└── No:
|
|
262
|
+
[Create] New CRM contact
|
|
263
|
+
[Wait] 2 hours (for native Books sync)
|
|
264
|
+
[Verify] Books contact created
|
|
265
|
+
[If] Not created → [Create] manually in Books
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Conditional Logic
|
|
269
|
+
|
|
270
|
+
### If/Else Conditions
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Conditions available:
|
|
274
|
+
- Equals / Not equals
|
|
275
|
+
- Contains / Does not contain
|
|
276
|
+
- Starts with / Ends with
|
|
277
|
+
- Greater than / Less than
|
|
278
|
+
- Is empty / Is not empty
|
|
279
|
+
- Is true / Is false
|
|
280
|
+
- Matches regex (limited)
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Switch (Multi-Branch)
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
Switch on: ${crm.deal.stage}
|
|
287
|
+
Case "Qualification": → [Action A]
|
|
288
|
+
Case "Proposal": → [Action B]
|
|
289
|
+
Case "Negotiation": → [Action C]
|
|
290
|
+
Case "Closed Won": → [Action D]
|
|
291
|
+
Case "Closed Lost": → [Action E]
|
|
292
|
+
Default: → [Log unexpected stage]
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Best Practices
|
|
296
|
+
|
|
297
|
+
1. **Name flows descriptively:** "CRM-Deal-Won-to-Books-Invoice" not "Flow 1"
|
|
298
|
+
2. **Add descriptions to each step** for team maintainability
|
|
299
|
+
3. **Use error branches** on every external API call
|
|
300
|
+
4. **Set up failure notifications** to a monitored channel
|
|
301
|
+
5. **Test with edge cases** before enabling (null values, special characters)
|
|
302
|
+
6. **Monitor task usage** - Flow charges per task execution
|
|
303
|
+
7. **Version control:** Export flow JSON for backup (Settings > Export)
|
|
304
|
+
8. **Avoid infinite loops:** Ensure update triggers don't re-trigger the same flow
|
|
305
|
+
|
|
306
|
+
## Flow + Deluge Hybrid Pattern
|
|
307
|
+
|
|
308
|
+
Sometimes the best solution uses both:
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
Flow handles:
|
|
312
|
+
- Triggering on external events
|
|
313
|
+
- Routing to appropriate handler
|
|
314
|
+
- Notifications and simple updates
|
|
315
|
+
|
|
316
|
+
Deluge handles:
|
|
317
|
+
- Complex business logic
|
|
318
|
+
- Batch operations
|
|
319
|
+
- Data transformation
|
|
320
|
+
- Error handling with retry
|
|
321
|
+
|
|
322
|
+
Example:
|
|
323
|
+
[Flow Trigger: Webhook from Stripe]
|
|
324
|
+
↓
|
|
325
|
+
[Flow: Parse payload, extract customer_id]
|
|
326
|
+
↓
|
|
327
|
+
[Flow: Call Creator custom function via API]
|
|
328
|
+
↓
|
|
329
|
+
[Deluge: Complex invoice reconciliation logic]
|
|
330
|
+
↓
|
|
331
|
+
[Deluge: Update multiple records, handle errors]
|
|
332
|
+
↓
|
|
333
|
+
[Flow: Send success/failure notification]
|
|
334
|
+
```
|