@cloudstreamsoftware/claude-tools 1.0.0 → 1.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.
- 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/bin/cloudstream-setup.js +16 -6
- 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,352 @@
|
|
|
1
|
+
# Zoho Analytics Dashboard Patterns
|
|
2
|
+
|
|
3
|
+
## Report Types
|
|
4
|
+
|
|
5
|
+
| Type | Use Case | Best For |
|
|
6
|
+
|------|----------|----------|
|
|
7
|
+
| Chart (Bar, Line, Pie) | Trend visualization, comparisons | Sales over time, category breakdown |
|
|
8
|
+
| Pivot Table | Multi-dimensional analysis | Revenue by product by region |
|
|
9
|
+
| Summary View | Aggregated metrics | Monthly totals, averages |
|
|
10
|
+
| Tabular Report | Detailed record listing | Transaction logs, audit trails |
|
|
11
|
+
| KPI Widget | Single metric display | Revenue, conversion rate, count |
|
|
12
|
+
| Dashboard | Combined views | Executive overview, ops dashboard |
|
|
13
|
+
| Geo Map | Location-based data | Customer distribution, sales by state |
|
|
14
|
+
|
|
15
|
+
## Scheduled Data Sync
|
|
16
|
+
|
|
17
|
+
### Sync from Zoho Apps
|
|
18
|
+
|
|
19
|
+
Analytics auto-syncs from CRM, Books, Creator, etc.:
|
|
20
|
+
|
|
21
|
+
| Source | Sync Frequency | Config Location |
|
|
22
|
+
|--------|---------------|-----------------|
|
|
23
|
+
| Zoho CRM | Every 1-6 hours | Analytics > Data Sources > CRM |
|
|
24
|
+
| Zoho Books | Every 2-6 hours | Analytics > Data Sources > Books |
|
|
25
|
+
| Zoho Creator | Every 1-6 hours | Analytics > Data Sources > Creator |
|
|
26
|
+
| Zoho Desk | Every 2-6 hours | Analytics > Data Sources > Desk |
|
|
27
|
+
|
|
28
|
+
### Configuring Sync Schedule
|
|
29
|
+
|
|
30
|
+
1. Go to Analytics > Setup > Data Sources
|
|
31
|
+
2. Select the connected app
|
|
32
|
+
3. Click "Sync Settings"
|
|
33
|
+
4. Set frequency (1h, 2h, 3h, 6h, 12h, 24h)
|
|
34
|
+
5. Select modules/forms to sync
|
|
35
|
+
6. Choose "Full sync" or "Incremental sync"
|
|
36
|
+
|
|
37
|
+
> **NOTE:** Incremental sync is faster and uses fewer API calls. Use full sync only for initial setup or after schema changes.
|
|
38
|
+
|
|
39
|
+
### Manual Sync Trigger
|
|
40
|
+
|
|
41
|
+
```deluge
|
|
42
|
+
// Trigger Analytics sync from Deluge (useful after bulk data changes)
|
|
43
|
+
try
|
|
44
|
+
{
|
|
45
|
+
response = invokeUrl [
|
|
46
|
+
url: "https://analyticsapi.zoho.com/restapi/v2/workspaces/{workspace-id}/sync"
|
|
47
|
+
type: POST
|
|
48
|
+
connection: "zoho-analytics-connection"
|
|
49
|
+
];
|
|
50
|
+
info "Analytics sync triggered: " + response;
|
|
51
|
+
}
|
|
52
|
+
catch (e)
|
|
53
|
+
{
|
|
54
|
+
info "Sync trigger failed: " + e.toString();
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## SQL Workspace Queries
|
|
59
|
+
|
|
60
|
+
Analytics supports SQL-like queries in the "Query Table" feature:
|
|
61
|
+
|
|
62
|
+
### Basic Queries
|
|
63
|
+
|
|
64
|
+
```sql
|
|
65
|
+
-- Revenue by month
|
|
66
|
+
SELECT
|
|
67
|
+
YEAR("Invoice_Date") AS year,
|
|
68
|
+
MONTH("Invoice_Date") AS month,
|
|
69
|
+
SUM("Amount") AS total_revenue,
|
|
70
|
+
COUNT("Invoice_ID") AS invoice_count
|
|
71
|
+
FROM "Invoices"
|
|
72
|
+
WHERE "Status" = 'Paid'
|
|
73
|
+
GROUP BY YEAR("Invoice_Date"), MONTH("Invoice_Date")
|
|
74
|
+
ORDER BY year DESC, month DESC
|
|
75
|
+
|
|
76
|
+
-- Customer lifetime value
|
|
77
|
+
SELECT
|
|
78
|
+
"Customer_Name",
|
|
79
|
+
COUNT("Invoice_ID") AS total_invoices,
|
|
80
|
+
SUM("Amount") AS lifetime_value,
|
|
81
|
+
MIN("Invoice_Date") AS first_purchase,
|
|
82
|
+
MAX("Invoice_Date") AS last_purchase,
|
|
83
|
+
DATEDIFF(MAX("Invoice_Date"), MIN("Invoice_Date")) AS customer_tenure_days
|
|
84
|
+
FROM "Invoices"
|
|
85
|
+
WHERE "Status" IN ('Paid', 'Sent')
|
|
86
|
+
GROUP BY "Customer_Name"
|
|
87
|
+
HAVING SUM("Amount") > 1000
|
|
88
|
+
ORDER BY lifetime_value DESC
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Join Queries
|
|
92
|
+
|
|
93
|
+
```sql
|
|
94
|
+
-- Deals with customer payment history
|
|
95
|
+
SELECT
|
|
96
|
+
d."Deal_Name",
|
|
97
|
+
d."Amount" AS deal_amount,
|
|
98
|
+
d."Stage",
|
|
99
|
+
c."Customer_Name",
|
|
100
|
+
p."Total_Paid",
|
|
101
|
+
p."Last_Payment_Date"
|
|
102
|
+
FROM "Deals" d
|
|
103
|
+
LEFT JOIN "Customers" c ON d."Customer_ID" = c."Customer_ID"
|
|
104
|
+
LEFT JOIN (
|
|
105
|
+
SELECT
|
|
106
|
+
"Customer_ID",
|
|
107
|
+
SUM("Amount") AS "Total_Paid",
|
|
108
|
+
MAX("Payment_Date") AS "Last_Payment_Date"
|
|
109
|
+
FROM "Payments"
|
|
110
|
+
GROUP BY "Customer_ID"
|
|
111
|
+
) p ON c."Customer_ID" = p."Customer_ID"
|
|
112
|
+
WHERE d."Stage" NOT IN ('Closed Lost')
|
|
113
|
+
ORDER BY d."Amount" DESC
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Window Functions
|
|
117
|
+
|
|
118
|
+
```sql
|
|
119
|
+
-- Running total and rank
|
|
120
|
+
SELECT
|
|
121
|
+
"Sales_Rep",
|
|
122
|
+
"Month",
|
|
123
|
+
"Revenue",
|
|
124
|
+
SUM("Revenue") OVER (PARTITION BY "Sales_Rep" ORDER BY "Month") AS running_total,
|
|
125
|
+
RANK() OVER (PARTITION BY "Month" ORDER BY "Revenue" DESC) AS monthly_rank
|
|
126
|
+
FROM "Monthly_Sales"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Embedded Analytics in Creator
|
|
130
|
+
|
|
131
|
+
### Embedding a Report
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<!-- In Creator widget or custom HTML -->
|
|
135
|
+
<iframe
|
|
136
|
+
src="https://analytics.zoho.com/open-view/{workspace-id}/{view-id}?ZOHO_CRITERIA=%22Status%22%3D%27Active%27"
|
|
137
|
+
width="100%"
|
|
138
|
+
height="500"
|
|
139
|
+
frameborder="0">
|
|
140
|
+
</iframe>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Dynamic Filtering via URL Parameters
|
|
144
|
+
|
|
145
|
+
```javascript
|
|
146
|
+
// Widget: Embed analytics with dynamic filters
|
|
147
|
+
function loadAnalyticsReport(customerId, dateRange) {
|
|
148
|
+
const baseUrl = "https://analytics.zoho.com/open-view";
|
|
149
|
+
const workspaceId = "YOUR_WORKSPACE_ID";
|
|
150
|
+
const viewId = "YOUR_VIEW_ID";
|
|
151
|
+
|
|
152
|
+
// Build criteria string
|
|
153
|
+
const criteria = encodeURIComponent(
|
|
154
|
+
`"Customer_ID" = '${customerId}' AND "Date" BETWEEN '${dateRange.start}' AND '${dateRange.end}'`
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
const embedUrl = `${baseUrl}/${workspaceId}/${viewId}?ZOHO_CRITERIA=${criteria}&ZOHO_HIDE_HEADER=true`;
|
|
158
|
+
|
|
159
|
+
document.getElementById("analytics-frame").src = embedUrl;
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Using Analytics API from Deluge
|
|
164
|
+
|
|
165
|
+
```deluge
|
|
166
|
+
// Fetch report data programmatically
|
|
167
|
+
try
|
|
168
|
+
{
|
|
169
|
+
response = invokeUrl [
|
|
170
|
+
url: "https://analyticsapi.zoho.com/restapi/v2/workspaces/{workspace-id}/views/{view-id}/data"
|
|
171
|
+
type: GET
|
|
172
|
+
parameters: {
|
|
173
|
+
"criteria": "\"Status\" = 'Active'",
|
|
174
|
+
"limit": "100"
|
|
175
|
+
}
|
|
176
|
+
connection: "zoho-analytics-connection"
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
data = response.toJSON();
|
|
180
|
+
rows = data.get("data");
|
|
181
|
+
info "Fetched " + rows.size() + " rows from Analytics";
|
|
182
|
+
}
|
|
183
|
+
catch (e)
|
|
184
|
+
{
|
|
185
|
+
info "Analytics API failed: " + e.toString();
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Sharing and Permissions
|
|
190
|
+
|
|
191
|
+
### Permission Levels
|
|
192
|
+
|
|
193
|
+
| Level | Can View | Can Edit | Can Share | Can Delete |
|
|
194
|
+
|-------|----------|----------|-----------|-----------|
|
|
195
|
+
| Read Only | Yes | No | No | No |
|
|
196
|
+
| Read-Write | Yes | Yes | No | No |
|
|
197
|
+
| Full Access | Yes | Yes | Yes | Yes |
|
|
198
|
+
| Admin | Yes | Yes | Yes | Yes |
|
|
199
|
+
|
|
200
|
+
### Sharing Patterns
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
Organization sharing:
|
|
204
|
+
- Workspace level: Share entire workspace with team
|
|
205
|
+
- View level: Share specific reports/dashboards
|
|
206
|
+
- Row-level security: Filter data by user role
|
|
207
|
+
|
|
208
|
+
External sharing:
|
|
209
|
+
- Public permalink (read-only, no auth required)
|
|
210
|
+
- Embedded view (iframe, requires ZOHO_API_KEY)
|
|
211
|
+
- Email scheduled reports (PDF/CSV/Excel)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Row-Level Security
|
|
215
|
+
|
|
216
|
+
```sql
|
|
217
|
+
-- Apply row-level filter based on logged-in user's role
|
|
218
|
+
-- Configure in Analytics > Sharing > Row Level Criteria
|
|
219
|
+
|
|
220
|
+
-- For sales reps: only see their own data
|
|
221
|
+
"Owner_Email" = ZOHO_LOGINUSER_EMAIL
|
|
222
|
+
|
|
223
|
+
-- For managers: see their team's data
|
|
224
|
+
"Team" = ZOHO_LOGINUSER_ROLE
|
|
225
|
+
|
|
226
|
+
-- For executives: see all data (no filter)
|
|
227
|
+
-- Leave criteria blank for admin role
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Custom Formulas
|
|
231
|
+
|
|
232
|
+
### Calculated Columns
|
|
233
|
+
|
|
234
|
+
```sql
|
|
235
|
+
-- Win rate percentage
|
|
236
|
+
IF("Stage" = 'Closed Won', 1, 0) / COUNT("Deal_ID") * 100
|
|
237
|
+
|
|
238
|
+
-- Days since last activity
|
|
239
|
+
DATEDIFF(CURDATE(), "Last_Activity_Date")
|
|
240
|
+
|
|
241
|
+
-- Revenue tier classification
|
|
242
|
+
CASE
|
|
243
|
+
WHEN "Annual_Revenue" >= 1000000 THEN 'Enterprise'
|
|
244
|
+
WHEN "Annual_Revenue" >= 100000 THEN 'Mid-Market'
|
|
245
|
+
WHEN "Annual_Revenue" >= 10000 THEN 'SMB'
|
|
246
|
+
ELSE 'Startup'
|
|
247
|
+
END
|
|
248
|
+
|
|
249
|
+
-- Month-over-month growth
|
|
250
|
+
("Current_Month_Revenue" - "Previous_Month_Revenue") / "Previous_Month_Revenue" * 100
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Aggregate Formulas
|
|
254
|
+
|
|
255
|
+
```sql
|
|
256
|
+
-- Weighted pipeline value
|
|
257
|
+
SUM("Amount" * "Probability" / 100)
|
|
258
|
+
|
|
259
|
+
-- Average deal cycle (days from creation to close)
|
|
260
|
+
AVG(DATEDIFF("Closing_Date", "Created_Time"))
|
|
261
|
+
|
|
262
|
+
-- Customer concentration (top customer % of revenue)
|
|
263
|
+
MAX("Customer_Revenue") / SUM("Revenue") * 100
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Drill-Down Configuration
|
|
267
|
+
|
|
268
|
+
### Setting Up Drill-Down Paths
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
Dashboard KPI: Total Revenue ($2.5M)
|
|
272
|
+
↓ Click to drill
|
|
273
|
+
Level 1: Revenue by Region (West: $1.2M, East: $800K, ...)
|
|
274
|
+
↓ Click region
|
|
275
|
+
Level 2: Revenue by Sales Rep within region
|
|
276
|
+
↓ Click rep
|
|
277
|
+
Level 3: Individual deals for that rep
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Configuration Steps
|
|
281
|
+
|
|
282
|
+
1. Create reports for each drill level
|
|
283
|
+
2. In parent report, right-click chart element > "Drill Down"
|
|
284
|
+
3. Select child report
|
|
285
|
+
4. Map the filter field (e.g., Region → "Region" field in child)
|
|
286
|
+
5. Test drill path
|
|
287
|
+
|
|
288
|
+
## Dashboard Design Best Practices
|
|
289
|
+
|
|
290
|
+
### Layout Principles
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
┌──────────────────────────────────────────────────────────┐
|
|
294
|
+
│ KPI Row: 4-5 key metrics across top │
|
|
295
|
+
│ [Revenue] [Deals Won] [Avg Deal Size] [Win Rate] [NPS] │
|
|
296
|
+
├────────────────────────────┬─────────────────────────────┤
|
|
297
|
+
│ │ │
|
|
298
|
+
│ Primary Chart (60%) │ Secondary Charts (40%) │
|
|
299
|
+
│ Revenue trend over time │ Pipeline by stage │
|
|
300
|
+
│ │ Top customers │
|
|
301
|
+
│ │ │
|
|
302
|
+
├────────────────────────────┴─────────────────────────────┤
|
|
303
|
+
│ Detail Table: Recent activity, upcoming renewals │
|
|
304
|
+
└──────────────────────────────────────────────────────────┘
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Performance Tips
|
|
308
|
+
|
|
309
|
+
1. **Limit widgets per dashboard:** 8-12 max for fast load
|
|
310
|
+
2. **Use summary tables** instead of raw data for charts
|
|
311
|
+
3. **Pre-aggregate** with query tables for complex calculations
|
|
312
|
+
4. **Set appropriate sync frequency** - don't over-sync
|
|
313
|
+
5. **Use date filters** to limit data range (last 12 months default)
|
|
314
|
+
6. **Avoid cross-workspace joins** - they're slow
|
|
315
|
+
|
|
316
|
+
## Scheduled Email Reports
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
Configuration:
|
|
320
|
+
Report: Monthly Revenue Dashboard
|
|
321
|
+
Recipients: leadership@company.com
|
|
322
|
+
Frequency: Monthly, 1st of month, 8:00 AM
|
|
323
|
+
Format: PDF (dashboard) + Excel (underlying data)
|
|
324
|
+
Subject: "[Auto] Monthly Revenue Report - {MONTH} {YEAR}"
|
|
325
|
+
Criteria: Last full month's data
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Trigger Report Email from Deluge
|
|
329
|
+
|
|
330
|
+
```deluge
|
|
331
|
+
// Send analytics report on demand
|
|
332
|
+
try
|
|
333
|
+
{
|
|
334
|
+
response = invokeUrl [
|
|
335
|
+
url: "https://analyticsapi.zoho.com/restapi/v2/workspaces/{workspace-id}/views/{view-id}/email"
|
|
336
|
+
type: POST
|
|
337
|
+
headers: {"Content-Type": "application/json"}
|
|
338
|
+
body: {
|
|
339
|
+
"to": "manager@company.com",
|
|
340
|
+
"subject": "Ad-hoc Report: " + zoho.currentdate.toString("MMM dd, yyyy"),
|
|
341
|
+
"format": "pdf",
|
|
342
|
+
"criteria": "\"Date\" >= '" + zoho.currentdate.subDay(7).toString("yyyy-MM-dd") + "'"
|
|
343
|
+
}.toString()
|
|
344
|
+
connection: "zoho-analytics-connection"
|
|
345
|
+
];
|
|
346
|
+
info "Report email sent: " + response;
|
|
347
|
+
}
|
|
348
|
+
catch (e)
|
|
349
|
+
{
|
|
350
|
+
info "Report email failed: " + e.toString();
|
|
351
|
+
}
|
|
352
|
+
```
|