@thinkingai/ae-cli 1.0.1 → 1.0.3
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 +16 -13
- package/dist/auth-BQC5DBE7.js +19 -0
- package/dist/auth-DXKYLMO7.js +81 -0
- package/dist/chunk-3CDLNXTD.js +218 -0
- package/dist/chunk-53FNNCZW.js +174 -0
- package/dist/chunk-EBFUVWIZ.js +127 -0
- package/dist/chunk-ZYXIGPG7.js +148 -0
- package/dist/client-T4VODLA6.js +16 -0
- package/dist/community-FVDAWGS4.js +684 -0
- package/dist/config-V7AXKDMB.js +242 -0
- package/dist/index.js +16 -15
- package/dist/raw-G3GKHAPZ.js +61 -0
- package/dist/te-analysis-CHFTDN55.js +871 -0
- package/dist/te-audience-M6LQY6M7.js +350 -0
- package/dist/te-common-BLQ7DVGC.js +144 -0
- package/dist/te-dataops-V4OTKY35.js +1853 -0
- package/dist/te-engage-DXE4R5EW.js +1470 -0
- package/dist/te-meta-FMM7KCVI.js +479 -0
- package/package.json +7 -5
- package/skills/te-analysis/SKILL.md +10 -10
- package/skills/te-analysis/references/build-entity-details-sql.md +10 -10
- package/skills/te-analysis/references/build-event-details-sql.md +10 -10
- package/skills/te-analysis/references/create-alert.md +4 -4
- package/skills/te-analysis/references/create-dashboard.md +4 -4
- package/skills/te-analysis/references/create-or-update-dashboard-note.md +4 -4
- package/skills/te-analysis/references/create-public-access-link.md +4 -4
- package/skills/te-analysis/references/create-report.md +10 -10
- package/skills/te-analysis/references/create-result-cluster.md +4 -4
- package/skills/te-analysis/references/drilldown-user-events.md +6 -6
- package/skills/te-analysis/references/drilldown-users.md +4 -4
- package/skills/te-analysis/references/get-alert-definition-schema.md +3 -3
- package/skills/te-analysis/references/get-alert.md +3 -3
- package/skills/te-analysis/references/get-analysis-query-schema.md +4 -4
- package/skills/te-analysis/references/get-filter-schema.md +3 -3
- package/skills/te-analysis/references/get-groupby-schema.md +3 -3
- package/skills/te-analysis/references/get-report-definition.md +3 -3
- package/skills/te-analysis/references/get-table-columns.md +3 -3
- package/skills/te-analysis/references/list-alerts.md +4 -4
- package/skills/te-analysis/references/list-dashboards.md +4 -4
- package/skills/te-analysis/references/list-public-access-links.md +3 -3
- package/skills/te-analysis/references/list-reports.md +4 -4
- package/skills/te-analysis/references/load-filters.md +4 -4
- package/skills/te-analysis/references/query-adhoc.md +10 -10
- package/skills/te-analysis/references/query-dashboard-detail.md +3 -3
- package/skills/te-analysis/references/query-dashboard-report-data.md +9 -9
- package/skills/te-analysis/references/query-entity-details.md +10 -10
- package/skills/te-analysis/references/query-event-details.md +10 -10
- package/skills/te-analysis/references/query-report-data.md +11 -11
- package/skills/te-analysis/references/update-alert.md +4 -4
- package/skills/te-analysis/references/update-dashboard.md +4 -4
- package/skills/te-analysis/references/update-public-access-link.md +4 -4
- package/skills/te-audience/SKILL.md +5 -5
- package/skills/te-audience/references/create-cluster.md +10 -10
- package/skills/te-audience/references/create-tag.md +10 -10
- package/skills/te-audience/references/get-cluster-definition-schema.md +9 -9
- package/skills/te-audience/references/get-clusters-by-name.md +3 -3
- package/skills/te-audience/references/get-tag-definition-schema.md +3 -3
- package/skills/te-audience/references/get-tags-by-name.md +3 -3
- package/skills/te-audience/references/list-cluster-members.md +4 -4
- package/skills/te-audience/references/list-clusters.md +4 -4
- package/skills/te-audience/references/list-tag-members.md +4 -4
- package/skills/te-audience/references/list-tags.md +4 -4
- package/skills/te-audience/references/refresh-cluster.md +3 -3
- package/skills/te-audience/references/refresh-tag.md +3 -3
- package/skills/te-audience/references/update-cluster.md +9 -9
- package/skills/te-audience/references/update-tag.md +10 -10
- package/skills/te-common/SKILL.md +2 -2
- package/skills/te-common/references/get-resource-url.md +5 -5
- package/skills/te-common/references/list-projects.md +3 -3
- package/skills/te-community/SKILL.md +61 -69
- package/skills/te-community/references/community-activity-analysis.md +43 -43
- package/skills/te-community/references/community-analyzing-official-content.md +47 -47
- package/skills/te-community/references/community-analyzing-theme-comment.md +87 -87
- package/skills/te-community/references/community-character-analysis.md +44 -44
- package/skills/te-community/references/community-daily-report.md +56 -53
- package/skills/te-community/references/community-hottopic-insight.md +81 -87
- package/skills/te-community/references/community-weekly-report.md +54 -53
- package/skills/te-community/references/get_channel_info.md +9 -9
- package/skills/te-community/references/get_comment_tag_analysis.md +15 -15
- package/skills/te-community/references/get_comments_summary.md +15 -15
- package/skills/te-community/references/get_corpus_tags.md +9 -9
- package/skills/te-community/references/get_daily_summary.md +10 -10
- package/skills/te-community/references/get_hot_topics.md +12 -12
- package/skills/te-community/references/get_livestream_analysis.md +9 -9
- package/skills/te-community/references/get_livestream_detail.md +19 -19
- package/skills/te-community/references/get_livestream_list.md +13 -13
- package/skills/te-community/references/get_livestream_overview.md +11 -11
- package/skills/te-community/references/get_livestream_room_metrics.md +12 -12
- package/skills/te-community/references/get_livestream_rooms.md +12 -12
- package/skills/te-community/references/get_overview_metrics.md +12 -12
- package/skills/te-community/references/get_post_detail.md +21 -21
- package/skills/te-community/references/get_risk_content.md +23 -23
- package/skills/te-community/references/get_sentiment_overview.md +16 -16
- package/skills/te-community/references/get_tag_trends.md +13 -13
- package/skills/te-community/references/get_topic_detail.md +12 -12
- package/skills/te-community/references/search_posts.md +26 -26
- package/skills/te-dataops/SKILL.md +390 -392
- package/skills/te-dataops/references/dataops-flow-create.md +87 -87
- package/skills/te-dataops/references/dataops-flow-monitor.md +65 -65
- package/skills/te-dataops/references/dataops-integration.md +90 -85
- package/skills/te-dataops/references/dataops-query.md +58 -58
- package/skills/te-dataops/references/dataops-table.md +63 -63
- package/skills/te-engage/SKILL.md +103 -103
- package/skills/te-engage/references/add-approver.md +11 -11
- package/skills/te-engage/references/add-channel.md +34 -34
- package/skills/te-engage/references/approver-list.md +8 -8
- package/skills/te-engage/references/cancel-query-by-request-id.md +10 -10
- package/skills/te-engage/references/channel-detail.md +13 -13
- package/skills/te-engage/references/channel-list.md +15 -15
- package/skills/te-engage/references/config-channel-detail.md +10 -10
- package/skills/te-engage/references/config-channel-list.md +11 -11
- package/skills/te-engage/references/config-item-analysis-report.md +21 -21
- package/skills/te-engage/references/config-item-detail.md +10 -10
- package/skills/te-engage/references/config-item-list.md +8 -8
- package/skills/te-engage/references/config-item-strategy-comparison.md +14 -14
- package/skills/te-engage/references/config-item-trigger-report.md +26 -26
- package/skills/te-engage/references/copy-config-template.md +16 -16
- package/skills/te-engage/references/delete-channel.md +11 -11
- package/skills/te-engage/references/delete-config-channel.md +11 -11
- package/skills/te-engage/references/delete-config-item.md +12 -12
- package/skills/te-engage/references/delete-flow.md +11 -11
- package/skills/te-engage/references/flow-ab-split-node-report.md +29 -29
- package/skills/te-engage/references/flow-detail.md +19 -19
- package/skills/te-engage/references/flow-list.md +8 -8
- package/skills/te-engage/references/flow-node-config-schema.md +11 -11
- package/skills/te-engage/references/flow-node-detail-report.md +30 -30
- package/skills/te-engage/references/flow-node-overview-report.md +27 -27
- package/skills/te-engage/references/flow-process-report.md +32 -32
- package/skills/te-engage/references/manage-flow.md +44 -44
- package/skills/te-engage/references/manage-strategy.md +37 -37
- package/skills/te-engage/references/manage-task.md +20 -20
- package/skills/te-engage/references/modify-flow-base-info.md +14 -14
- package/skills/te-engage/references/save-flow.md +264 -263
- package/skills/te-engage/references/strategy-detail.md +16 -16
- package/skills/te-engage/references/strategy-list.md +10 -10
- package/skills/te-engage/references/task-data-detail.md +47 -47
- package/skills/te-engage/references/task-data-overview.md +23 -23
- package/skills/te-engage/references/task-detail.md +18 -18
- package/skills/te-engage/references/task-experiment-report.md +26 -26
- package/skills/te-engage/references/task-list.md +35 -35
- package/skills/te-engage/references/task-metric-detail.md +31 -31
- package/skills/te-engage/references/task-stats.md +31 -31
- package/skills/te-engage/references/update-channel-status.md +13 -13
- package/skills/te-engage/references/update-config-channel-status.md +14 -14
- package/skills/te-engage/references/validate-flow-node-config.md +15 -15
- package/skills/te-engage/references/whitelist-list.md +8 -8
- package/skills/te-meta/SKILL.md +5 -5
- package/skills/te-meta/references/batch-create-metadata.md +4 -4
- package/skills/te-meta/references/batch-edit-metadata.md +3 -3
- package/skills/te-meta/references/create-metric.md +12 -12
- package/skills/te-meta/references/create-project-mark-time.md +4 -4
- package/skills/te-meta/references/create-virtual-event.md +10 -10
- package/skills/te-meta/references/create-virtual-property.md +8 -8
- package/skills/te-meta/references/delete-project-mark-times.md +3 -3
- package/skills/te-meta/references/delete-track-items.md +3 -3
- package/skills/te-meta/references/get-metric.md +3 -3
- package/skills/te-meta/references/get-project-config.md +3 -3
- package/skills/te-meta/references/get-track-program.md +3 -3
- package/skills/te-meta/references/list-entities.md +4 -4
- package/skills/te-meta/references/list-events.md +4 -4
- package/skills/te-meta/references/list-metrics.md +4 -4
- package/skills/te-meta/references/list-project-mark-times.md +4 -4
- package/skills/te-meta/references/list-project-users.md +3 -3
- package/skills/te-meta/references/list-properties.md +4 -4
- package/skills/te-meta/references/save-track-items.md +3 -3
- package/skills/te-meta/references/update-metric.md +10 -10
- package/skills/te-meta/references/update-project-mark-time.md +4 -4
- package/skills/te-shared/SKILL.md +8 -8
- package/skills/te-community/references/community-release-analysis.md +0 -79
- package/skills/te-dataops/references/dataops-operations.md +0 -107
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
# te-engage `+
|
|
1
|
+
# te-engage `+save_flow`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Create or update a flow canvas draft.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Mapped command: `ae-cli engage +save_flow`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This document is not only meant to explain the `save_flow` interface itself. It provides a complete path **from user requirements to CLI arguments**:
|
|
8
8
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3.
|
|
9
|
+
1. Identify intent first
|
|
10
|
+
2. Then map the intent to the flow canvas `req`
|
|
11
|
+
3. Finally submit through the CLI
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## 1.
|
|
15
|
+
## 1. General Principles
|
|
16
16
|
|
|
17
|
-
`+
|
|
17
|
+
`+save_flow` does not accept natural language or vague business descriptions directly. It accepts the **final flow canvas request payload that is ready to submit**.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Therefore, you must first organize user requirements into a unified intermediate intent structure, and then generate the payload according to the mapping rules:
|
|
20
20
|
|
|
21
21
|
- `flowName`
|
|
22
22
|
- `flowDesc`
|
|
23
23
|
- `nodeList`
|
|
24
24
|
- `edgeList`
|
|
25
|
-
-
|
|
25
|
+
- and optional `groupId`、`tzOffset`、`flowUuid`、`parentFlowUuid`、`versionType`
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Then call the CLI:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
ae-cli engage +save_flow --project_id <projectId> --req '<req-json>'
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
## 2.
|
|
35
|
+
## 2. Workflow
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Use the following five-step workflow:
|
|
38
38
|
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
5.
|
|
39
|
+
1. Identify the flow intent from the user input and produce a unified intent JSON.
|
|
40
|
+
2. Run `ae-cli te_audience +get_cluster_definition_schema --cluster_type condition` to obtain the condition cluster definition schema for assembling condition-related fields later.
|
|
41
|
+
3. Run `ae-cli engage +channel_list --project_id <projectId>` to get the available channels in the project and match real `channelId` values for touchpoint nodes.
|
|
42
|
+
4. Map the intent JSON to the final `req`: `flowName`, `flowDesc`, `nodeList`, and `edgeList`.
|
|
43
|
+
5. Run `ae-cli engage +save_flow --project_id <projectId> --req '<req-json>'` to submit.
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## 3.
|
|
47
|
+
## 3. Step One: Intent Identification
|
|
48
48
|
|
|
49
|
-
### 3.1
|
|
49
|
+
### 3.1 Information That Must Be Confirmed First
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Before generating any `req`, confirm at least these four categories of information:
|
|
52
52
|
|
|
53
|
-
|
|
|
53
|
+
| Item | Description |
|
|
54
54
|
|---|---|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
55
|
+
| business scenario | What kind of flow this is, for example new-user activation, churn win-back, or paid conversion |
|
|
56
|
+
| target users | Who can enter the flow, for example users inactive for the last 14 days or users registered today |
|
|
57
|
+
| touchpoint method | Which channel will be used for outreach, for example Push, WeChat subscription, or Webhook |
|
|
58
|
+
| branching conditions | Whether grouped handling is needed; if so, which conditions define the groups |
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
If any of these four categories is missing, do not build `req` directly.
|
|
61
61
|
|
|
62
|
-
### 3.2
|
|
62
|
+
### 3.2 Intent Output Format
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
First organize the user requirement into the following intent JSON. This JSON is an intermediate representation, not the final `save_flow.req`.
|
|
65
65
|
|
|
66
66
|
```json
|
|
67
67
|
{
|
|
@@ -86,7 +86,7 @@ te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'
|
|
|
86
86
|
{
|
|
87
87
|
"nid": "n1",
|
|
88
88
|
"node_type": "<split|judge|action|wait|end>",
|
|
89
|
-
"type": "
|
|
89
|
+
"type": "<specific semantic node type>",
|
|
90
90
|
"name": "<string|null>",
|
|
91
91
|
"content": "<string|null>",
|
|
92
92
|
"channel_name": "<string|null>",
|
|
@@ -117,64 +117,64 @@ te-cli te-engage +save-flow --project-id <projectId> --req '<req-json>'
|
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
### 3.3
|
|
120
|
+
### 3.3 Field Meaning
|
|
121
121
|
|
|
122
122
|
- `entry`
|
|
123
|
-
|
|
123
|
+
Describes how users enter the flow.
|
|
124
124
|
- `nodes`
|
|
125
|
-
|
|
125
|
+
Describes business-semantic nodes; they are not yet final canvas nodes.
|
|
126
126
|
- `edges`
|
|
127
|
-
|
|
127
|
+
Describes the connection relationships at the business-semantics level.
|
|
128
128
|
- `channel_name`
|
|
129
|
-
|
|
129
|
+
Keep it as a semantic field first, then match a real `channelId` from the project channel list later.
|
|
130
130
|
- `branches`
|
|
131
|
-
|
|
131
|
+
Only describes branch semantics; later it will be materialized into `node.config.branchList` and `edge.sourceBranchId`.
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
135
|
-
## 4.
|
|
135
|
+
## 4. Step Two: Required CLI Queries
|
|
136
136
|
|
|
137
|
-
### 4.1
|
|
137
|
+
### 4.1 Query the Cluster Definition Schema
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
Run:
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
-
|
|
142
|
+
ae-cli te_audience +get_cluster_definition_schema --cluster_type condition
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
145
|
+
Purpose:
|
|
146
|
+
- Prepare the basis for building QP for condition nodes, audience nodes, and entry nodes
|
|
147
|
+
- Help generate `targetClusterQp`
|
|
148
|
+
- Help generate `triggerRule.events`
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
This step does not return final nodes directly. It provides the rule foundation for expressing conditions as QP or event conditions.
|
|
151
151
|
|
|
152
|
-
### 4.2
|
|
152
|
+
### 4.2 Query Project Channels
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
Run:
|
|
155
155
|
|
|
156
156
|
```bash
|
|
157
|
-
|
|
157
|
+
ae-cli engage +channel_list --project_id <projectId>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
160
|
+
Purpose:
|
|
161
|
+
- Get the available channels in the project
|
|
162
|
+
- Match a real `channelId` for touchpoint nodes based on `channel_name` in the intent
|
|
163
|
+
- Determine whether the node should be `message_push`, `wechat_push`, or `webhook_push` based on the channel type
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
If `channel_name` does not have an exact match, use this priority:
|
|
166
166
|
|
|
167
|
-
1.
|
|
168
|
-
2.
|
|
169
|
-
3.
|
|
167
|
+
1. exact name match
|
|
168
|
+
2. name keyword match
|
|
169
|
+
3. fallback match by node type and channel type
|
|
170
170
|
|
|
171
171
|
---
|
|
172
172
|
|
|
173
|
-
## 5.
|
|
173
|
+
## 5. Step Three: Map the Intent to `req`
|
|
174
174
|
|
|
175
|
-
### 5.1 `req`
|
|
175
|
+
### 5.1 Top-Level `req` Structure
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
The object passed to `--req` should have the following structure:
|
|
178
178
|
|
|
179
179
|
```json
|
|
180
180
|
{
|
|
@@ -190,104 +190,104 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
190
190
|
}
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
- `projectId`
|
|
195
|
-
- `flowUuid`
|
|
196
|
-
-
|
|
193
|
+
Notes:
|
|
194
|
+
- `projectId` does not need to be written into `--req` manually; the CLI injects it from `--project_id`
|
|
195
|
+
- `flowUuid` and `parentFlowUuid` are mutually exclusive
|
|
196
|
+
- When creating a new draft, neither of these fields should be provided
|
|
197
197
|
|
|
198
|
-
### 5.2
|
|
198
|
+
### 5.2 Sources of Top-Level Fields
|
|
199
199
|
|
|
200
|
-
| `req`
|
|
200
|
+
| `req` Field | Source |
|
|
201
201
|
|---|---|
|
|
202
|
-
| `flowName` |
|
|
203
|
-
| `flowDesc` |
|
|
204
|
-
| `groupId` |
|
|
205
|
-
| `tzOffset` |
|
|
206
|
-
| `nodeList` |
|
|
207
|
-
| `edgeList` |
|
|
202
|
+
| `flowName` | Intent field `flow_name` |
|
|
203
|
+
| `flowDesc` | Intent field `flow_desc`; use an empty string or a short description if absent |
|
|
204
|
+
| `groupId` | Default `0`, unless the business requirement specifies a group |
|
|
205
|
+
| `tzOffset` | User timezone or project default timezone; a common value is `8` |
|
|
206
|
+
| `nodeList` | Generated from intent `entry` plus `nodes` |
|
|
207
|
+
| `edgeList` | Generated from intent `edges` and branch structure |
|
|
208
208
|
|
|
209
209
|
---
|
|
210
210
|
|
|
211
|
-
## 6.
|
|
211
|
+
## 6. Step Four: Map Intent Nodes to Canvas Nodes
|
|
212
212
|
|
|
213
|
-
### 6.1
|
|
213
|
+
### 6.1 Entry Node Mapping
|
|
214
214
|
|
|
215
|
-
|
|
|
215
|
+
| Intent `entry.type` | Canvas node `type` |
|
|
216
216
|
|---|---|
|
|
217
217
|
| `single_trigger` | `single_trigger` |
|
|
218
218
|
| `repeat_trigger` | `repeat_trigger` |
|
|
219
219
|
| `event_trigger` | `event_trigger` |
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
The entry node must always be the only entry node in `nodeList`.
|
|
222
222
|
|
|
223
|
-
### 6.2
|
|
223
|
+
### 6.2 Business Node Mapping
|
|
224
224
|
|
|
225
|
-
|
|
|
225
|
+
| Intent-node semantic meaning | Canvas node `type` |
|
|
226
226
|
|---|---|
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
| A/B
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
| Push
|
|
233
|
-
|
|
|
234
|
-
| Webhook /
|
|
235
|
-
|
|
|
236
|
-
|
|
|
237
|
-
|
|
238
|
-
### 6.3
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
|
227
|
+
| Behavioral split | `event_split_flow` |
|
|
228
|
+
| Feature split | `feature_split_flow` |
|
|
229
|
+
| A/B split | `ab_split_flow` |
|
|
230
|
+
| Behavioral judgment | `event_judge` |
|
|
231
|
+
| Feature judgment | `feature_judge` |
|
|
232
|
+
| Push touchpoint | `message_push` |
|
|
233
|
+
| WeChat touchpoint | `wechat_push` |
|
|
234
|
+
| Webhook / other external touchpoint | `webhook_push` |
|
|
235
|
+
| Wait | `time_control` |
|
|
236
|
+
| End | `exit_flow` |
|
|
237
|
+
|
|
238
|
+
### 6.3 Condition Field Mapping
|
|
239
|
+
|
|
240
|
+
Condition-related semantics cannot be copied into `req` as-is. They must be materialized in the following way:
|
|
241
|
+
|
|
242
|
+
| Semantic type | Target field |
|
|
243
243
|
|---|---|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
|
244
|
+
| Audience segmentation condition | `targetClusterQp` |
|
|
245
|
+
| Feature judgment condition | `targetClusterQp` |
|
|
246
|
+
| Feature split branch condition | `targetClusterQp` |
|
|
247
|
+
| Event trigger condition | `triggerRule[].events[]` |
|
|
248
|
+
| Behavioral judgment condition | `triggerRule[].events[]` |
|
|
249
|
+
| Behavioral split branch condition | `triggerRule[].events[]` |
|
|
250
250
|
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
251
|
+
In short:
|
|
252
|
+
- Conditions that judge by audience or property usually map to `targetClusterQp`
|
|
253
|
+
- Conditions that judge whether an event happened, or how many times it happened, usually map to `triggerRule.events`
|
|
254
254
|
|
|
255
|
-
### 6.4
|
|
255
|
+
### 6.4 Touchpoint Node Mapping
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
These fields inside action-semantic nodes:
|
|
258
258
|
|
|
259
259
|
- `channel_name`
|
|
260
260
|
- `content`
|
|
261
261
|
- `languages`
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
need to be materialized into the push-node `config`:
|
|
264
264
|
|
|
265
|
-
- `channel_name` ->
|
|
266
|
-
- `content` ->
|
|
267
|
-
- `languages` ->
|
|
265
|
+
- `channel_name` -> match to a real `channelId`
|
|
266
|
+
- `content` -> place into `contentList`
|
|
267
|
+
- `languages` -> determine whether multilingual `contentList` entries should be generated
|
|
268
268
|
|
|
269
269
|
---
|
|
270
270
|
|
|
271
|
-
## 7.
|
|
271
|
+
## 7. Step Five: How to Build `nodeList`
|
|
272
272
|
|
|
273
|
-
`nodeList`
|
|
273
|
+
Each item in `nodeList` has the following structure:
|
|
274
274
|
|
|
275
|
-
|
|
|
275
|
+
| Field | Type | Required | Description |
|
|
276
276
|
|---|---|---|---|
|
|
277
|
-
| `id` | string |
|
|
278
|
-
| `name` | string |
|
|
279
|
-
| `type` | string |
|
|
280
|
-
| `config` | string |
|
|
281
|
-
| `desc` | string |
|
|
277
|
+
| `id` | string | Yes | Unique node ID within the request |
|
|
278
|
+
| `name` | string | Yes | Display name of the node |
|
|
279
|
+
| `type` | string | Yes | Node type |
|
|
280
|
+
| `config` | string | Yes | **JSON string** whose top level must be a JSON object |
|
|
281
|
+
| `desc` | string | No | Node description |
|
|
282
282
|
|
|
283
|
-
### 7.1
|
|
283
|
+
### 7.1 Most Important Rules
|
|
284
284
|
|
|
285
|
-
1. `config`
|
|
286
|
-
2. `node.id`
|
|
287
|
-
3.
|
|
288
|
-
4.
|
|
285
|
+
1. `config` must be a string, not an object.
|
|
286
|
+
2. `node.id` must be unique.
|
|
287
|
+
3. Any `branchId` later referenced by `edge.sourceBranchId` in split or judgment nodes must be defined in `config` first.
|
|
288
|
+
4. Every path must eventually end at `exit_flow`.
|
|
289
289
|
|
|
290
|
-
### 7.2
|
|
290
|
+
### 7.2 Common Node Types
|
|
291
291
|
|
|
292
292
|
- `single_trigger`
|
|
293
293
|
- `repeat_trigger`
|
|
@@ -303,12 +303,12 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
303
303
|
- `time_control`
|
|
304
304
|
- `exit_flow`
|
|
305
305
|
|
|
306
|
-
### 7.3
|
|
306
|
+
### 7.3 Example: Simplest Node
|
|
307
307
|
|
|
308
308
|
```json
|
|
309
309
|
{
|
|
310
310
|
"id": "node_1",
|
|
311
|
-
"name": "
|
|
311
|
+
"name": "One-Time Scheduled Entry",
|
|
312
312
|
"type": "single_trigger",
|
|
313
313
|
"config": {
|
|
314
314
|
"triggerTime": "2026-04-10 06:35",
|
|
@@ -317,9 +317,9 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
317
317
|
}
|
|
318
318
|
```
|
|
319
319
|
|
|
320
|
-
### 7.4
|
|
320
|
+
### 7.4 Common `config` Templates
|
|
321
321
|
|
|
322
|
-
|
|
322
|
+
The templates below are the most important references when you assemble `req` directly. Build them as objects first, then wrap them with `JSON.stringify` before placing them into `nodeList[].config`.
|
|
323
323
|
|
|
324
324
|
#### `repeat_trigger`
|
|
325
325
|
|
|
@@ -341,10 +341,10 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
341
341
|
}
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
Rules:
|
|
345
345
|
- `entry.segment` -> `targetClusterQp`
|
|
346
346
|
- `entry.schedule` -> `crontab`
|
|
347
|
-
-
|
|
347
|
+
- Common default value: `0 00 09 * * ?`
|
|
348
348
|
|
|
349
349
|
#### `event_trigger`
|
|
350
350
|
|
|
@@ -376,14 +376,14 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
376
376
|
"enableMultEntry": false,
|
|
377
377
|
"disableConcurrentEntry": false
|
|
378
378
|
},
|
|
379
|
-
"targetClusterQp": "<JSON.stringify(qp)
|
|
379
|
+
"targetClusterQp": "<JSON.stringify(qp) or null>"
|
|
380
380
|
}
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
Rules:
|
|
384
384
|
- `entry.trigger_event` -> `triggerRule[0].events`
|
|
385
|
-
- `entry.segment`
|
|
386
|
-
-
|
|
385
|
+
- Generate `targetClusterQp` only when `entry.segment` exists
|
|
386
|
+
- When `segment` is absent, `targetClusterQp` may be `null`
|
|
387
387
|
|
|
388
388
|
#### `event_split_flow`
|
|
389
389
|
|
|
@@ -399,7 +399,7 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
399
399
|
{
|
|
400
400
|
"delayTimeSymbol": "<minute|hour|day>",
|
|
401
401
|
"delayTime": "<number>",
|
|
402
|
-
"eventTriggerType": "<0
|
|
402
|
+
"eventTriggerType": "<0 or -1>",
|
|
403
403
|
"zoneoffset": 8,
|
|
404
404
|
"events": []
|
|
405
405
|
}
|
|
@@ -409,11 +409,11 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
409
409
|
}
|
|
410
410
|
```
|
|
411
411
|
|
|
412
|
-
|
|
413
|
-
- `branch.condition`
|
|
412
|
+
Rules:
|
|
413
|
+
- When `branch.condition` is an event condition, map it to `triggerRule[].events[]`
|
|
414
414
|
- `time_limit` -> `delayTimeSymbol` + `delayTime`
|
|
415
|
-
-
|
|
416
|
-
-
|
|
415
|
+
- Use `0` for happened and `-1` for not happened
|
|
416
|
+
- For the fallback branch, keep only:
|
|
417
417
|
|
|
418
418
|
```json
|
|
419
419
|
{
|
|
@@ -442,9 +442,9 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
442
442
|
}
|
|
443
443
|
```
|
|
444
444
|
|
|
445
|
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
445
|
+
Rules:
|
|
446
|
+
- Property or tag condition -> `targetClusterQp`
|
|
447
|
+
- For the fallback branch, also keep only `branchId` plus `branchType: 2`
|
|
448
448
|
|
|
449
449
|
#### `ab_split_flow`
|
|
450
450
|
|
|
@@ -453,14 +453,14 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
453
453
|
"branchList": [
|
|
454
454
|
{
|
|
455
455
|
"branchId": "<branchId>",
|
|
456
|
-
"branchName": "
|
|
456
|
+
"branchName": "Control Group",
|
|
457
457
|
"branchType": 1,
|
|
458
458
|
"order": 1,
|
|
459
459
|
"percentageInExperiment": 34
|
|
460
460
|
},
|
|
461
461
|
{
|
|
462
462
|
"branchId": "<branchId>",
|
|
463
|
-
"branchName": "
|
|
463
|
+
"branchName": "Experiment Group A",
|
|
464
464
|
"branchType": 2,
|
|
465
465
|
"order": 2,
|
|
466
466
|
"percentageInExperiment": 33
|
|
@@ -471,9 +471,9 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
471
471
|
}
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
|
|
475
|
-
-
|
|
476
|
-
-
|
|
474
|
+
Rules:
|
|
475
|
+
- If the user does not provide percentages, you may split them evenly
|
|
476
|
+
- For three groups, you can use `34/33/33`
|
|
477
477
|
|
|
478
478
|
#### `event_judge`
|
|
479
479
|
|
|
@@ -494,10 +494,10 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
494
494
|
}
|
|
495
495
|
```
|
|
496
496
|
|
|
497
|
-
|
|
497
|
+
Rules:
|
|
498
498
|
- `node.event` -> `triggerRule[].events[]`
|
|
499
499
|
- `wait_time` -> `delayTimeSymbol` + `delayTime`
|
|
500
|
-
-
|
|
500
|
+
- If no wait duration is specified, you may default to `30 minute`
|
|
501
501
|
|
|
502
502
|
#### `feature_judge`
|
|
503
503
|
|
|
@@ -530,21 +530,21 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
530
530
|
}
|
|
531
531
|
```
|
|
532
532
|
|
|
533
|
-
|
|
534
|
-
- `channel_name` ->
|
|
535
|
-
- `content` ->
|
|
536
|
-
-
|
|
533
|
+
Rules:
|
|
534
|
+
- `channel_name` -> match a real `channelId`
|
|
535
|
+
- `content` -> fill the parameter that best matches body text, content, or message
|
|
536
|
+
- When the parameter `type = TEXT`, also add:
|
|
537
537
|
|
|
538
538
|
```json
|
|
539
539
|
{
|
|
540
|
-
"config": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"
|
|
540
|
+
"config": "[{\"type\":\"paragraph\",\"children\":[{\"text\":\"<same as value>\"}]}]"
|
|
541
541
|
}
|
|
542
542
|
```
|
|
543
543
|
|
|
544
|
-
|
|
545
|
-
-
|
|
546
|
-
-
|
|
547
|
-
-
|
|
544
|
+
Multilingual Rules:
|
|
545
|
+
- The first entry must always use `"pushLanguageCode": "default"`
|
|
546
|
+
- Generate additional language versions according to `languages`
|
|
547
|
+
- Each language uses the same `content[]` structure; only `value` changes
|
|
548
548
|
|
|
549
549
|
#### `wechat_push`
|
|
550
550
|
|
|
@@ -562,7 +562,7 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
562
562
|
"type": "STRING",
|
|
563
563
|
"required": true,
|
|
564
564
|
"paramType": 2,
|
|
565
|
-
"name": "
|
|
565
|
+
"name": "Language",
|
|
566
566
|
"value": "default"
|
|
567
567
|
},
|
|
568
568
|
{
|
|
@@ -570,7 +570,7 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
570
570
|
"type": "STRING",
|
|
571
571
|
"required": true,
|
|
572
572
|
"paramType": 2,
|
|
573
|
-
"name": "
|
|
573
|
+
"name": "Destination Page",
|
|
574
574
|
"value": ""
|
|
575
575
|
},
|
|
576
576
|
{
|
|
@@ -578,7 +578,7 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
578
578
|
"type": "STRING",
|
|
579
579
|
"required": true,
|
|
580
580
|
"paramType": 2,
|
|
581
|
-
"name": "
|
|
581
|
+
"name": "Version",
|
|
582
582
|
"value": ""
|
|
583
583
|
}
|
|
584
584
|
]
|
|
@@ -598,14 +598,14 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
598
598
|
}
|
|
599
599
|
```
|
|
600
600
|
|
|
601
|
-
|
|
602
|
-
- `30
|
|
603
|
-
- `2
|
|
604
|
-
- `1
|
|
601
|
+
Common parsing examples:
|
|
602
|
+
- `30 minutes` -> `minute` + `30`
|
|
603
|
+
- `2 hours` -> `hour` + `2`
|
|
604
|
+
- `1 day` -> `day` + `1`
|
|
605
605
|
|
|
606
606
|
#### `exit_flow`
|
|
607
607
|
|
|
608
|
-
|
|
608
|
+
Minimum usable `config`:
|
|
609
609
|
|
|
610
610
|
```json
|
|
611
611
|
{}
|
|
@@ -613,19 +613,19 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
613
613
|
|
|
614
614
|
---
|
|
615
615
|
|
|
616
|
-
## 8.
|
|
616
|
+
## 8. Step Six: How to Build `edgeList`
|
|
617
617
|
|
|
618
|
-
`edgeList`
|
|
618
|
+
Each item in `edgeList` has the following structure:
|
|
619
619
|
|
|
620
|
-
|
|
|
620
|
+
| Field | Type | Required | Description |
|
|
621
621
|
|---|---|---|---|
|
|
622
|
-
| `source` | string |
|
|
623
|
-
| `target` | string |
|
|
624
|
-
| `edgeId` | string |
|
|
625
|
-
| `sourceBranchId` | string |
|
|
626
|
-
| `config` | string |
|
|
622
|
+
| `source` | string | Yes | upstream node ID |
|
|
623
|
+
| `target` | string | Yes | downstream node ID |
|
|
624
|
+
| `edgeId` | string | No | edge ID |
|
|
625
|
+
| `sourceBranchId` | string | No | used for edges leaving split or judgment nodes |
|
|
626
|
+
| `config` | string | No | JSON string |
|
|
627
627
|
|
|
628
|
-
### 8.1
|
|
628
|
+
### 8.1 Regular Edges
|
|
629
629
|
|
|
630
630
|
```json
|
|
631
631
|
{
|
|
@@ -634,7 +634,7 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
634
634
|
}
|
|
635
635
|
```
|
|
636
636
|
|
|
637
|
-
### 8.2
|
|
637
|
+
### 8.2 Branch Edges
|
|
638
638
|
|
|
639
639
|
```json
|
|
640
640
|
{
|
|
@@ -644,55 +644,55 @@ te-cli te-engage +channel-list --project-id <projectId>
|
|
|
644
644
|
}
|
|
645
645
|
```
|
|
646
646
|
|
|
647
|
-
### 8.3
|
|
647
|
+
### 8.3 Most Important Rules
|
|
648
648
|
|
|
649
|
-
1. `source`
|
|
650
|
-
2.
|
|
651
|
-
3.
|
|
652
|
-
4.
|
|
649
|
+
1. `source` and `target` must reference existing `node.id` values
|
|
650
|
+
2. Only edges leaving split or judgment nodes need `sourceBranchId`
|
|
651
|
+
3. The graph must be a DAG and cannot contain cycles
|
|
652
|
+
4. For split nodes, `sourceBranchId` must come from a branchId already declared in the corresponding node `config`
|
|
653
653
|
|
|
654
|
-
### 8.4
|
|
654
|
+
### 8.4 Standard Outgoing-Edge Rules
|
|
655
655
|
|
|
656
|
-
|
|
|
656
|
+
| node type | Number of outgoing edges | `sourceBranchId` rule |
|
|
657
657
|
|---|---|---|
|
|
658
|
-
| `single_trigger` / `repeat_trigger` / `event_trigger` | 1 |
|
|
659
|
-
| `event_split_flow` / `feature_split_flow` / `ab_split_flow` |
|
|
660
|
-
| `event_judge` / `feature_judge` | 2 |
|
|
661
|
-
| `message_push` / `wechat_push` / `webhook_push` / `time_control` | 1 |
|
|
662
|
-
| `exit_flow` | 0 |
|
|
658
|
+
| `single_trigger` / `repeat_trigger` / `event_trigger` | 1 | do not provide |
|
|
659
|
+
| `event_split_flow` / `feature_split_flow` / `ab_split_flow` | one per branch | use the corresponding `branchList[].branchId` |
|
|
660
|
+
| `event_judge` / `feature_judge` | 2 | use `meetBranchId` and `notMeetBranchId` respectively |
|
|
661
|
+
| `message_push` / `wechat_push` / `webhook_push` / `time_control` | 1 | do not provide |
|
|
662
|
+
| `exit_flow` | 0 | do not provide |
|
|
663
663
|
|
|
664
664
|
---
|
|
665
665
|
|
|
666
|
-
## 9.
|
|
666
|
+
## 9. Step Seven: Graph Constraint Checks
|
|
667
667
|
|
|
668
|
-
|
|
668
|
+
Before submitting, you must self-check:
|
|
669
669
|
|
|
670
|
-
1. `nodeList`
|
|
671
|
-
2.
|
|
672
|
-
3.
|
|
673
|
-
4.
|
|
674
|
-
5.
|
|
675
|
-
6.
|
|
676
|
-
7.
|
|
670
|
+
1. `nodeList` is not empty
|
|
671
|
+
2. There must be exactly one entry node
|
|
672
|
+
3. There must be at least one `exit_flow`
|
|
673
|
+
4. Each `exit_flow` must have exactly one incoming edge and no outgoing edges
|
|
674
|
+
5. Each `node.id` must be unique
|
|
675
|
+
6. Every edge must reference existing nodes
|
|
676
|
+
7. The entire graph must be acyclic
|
|
677
677
|
|
|
678
|
-
|
|
679
|
-
-
|
|
680
|
-
-
|
|
678
|
+
If a split node uses `splitFlowType = 2`, also ensure:
|
|
679
|
+
- Paths from different branches must not converge again into the same node
|
|
680
|
+
- Each branch should independently lead to its own `exit_flow`
|
|
681
681
|
|
|
682
682
|
---
|
|
683
683
|
|
|
684
|
-
## 10.
|
|
684
|
+
## 10. Step Eight: CLI Submission
|
|
685
685
|
|
|
686
|
-
### 10.1
|
|
686
|
+
### 10.1 Top-Level Flags
|
|
687
687
|
|
|
688
|
-
| Flag |
|
|
688
|
+
| Flag | Type | Required | Description |
|
|
689
689
|
|---|---|---|---|
|
|
690
|
-
| `--
|
|
691
|
-
| `--req` | json |
|
|
690
|
+
| `--project_id` / `-p` | number | Yes | Project ID |
|
|
691
|
+
| `--req` | json | Yes | final request-body object |
|
|
692
692
|
|
|
693
|
-
### 10.2 CLI
|
|
693
|
+
### 10.2 Actual CLI Submission Structure
|
|
694
694
|
|
|
695
|
-
CLI
|
|
695
|
+
The CLI will organize the input as:
|
|
696
696
|
|
|
697
697
|
```json
|
|
698
698
|
{
|
|
@@ -704,15 +704,15 @@ CLI 会把输入整理成:
|
|
|
704
704
|
}
|
|
705
705
|
```
|
|
706
706
|
|
|
707
|
-
|
|
708
|
-
-
|
|
709
|
-
- `req.projectId`
|
|
707
|
+
In other words:
|
|
708
|
+
- The top-level `projectId` comes from `--project_id`
|
|
709
|
+
- `req.projectId` is also injected automatically by the CLI
|
|
710
710
|
|
|
711
|
-
### 10.3
|
|
711
|
+
### 10.3 Minimum Working Example
|
|
712
712
|
|
|
713
713
|
```bash
|
|
714
|
-
|
|
715
|
-
--
|
|
714
|
+
ae-cli engage +save_flow \
|
|
715
|
+
--project_id 1 \
|
|
716
716
|
--req '{
|
|
717
717
|
"flowName": "Welcome Flow",
|
|
718
718
|
"flowDesc": "New user welcome flow",
|
|
@@ -721,13 +721,13 @@ te-cli te-engage +save-flow \
|
|
|
721
721
|
"nodeList": [
|
|
722
722
|
{
|
|
723
723
|
"id": "node_1",
|
|
724
|
-
"name": "
|
|
724
|
+
"name": "Enter Flow",
|
|
725
725
|
"type": "single_trigger",
|
|
726
726
|
"config": "{}"
|
|
727
727
|
},
|
|
728
728
|
{
|
|
729
729
|
"id": "node_2",
|
|
730
|
-
"name": "
|
|
730
|
+
"name": "End",
|
|
731
731
|
"type": "exit_flow",
|
|
732
732
|
"config": "{}"
|
|
733
733
|
}
|
|
@@ -741,57 +741,58 @@ te-cli te-engage +save-flow \
|
|
|
741
741
|
}'
|
|
742
742
|
```
|
|
743
743
|
|
|
744
|
-
### 10.4
|
|
744
|
+
### 10.4 Output Requirements After Successful Creation
|
|
745
745
|
|
|
746
|
-
|
|
747
|
-
-
|
|
746
|
+
Prerequisite:
|
|
747
|
+
- The flow canvas was created successfully and returned the new canvas `flowUuid`
|
|
748
748
|
|
|
749
|
-
|
|
750
|
-
-
|
|
751
|
-
-
|
|
749
|
+
On success, you must:
|
|
750
|
+
- Show the creation result to the user, including at least key information such as the canvas name
|
|
751
|
+
- Output a **clickable Markdown link**
|
|
752
752
|
|
|
753
|
-
|
|
754
|
-
-
|
|
755
|
-
- URL
|
|
756
|
-
-
|
|
753
|
+
Link-generation Rules:
|
|
754
|
+
- Use standard Markdown link syntax and do not place it inside a code block
|
|
755
|
+
- The URL must start with `/#/`
|
|
756
|
+
- Do not add a domain name or any domain placeholder
|
|
757
|
+
- Replace the `flowUuid` returned by `save_flow` and the `projectId` used for this creation into the URL
|
|
757
758
|
|
|
758
|
-
|
|
759
|
+
Output template:
|
|
759
760
|
|
|
760
|
-
[
|
|
761
|
+
[Open Canvas](/#/hermes/flow/detail?flowUuid=<replace-with-actual-flowUuid>¤tProjectId=<replace-with-actual-projectId>)
|
|
761
762
|
|
|
762
|
-
|
|
763
|
+
Correct example:
|
|
763
764
|
|
|
764
|
-
[
|
|
765
|
+
[Open Canvas](/#/hermes/flow/detail?flowUuid=0006_831135755¤tProjectId=1)
|
|
765
766
|
|
|
766
|
-
|
|
767
|
-
- `❌ {
|
|
768
|
-
- `❌`
|
|
769
|
-
- `❌ /#/hermes/flow/detail?flowUuid
|
|
767
|
+
Common mistakes:
|
|
768
|
+
- `❌ {domain}/#/hermes/flow/...`: do not add a domain placeholder
|
|
769
|
+
- `❌` putting the link inside a code block ````` : links inside code blocks are not clickable
|
|
770
|
+
- `❌ /#/hermes/flow/detail?flowUuid=...`: do not output a plain-text URL; you must use the `[text](URL)` format
|
|
770
771
|
|
|
771
|
-
### 10.5
|
|
772
|
+
### 10.5 Output Requirements After Failed Creation
|
|
772
773
|
|
|
773
|
-
|
|
774
|
-
-
|
|
775
|
-
-
|
|
774
|
+
On failure, you must:
|
|
775
|
+
- Output the complete request-body JSON for debugging
|
|
776
|
+
- Clearly describe the failure reason
|
|
776
777
|
|
|
777
|
-
|
|
778
|
+
Suggested output structure:
|
|
778
779
|
|
|
779
780
|
```json
|
|
780
781
|
{
|
|
781
|
-
"projectId": "
|
|
782
|
+
"projectId": "<actual projectId>",
|
|
782
783
|
"req": {
|
|
783
|
-
"...": "
|
|
784
|
+
"...": "complete save_flow request body"
|
|
784
785
|
}
|
|
785
786
|
}
|
|
786
787
|
```
|
|
787
788
|
|
|
788
789
|
---
|
|
789
790
|
|
|
790
|
-
## 11.
|
|
791
|
+
## 11. Most Common Mistakes
|
|
791
792
|
|
|
792
|
-
### 11.1 `--req`
|
|
793
|
+
### 11.1 `--req` Is an Object, but `node.config` / `edge.config` Are Strings
|
|
793
794
|
|
|
794
|
-
|
|
795
|
+
Correct:
|
|
795
796
|
|
|
796
797
|
```json
|
|
797
798
|
{
|
|
@@ -802,7 +803,7 @@ te-cli te-engage +save-flow \
|
|
|
802
803
|
}
|
|
803
804
|
```
|
|
804
805
|
|
|
805
|
-
|
|
806
|
+
Incorrect:
|
|
806
807
|
|
|
807
808
|
```json
|
|
808
809
|
{
|
|
@@ -813,9 +814,9 @@ te-cli te-engage +save-flow \
|
|
|
813
814
|
}
|
|
814
815
|
```
|
|
815
816
|
|
|
816
|
-
### 11.2
|
|
817
|
+
### 11.2 Time Units Must Be Lowercase
|
|
817
818
|
|
|
818
|
-
|
|
819
|
+
Inside `time_control`, use:
|
|
819
820
|
|
|
820
821
|
- `day`
|
|
821
822
|
- `hour`
|
|
@@ -823,48 +824,48 @@ te-cli te-engage +save-flow \
|
|
|
823
824
|
- `week`
|
|
824
825
|
- `month`
|
|
825
826
|
|
|
826
|
-
|
|
827
|
+
Do not write `DAY`, `HOUR`, or `MINUTE`.
|
|
827
828
|
|
|
828
|
-
### 11.3
|
|
829
|
+
### 11.3 Do Not Invent `channelId`
|
|
829
830
|
|
|
830
|
-
`message_push
|
|
831
|
+
For node types such as `message_push`, `wechat_push`, and `webhook_push`, `channelId` must come from:
|
|
831
832
|
|
|
832
833
|
```bash
|
|
833
|
-
|
|
834
|
+
ae-cli engage +channel_list --project_id <projectId>
|
|
834
835
|
```
|
|
835
836
|
|
|
836
|
-
### 11.4
|
|
837
|
+
### 11.4 Define branch IDs Before Referencing Them
|
|
837
838
|
|
|
838
|
-
|
|
839
|
+
If an edge uses:
|
|
839
840
|
|
|
840
841
|
```json
|
|
841
842
|
{ "sourceBranchId": "branch_a" }
|
|
842
843
|
```
|
|
843
844
|
|
|
844
|
-
|
|
845
|
+
then `"branch_a"` must already exist in the corresponding upstream node `config`.
|
|
845
846
|
|
|
846
|
-
### 11.5 `targetClusterQp`
|
|
847
|
+
### 11.5 `targetClusterQp` Is Usually Also a String
|
|
847
848
|
|
|
848
|
-
|
|
849
|
+
Although `targetClusterQp` appears inside the JSON object of node `config`, its value is usually not a raw object. It is typically the QP object converted into a string with `JSON.stringify`.
|
|
849
850
|
|
|
850
|
-
|
|
851
|
+
Illustration:
|
|
851
852
|
|
|
852
853
|
```json
|
|
853
854
|
{ "targetClusterQp": "{\"totalCFilter\":{\"relation\":\"1\",\"filts\":[]}}" }
|
|
854
855
|
```
|
|
855
856
|
|
|
856
|
-
### 11.6 `
|
|
857
|
+
### 11.6 Rich-Text `config` for `TEXT` Parameters Must Also Be a String
|
|
857
858
|
|
|
858
|
-
push
|
|
859
|
+
If a push parameter uses `TEXT`, the inner rich-text `config` must not be an object. It must be stringified JSON. This is easy to miss.
|
|
859
860
|
|
|
860
|
-
### 11.7 `splitFlowType = 2`
|
|
861
|
+
### 11.7 Do Not Merge Branches Again When `splitFlowType = 2`
|
|
861
862
|
|
|
862
|
-
|
|
863
|
+
"Enter whenever conditions are met" means users may enter multiple branches at the same time. In that case, later paths should not share the same downstream node, otherwise the semantics easily conflict.
|
|
863
864
|
|
|
864
865
|
---
|
|
865
866
|
|
|
866
|
-
## 12.
|
|
867
|
+
## 12. One-Sentence Summary
|
|
867
868
|
|
|
868
|
-
|
|
869
|
+
To build `+save_flow` input parameters reliably, do not jump directly from natural language to `req`. Follow this path instead:
|
|
869
870
|
|
|
870
|
-
|
|
871
|
+
**User requirement -> intent JSON -> schema and channel completion -> `nodeList` / `edgeList` -> `ae-cli engage +save_flow`.**
|