@synap-core/workspace-templates 0.53.0 → 0.55.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/dist/index.js +151 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/retired.yaml +10 -0
- package/skills/design-critique/SKILL.md +1 -1
- package/skills/designing-with-real-components/SKILL.md +9 -5
- package/src/builder.yaml +15 -4
- package/src/crm.yaml +102 -12
- package/src/design-to-implementation.template.test.ts +22 -1
- package/src/lead-automations.test.ts +73 -18
- package/src/templates.ts +151 -5
- package/automations/lead-converted-becomes-client.automation.json +0 -89
- package/automations/lead-converted-becomes-client.catalog.json +0 -13
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "A lead signs: it becomes a client",
|
|
3
|
-
"description": "When a lead moves to converted (the client signed; a person's move, so an agent's move is a proposal the person approves first), the lead is stamped with the date it converted and the same person or company gets the client role, handed off to Operations. Operations' \"Onboard a client\" starts when the client role is attached. The converted lead role stays as the history of the sale. Attaching the client role again is a no-op, so the CRM app's own handoff and this rule never add a second client role.",
|
|
4
|
-
"triggerType": "event",
|
|
5
|
-
"status": "active",
|
|
6
|
-
"triggerConfig": {
|
|
7
|
-
"eventPattern": "entity.transition.completed",
|
|
8
|
-
"filters": { "lifecycleProfile": "lead", "to": "converted" }
|
|
9
|
-
},
|
|
10
|
-
"flowDefinition": {
|
|
11
|
-
"nodes": [
|
|
12
|
-
{
|
|
13
|
-
"id": "t",
|
|
14
|
-
"type": "trigger",
|
|
15
|
-
"position": { "x": 0, "y": 0 },
|
|
16
|
-
"data": {
|
|
17
|
-
"label": "A lead moved to converted",
|
|
18
|
-
"triggerType": "event",
|
|
19
|
-
"config": {
|
|
20
|
-
"eventPattern": "entity.transition.completed",
|
|
21
|
-
"filters": { "lifecycleProfile": "lead", "to": "converted" }
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"id": "has-entity",
|
|
27
|
-
"type": "guard",
|
|
28
|
-
"position": { "x": 0, "y": 120 },
|
|
29
|
-
"data": {
|
|
30
|
-
"label": "The move names the person or company that signed",
|
|
31
|
-
"checks": [
|
|
32
|
-
{
|
|
33
|
-
"path": "trigger.payload.data.entityId",
|
|
34
|
-
"minLength": 36,
|
|
35
|
-
"message": "The lead's move names no person or company: there is no one to make a client."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"id": "now",
|
|
42
|
-
"type": "compute",
|
|
43
|
-
"position": { "x": 0, "y": 240 },
|
|
44
|
-
"data": {
|
|
45
|
-
"label": "When the lead signed",
|
|
46
|
-
"operation": "now"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"id": "stamp-lead",
|
|
51
|
-
"type": "output",
|
|
52
|
-
"position": { "x": 0, "y": 360 },
|
|
53
|
-
"data": {
|
|
54
|
-
"label": "Stamp the lead with the date it converted",
|
|
55
|
-
"outputType": "facet_update",
|
|
56
|
-
"config": {
|
|
57
|
-
"entityId": "{{trigger.payload.data.entityId}}",
|
|
58
|
-
"facetSlug": "lead",
|
|
59
|
-
"properties": { "convertedAt": "{{steps.now.output.result}}" }
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"id": "become-client",
|
|
65
|
-
"type": "output",
|
|
66
|
-
"position": { "x": 0, "y": 480 },
|
|
67
|
-
"data": {
|
|
68
|
-
"label": "Attach the client role, handed off to Operations",
|
|
69
|
-
"outputType": "facet_attach",
|
|
70
|
-
"config": {
|
|
71
|
-
"entityId": "{{trigger.payload.data.entityId}}",
|
|
72
|
-
"facetSlug": "client",
|
|
73
|
-
"properties": {
|
|
74
|
-
"becameClientAt": "{{steps.now.output.result}}",
|
|
75
|
-
"handoffStatus": "handed_off",
|
|
76
|
-
"handoffDestination": "Operations"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
"edges": [
|
|
83
|
-
{ "id": "e1", "source": "t", "target": "has-entity" },
|
|
84
|
-
{ "id": "e2", "source": "has-entity", "target": "now" },
|
|
85
|
-
{ "id": "e3", "source": "now", "target": "stamp-lead" },
|
|
86
|
-
{ "id": "e4", "source": "stamp-lead", "target": "become-client" }
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"apiVersion": "synap/v1",
|
|
3
|
-
"kind": "automation",
|
|
4
|
-
"meta": {
|
|
5
|
-
"slug": "lead-converted-becomes-client",
|
|
6
|
-
"name": "A lead signs: it becomes a client",
|
|
7
|
-
"description": "When a person moves a lead to converted (signed), the lead is stamped with the date and the same person or company gets the client role, handed off to Operations, where \"Onboard a client\" starts. Needs the lead and client roles (foundation); attaching the role twice is a no-op.",
|
|
8
|
-
"tags": ["automation", "crm", "lead", "client", "operations"],
|
|
9
|
-
"isPublic": false,
|
|
10
|
-
"owner": "template-owner"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": []
|
|
13
|
-
}
|