Skip to content

Commit c454204

Browse files
committed
docs(site): include initial docs showcase site
1 parent 44a6eaf commit c454204

20 files changed

+2107
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
process CraftBusinessLeadToOrder
2+
3+
when lead.created
4+
5+
if lead.source = "referral" then
6+
assign lead.priority = "high"
7+
assign lead.sales_path = "premium"
8+
notify sales with "Handle referral lead first"
9+
10+
else if lead.source = "aroundhome" then
11+
assign lead.priority = "low"
12+
assign lead.sales_path = "standard"
13+
14+
if lead.project_type != "kitchen" and lead.project_type != "interior" then
15+
transition lead.status to "disqualified"
16+
notify sales with "Outside target project type"
17+
stop
18+
19+
if lead.estimated_value < 10000 then
20+
transition lead.status to "disqualified"
21+
notify sales with "Below minimum project value"
22+
stop
23+
24+
transition lead.status to "qualified"
25+
assign lead.owner = "sales"
26+
27+
process QuoteToOrder
28+
29+
when quote.accepted
30+
31+
if order.deposit_received = false then
32+
transition order.status to "awaiting_deposit"
33+
notify finance with "Deposit required before confirmation"
34+
stop
35+
36+
transition order.status to "confirmed"
37+
create production_order
38+
notify operations with "Order ready for production planning"
39+
40+
stateflow OrderLifecycle
41+
42+
states
43+
qualified
44+
quoted
45+
awaiting_deposit
46+
confirmed
47+
in_production
48+
scheduled_for_installation
49+
completed
50+
cancelled
51+
52+
transitions
53+
qualified -> quoted
54+
quoted -> awaiting_deposit
55+
quoted -> confirmed
56+
awaiting_deposit -> confirmed
57+
confirmed -> in_production
58+
in_production -> scheduled_for_installation
59+
scheduled_for_installation -> completed
60+
qualified -> cancelled
61+
quoted -> cancelled
62+
awaiting_deposit -> cancelled
63+
64+
rule NoProductionWithoutDeposit
65+
66+
applies to order
67+
68+
if order.deposit_received = false then
69+
require finance_clearance
70+
notify operations with "Production blocked until deposit is received"
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# OrgScript Mermaid Export
2+
3+
## Process: CraftBusinessLeadToOrder
4+
5+
```mermaid
6+
flowchart TD
7+
p1_start_1(["CraftBusinessLeadToOrder"])
8+
class p1_start_1 success
9+
p1_trigger_2[/ "when lead.created" /]
10+
class p1_trigger_2 trigger
11+
p1_decision_3{"if lead.source = 'referral'"}
12+
class p1_decision_3 decision
13+
p1_action_4["assign lead.priority = 'high'"]
14+
class p1_action_4 action
15+
p1_action_5["assign lead.sales_path = 'premium'"]
16+
class p1_action_5 action
17+
p1_action_6["notify sales with #quot;Handle referral lead first#quot;"]
18+
class p1_action_6 action
19+
p1_decision_7{"if lead.source = 'aroundhome'"}
20+
class p1_decision_7 decision
21+
p1_action_8["assign lead.priority = 'low'"]
22+
class p1_action_8 action
23+
p1_action_9["assign lead.sales_path = 'standard'"]
24+
class p1_action_9 action
25+
p1_decision_10{"if lead.project_type != 'kitchen' and lead.project_type != 'interior'"}
26+
class p1_decision_10 decision
27+
p1_action_11["transition lead.status to 'disqualified'"]
28+
class p1_action_11 action
29+
p1_action_12["notify sales with #quot;Outside target project type#quot;"]
30+
class p1_action_12 action
31+
p1_stop_13(["stop"])
32+
class p1_stop_13 stop
33+
p1_decision_14{"if lead.estimated_value < 10000"}
34+
class p1_decision_14 decision
35+
p1_action_15["transition lead.status to 'disqualified'"]
36+
class p1_action_15 action
37+
p1_action_16["notify sales with #quot;Below minimum project value#quot;"]
38+
class p1_action_16 action
39+
p1_stop_17(["stop"])
40+
class p1_stop_17 stop
41+
p1_action_18["transition lead.status to 'qualified'"]
42+
class p1_action_18 action
43+
p1_action_19["assign lead.owner = 'sales'"]
44+
class p1_action_19 action
45+
p1_end_20(["done"])
46+
class p1_end_20 success
47+
p1_start_1 --> p1_trigger_2
48+
p1_trigger_2 --> p1_decision_3
49+
p1_decision_3 -->|yes| p1_action_4
50+
p1_action_4 --> p1_action_5
51+
p1_action_5 --> p1_action_6
52+
p1_decision_3 -->|no| p1_decision_7
53+
p1_decision_7 -->|yes| p1_action_8
54+
p1_action_8 --> p1_action_9
55+
p1_action_6 --> p1_decision_10
56+
p1_action_9 --> p1_decision_10
57+
p1_decision_7 -->|no| p1_decision_10
58+
p1_decision_10 -->|yes| p1_action_11
59+
p1_action_11 --> p1_action_12
60+
p1_action_12 --> p1_stop_13
61+
p1_decision_10 -->|no| p1_decision_14
62+
p1_decision_14 -->|yes| p1_action_15
63+
p1_action_15 --> p1_action_16
64+
p1_action_16 --> p1_stop_17
65+
p1_decision_14 -->|no| p1_action_18
66+
p1_action_18 --> p1_action_19
67+
p1_action_19 --> p1_end_20
68+
69+
%% Styling
70+
classDef trigger fill:#f0f4ff,stroke:#5c7cfa,stroke-width:2px
71+
classDef decision fill:#fff9db,stroke:#fab005,stroke-width:2px
72+
classDef action fill:#fff,stroke:#adb5bd,stroke-width:1px
73+
classDef stop fill:#fff5f5,stroke:#ff8787,stroke-width:2px
74+
classDef success fill:#f4fce3,stroke:#94d82d,stroke-width:2px
75+
```
76+
77+
## Process: QuoteToOrder
78+
79+
```mermaid
80+
flowchart TD
81+
p2_start_1(["QuoteToOrder"])
82+
class p2_start_1 success
83+
p2_trigger_2[/ "when quote.accepted" /]
84+
class p2_trigger_2 trigger
85+
p2_decision_3{"if order.deposit_received = false"}
86+
class p2_decision_3 decision
87+
p2_action_4["transition order.status to 'awaiting_deposit'"]
88+
class p2_action_4 action
89+
p2_action_5["notify finance with #quot;Deposit required before confirmation#quot;"]
90+
class p2_action_5 action
91+
p2_stop_6(["stop"])
92+
class p2_stop_6 stop
93+
p2_action_7["transition order.status to 'confirmed'"]
94+
class p2_action_7 action
95+
p2_action_8["create production_order"]
96+
class p2_action_8 action
97+
p2_action_9["notify operations with #quot;Order ready for production planning#quot;"]
98+
class p2_action_9 action
99+
p2_end_10(["done"])
100+
class p2_end_10 success
101+
p2_start_1 --> p2_trigger_2
102+
p2_trigger_2 --> p2_decision_3
103+
p2_decision_3 -->|yes| p2_action_4
104+
p2_action_4 --> p2_action_5
105+
p2_action_5 --> p2_stop_6
106+
p2_decision_3 -->|no| p2_action_7
107+
p2_action_7 --> p2_action_8
108+
p2_action_8 --> p2_action_9
109+
p2_action_9 --> p2_end_10
110+
111+
%% Styling
112+
classDef trigger fill:#f0f4ff,stroke:#5c7cfa,stroke-width:2px
113+
classDef decision fill:#fff9db,stroke:#fab005,stroke-width:2px
114+
classDef action fill:#fff,stroke:#adb5bd,stroke-width:1px
115+
classDef stop fill:#fff5f5,stroke:#ff8787,stroke-width:2px
116+
classDef success fill:#f4fce3,stroke:#94d82d,stroke-width:2px
117+
```
118+
119+
## Stateflow: OrderLifecycle
120+
121+
```mermaid
122+
stateDiagram-v2
123+
state "qualified" as s3_state_1
124+
[*] --> s3_state_1
125+
state "quoted" as s3_state_2
126+
state "awaiting_deposit" as s3_state_3
127+
state "confirmed" as s3_state_4
128+
state "in_production" as s3_state_5
129+
state "scheduled_for_installation" as s3_state_6
130+
state "completed" as s3_state_7
131+
state "cancelled" as s3_state_8
132+
s3_state_1 --> s3_state_2
133+
s3_state_2 --> s3_state_3
134+
s3_state_2 --> s3_state_4
135+
s3_state_3 --> s3_state_4
136+
s3_state_4 --> s3_state_5
137+
s3_state_5 --> s3_state_6
138+
s3_state_6 --> s3_state_7
139+
s3_state_1 --> s3_state_8
140+
s3_state_2 --> s3_state_8
141+
s3_state_3 --> s3_state_8
142+
s3_state_7 --> [*]
143+
s3_state_8 --> [*]
144+
```
145+
146+
> Note: Mermaid export currently supports only process and stateflow blocks. Skipped: rule NoProductionWithoutDeposit.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# OrgScript Logic Summary
2+
3+
## Contents
4+
5+
- [process: CraftBusinessLeadToOrder](#process-craftbusinessleadtoorder)
6+
- [process: QuoteToOrder](#process-quotetoorder)
7+
- [stateflow: OrderLifecycle](#stateflow-orderlifecycle)
8+
- [rule: NoProductionWithoutDeposit](#rule-noproductionwithoutdeposit)
9+
10+
---
11+
12+
## Process: CraftBusinessLeadToOrder
13+
14+
### Trigger
15+
- Triggered when `lead.created`.
16+
17+
### Flow Summary
18+
- If `lead.source = "referral"`, assign `lead.priority` to `"high"`, assign `lead.sales_path` to `"premium"`, and notify `sales` with `"Handle referral lead first"`.
19+
- Else if `lead.source = "aroundhome"`, assign `lead.priority` to `"low"` and assign `lead.sales_path` to `"standard"`.
20+
- If `lead.project_type != "kitchen" and lead.project_type != "interior"`, transition `lead.status` to `"disqualified"`, notify `sales` with `"Outside target project type"`, and stop execution.
21+
- If `lead.estimated_value < 10000`, transition `lead.status` to `"disqualified"`, notify `sales` with `"Below minimum project value"`, and stop execution.
22+
- Then transition `lead.status` to `"qualified"` and assign `lead.owner` to `"sales"`.
23+
24+
---
25+
26+
## Process: QuoteToOrder
27+
28+
### Trigger
29+
- Triggered when `quote.accepted`.
30+
31+
### Flow Summary
32+
- If `order.deposit_received = false`, transition `order.status` to `"awaiting_deposit"`, notify `finance` with `"Deposit required before confirmation"`, and stop execution.
33+
- Then transition `order.status` to `"confirmed"`, create `production_order`, and notify `operations` with `"Order ready for production planning"`.
34+
35+
---
36+
37+
## Stateflow: OrderLifecycle
38+
39+
### States
40+
- `qualified`
41+
- `quoted`
42+
- `awaiting_deposit`
43+
- `confirmed`
44+
- `in_production`
45+
- `scheduled_for_installation`
46+
- `completed`
47+
- `cancelled`
48+
49+
### Transitions
50+
- From `qualified` to `quoted`.
51+
- From `quoted` to `awaiting_deposit`.
52+
- From `quoted` to `confirmed`.
53+
- From `awaiting_deposit` to `confirmed`.
54+
- From `confirmed` to `in_production`.
55+
- From `in_production` to `scheduled_for_installation`.
56+
- From `scheduled_for_installation` to `completed`.
57+
- From `qualified` to `cancelled`.
58+
- From `quoted` to `cancelled`.
59+
- From `awaiting_deposit` to `cancelled`.
60+
61+
---
62+
63+
## Rule: NoProductionWithoutDeposit
64+
65+
### Scope
66+
- Applies to `order`.
67+
68+
### Rule Behavior
69+
- If `order.deposit_received = false`, require `finance_clearance` and notify `operations` with `"Production blocked until deposit is received"`.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
stateflow ApplicationLifecycle
2+
3+
states
4+
received
5+
screening
6+
interview-round-1
7+
interview-round-2
8+
offer_sent
9+
background_check
10+
hired
11+
rejected
12+
13+
transitions
14+
received -> screening
15+
screening -> interview-round-1
16+
screening -> rejected
17+
interview-round-1 -> interview-round-2
18+
interview-round-1 -> rejected
19+
interview-round-2 -> offer_sent
20+
interview-round-2 -> rejected
21+
offer_sent -> background_check
22+
offer_sent -> rejected
23+
background_check -> hired
24+
background_check -> rejected
25+
26+
role HiringManager
27+
28+
can
29+
shortlist candidate
30+
interview candidate
31+
approve offer
32+
33+
role HumanResources
34+
35+
can
36+
create job posting
37+
schedule interview
38+
send offer
39+
verify background
40+
41+
role Candidate
42+
43+
can
44+
submit application
45+
accept offer
46+
47+
policy GDPRCompliance
48+
49+
when candidate.data_processing_consent = false
50+
then
51+
require data_anonymization
52+
notify dpo with "Non-consenting candidate record created"
53+
54+
rule ScreeningMandatory
55+
56+
applies to application
57+
58+
if application.status = "interview-round-1" then
59+
require screening_notes
60+
61+
process StandardHiring
62+
63+
when candidate.application_submitted
64+
65+
transition application.status to "received"
66+
notify hr_team with "New candidate application"
67+
68+
if candidate.role_match_score > 70 then
69+
transition application.status to "screening"
70+
assign application.assigned_to = "hiring_manager"
71+
72+
else
73+
transition application.status to "rejected"
74+
notify candidate with "Thank you for your interest"
75+
stop
76+
77+
if application.screening_outcome = "positive" then
78+
transition application.status to "interview-round-1"
79+
create interview_invite
80+
81+
else
82+
transition application.status to "rejected"
83+
stop

0 commit comments

Comments
 (0)