9595 ul {
9696 padding-left : 1.5rem ;
9797 }
98- .status-bar {
99- display : flex;
100- gap : 1rem ;
101- margin-top : 1rem ;
102- font-size : 0.875rem ;
103- }
104- .tag {
105- background : # e2e8f0 ;
106- padding : 0.2rem 0.6rem ;
107- border-radius : 999px ;
108- }
10998 </ style >
11099</ head >
111100< body >
112101 < header >
113102 < h1 > OrgScript Demo: Craft Business: Lead to Order</ h1 >
114- < p > Generated by OrgScript v0.6.0 </ p >
103+ < p > Generated by OrgScript</ p >
115104 </ header >
116105
117106 < nav >
@@ -131,72 +120,73 @@ <h2>Table of Contents</h2>
131120 < h2 > CraftBusinessLeadToOrder</ h2 >
132121 < div class ="summary-container ">
133122
123+
134124 < p > < strong > Triggered by:</ strong > < code > lead.created</ code > </ p >
135125 < p > Orchestrates business logic and state transitions for the < code > CraftBusinessLeadToOrder</ code > process.</ p >
136126
137127 </ div >
138128 < div class ="visual-container "> < h3 > Diagram</ h3 > < pre class ="mermaid "> flowchart TD
139- p1_start_1([" CraftBusinessLeadToOrder" ])
129+ p1_start_1([" CraftBusinessLeadToOrder" ])
140130 class p1_start_1 success
141- p1_trigger_2[/ " when lead.created" /]
131+ p1_trigger_2[/ " when lead.created" /]
142132 class p1_trigger_2 trigger
143- p1_decision_3{" if lead.source = ' referral'" }
133+ p1_decision_3{" if lead.source = ' referral'" }
144134 class p1_decision_3 decision
145- p1_action_4[" assign lead.priority = ' high'" ]
135+ p1_action_4[" assign lead.priority = ' high'" ]
146136 class p1_action_4 action
147- p1_action_5[" assign lead.sales_path = ' premium'" ]
137+ p1_action_5[" assign lead.sales_path = ' premium'" ]
148138 class p1_action_5 action
149- p1_action_6[" notify sales with #quot;Handle referral lead first#quot;" ]
139+ p1_action_6[" notify sales with #quot;Handle referral lead first#quot;" ]
150140 class p1_action_6 action
151- p1_decision_7{" if lead.source = ' aroundhome'" }
141+ p1_decision_7{" if lead.source = ' aroundhome'" }
152142 class p1_decision_7 decision
153- p1_action_8[" assign lead.priority = ' low'" ]
143+ p1_action_8[" assign lead.priority = ' low'" ]
154144 class p1_action_8 action
155- p1_action_9[" assign lead.sales_path = ' standard'" ]
145+ p1_action_9[" assign lead.sales_path = ' standard'" ]
156146 class p1_action_9 action
157- p1_decision_10{" if lead.project_type != ' kitchen' and lead.project_type != ' interior'" }
147+ p1_decision_10{" if lead.project_type != ' kitchen' and lead.project_type != ' interior'" }
158148 class p1_decision_10 decision
159- p1_action_11[" transition lead.status to ' disqualified'" ]
149+ p1_action_11[" transition lead.status to ' disqualified'" ]
160150 class p1_action_11 action
161- p1_action_12[" notify sales with #quot;Outside target project type#quot;" ]
151+ p1_action_12[" notify sales with #quot;Outside target project type#quot;" ]
162152 class p1_action_12 action
163- p1_stop_13([" stop" ])
153+ p1_stop_13([" stop" ])
164154 class p1_stop_13 stop
165- p1_decision_14{" if lead.estimated_value < 10000 " }
155+ p1_decision_14{" if lead.estimated_value < 10000" }
166156 class p1_decision_14 decision
167- p1_action_15[" transition lead.status to ' disqualified'" ]
157+ p1_action_15[" transition lead.status to ' disqualified'" ]
168158 class p1_action_15 action
169- p1_action_16[" notify sales with #quot;Below minimum project value#quot;" ]
159+ p1_action_16[" notify sales with #quot;Below minimum project value#quot;" ]
170160 class p1_action_16 action
171- p1_stop_17([" stop" ])
161+ p1_stop_17([" stop" ])
172162 class p1_stop_17 stop
173- p1_action_18[" transition lead.status to ' qualified'" ]
163+ p1_action_18[" transition lead.status to ' qualified'" ]
174164 class p1_action_18 action
175- p1_action_19[" assign lead.owner = ' sales'" ]
165+ p1_action_19[" assign lead.owner = ' sales'" ]
176166 class p1_action_19 action
177- p1_end_20([" done" ])
167+ p1_end_20([" done" ])
178168 class p1_end_20 success
179- p1_start_1 --> p1_trigger_2
180- p1_trigger_2 --> p1_decision_3
181- p1_decision_3 --> |yes| p1_action_4
182- p1_action_4 --> p1_action_5
183- p1_action_5 --> p1_action_6
184- p1_decision_3 --> |no| p1_decision_7
185- p1_decision_7 --> |yes| p1_action_8
186- p1_action_8 --> p1_action_9
187- p1_action_6 --> p1_decision_10
188- p1_action_9 --> p1_decision_10
189- p1_decision_7 --> |no| p1_decision_10
190- p1_decision_10 --> |yes| p1_action_11
191- p1_action_11 --> p1_action_12
192- p1_action_12 --> p1_stop_13
193- p1_decision_10 --> |no| p1_decision_14
194- p1_decision_14 --> |yes| p1_action_15
195- p1_action_15 --> p1_action_16
196- p1_action_16 --> p1_stop_17
197- p1_decision_14 --> |no| p1_action_18
198- p1_action_18 --> p1_action_19
199- p1_action_19 --> p1_end_20
169+ p1_start_1 --> p1_trigger_2
170+ p1_trigger_2 --> p1_decision_3
171+ p1_decision_3 --> |yes| p1_action_4
172+ p1_action_4 --> p1_action_5
173+ p1_action_5 --> p1_action_6
174+ p1_decision_3 --> |no| p1_decision_7
175+ p1_decision_7 --> |yes| p1_action_8
176+ p1_action_8 --> p1_action_9
177+ p1_action_6 --> p1_decision_10
178+ p1_action_9 --> p1_decision_10
179+ p1_decision_7 --> |no| p1_decision_10
180+ p1_decision_10 --> |yes| p1_action_11
181+ p1_action_11 --> p1_action_12
182+ p1_action_12 --> p1_stop_13
183+ p1_decision_10 --> |no| p1_decision_14
184+ p1_decision_14 --> |yes| p1_action_15
185+ p1_action_15 --> p1_action_16
186+ p1_action_16 --> p1_stop_17
187+ p1_decision_14 --> |no| p1_action_18
188+ p1_action_18 --> p1_action_19
189+ p1_action_19 --> p1_end_20
200190
201191 %% Styling
202192 classDef trigger fill:#f0f4ff,stroke:#5c7cfa,stroke-width:2px
@@ -212,40 +202,41 @@ <h2>CraftBusinessLeadToOrder</h2>
212202 < h2 > QuoteToOrder</ h2 >
213203 < div class ="summary-container ">
214204
205+
215206 < p > < strong > Triggered by:</ strong > < code > quote.accepted</ code > </ p >
216207 < p > Orchestrates business logic and state transitions for the < code > QuoteToOrder</ code > process.</ p >
217208
218209 </ div >
219210 < div class ="visual-container "> < h3 > Diagram</ h3 > < pre class ="mermaid "> flowchart TD
220- p1_start_1([" QuoteToOrder" ])
211+ p1_start_1([" QuoteToOrder" ])
221212 class p1_start_1 success
222- p1_trigger_2[/ " when quote.accepted" /]
213+ p1_trigger_2[/ " when quote.accepted" /]
223214 class p1_trigger_2 trigger
224- p1_decision_3{" if order.deposit_received = false" }
215+ p1_decision_3{" if order.deposit_received = false" }
225216 class p1_decision_3 decision
226- p1_action_4[" transition order.status to ' awaiting_deposit'" ]
217+ p1_action_4[" transition order.status to ' awaiting_deposit'" ]
227218 class p1_action_4 action
228- p1_action_5[" notify finance with #quot;Deposit required before confirmation#quot;" ]
219+ p1_action_5[" notify finance with #quot;Deposit required before confirmation#quot;" ]
229220 class p1_action_5 action
230- p1_stop_6([" stop" ])
221+ p1_stop_6([" stop" ])
231222 class p1_stop_6 stop
232- p1_action_7[" transition order.status to ' confirmed'" ]
223+ p1_action_7[" transition order.status to ' confirmed'" ]
233224 class p1_action_7 action
234- p1_action_8[" create production_order" ]
225+ p1_action_8[" create production_order" ]
235226 class p1_action_8 action
236- p1_action_9[" notify operations with #quot;Order ready for production planning#quot;" ]
227+ p1_action_9[" notify operations with #quot;Order ready for production planning#quot;" ]
237228 class p1_action_9 action
238- p1_end_10([" done" ])
229+ p1_end_10([" done" ])
239230 class p1_end_10 success
240- p1_start_1 --> p1_trigger_2
241- p1_trigger_2 --> p1_decision_3
242- p1_decision_3 --> |yes| p1_action_4
243- p1_action_4 --> p1_action_5
244- p1_action_5 --> p1_stop_6
245- p1_decision_3 --> |no| p1_action_7
246- p1_action_7 --> p1_action_8
247- p1_action_8 --> p1_action_9
248- p1_action_9 --> p1_end_10
231+ p1_start_1 --> p1_trigger_2
232+ p1_trigger_2 --> p1_decision_3
233+ p1_decision_3 --> |yes| p1_action_4
234+ p1_action_4 --> p1_action_5
235+ p1_action_5 --> p1_stop_6
236+ p1_decision_3 --> |no| p1_action_7
237+ p1_action_7 --> p1_action_8
238+ p1_action_8 --> p1_action_9
239+ p1_action_9 --> p1_end_10
249240
250241 %% Styling
251242 classDef trigger fill:#f0f4ff,stroke:#5c7cfa,stroke-width:2px
@@ -261,32 +252,33 @@ <h2>QuoteToOrder</h2>
261252 < h2 > OrderLifecycle</ h2 >
262253 < div class ="summary-container ">
263254
255+
264256 < p > < strong > States:</ strong > < code > qualified</ code > , < code > quoted</ code > , < code > awaiting_deposit</ code > , < code > confirmed</ code > , < code > in_production</ code > , < code > scheduled_for_installation</ code > , < code > completed</ code > , < code > cancelled</ code > </ p >
265257 < p > < strong > Transitions:</ strong > 10 paths defined.</ p >
266258
267259 </ div >
268260 < div class ="visual-container "> < h3 > Diagram</ h3 > < pre class ="mermaid "> stateDiagram-v2
269- state " qualified" as s1_state_1
270- [*] --> s1_state_1
271- state " quoted" as s1_state_2
272- state " awaiting_deposit" as s1_state_3
273- state " confirmed" as s1_state_4
274- state " in_production" as s1_state_5
275- state " scheduled_for_installation" as s1_state_6
276- state " completed" as s1_state_7
277- state " cancelled" as s1_state_8
278- s1_state_1 --> s1_state_2
279- s1_state_2 --> s1_state_3
280- s1_state_2 --> s1_state_4
281- s1_state_3 --> s1_state_4
282- s1_state_4 --> s1_state_5
283- s1_state_5 --> s1_state_6
284- s1_state_6 --> s1_state_7
285- s1_state_1 --> s1_state_8
286- s1_state_2 --> s1_state_8
287- s1_state_3 --> s1_state_8
288- s1_state_7 --> [*]
289- s1_state_8 --> [*]</ pre > </ div >
261+ state " qualified" as s1_state_1
262+ [*] --> s1_state_1
263+ state " quoted" as s1_state_2
264+ state " awaiting_deposit" as s1_state_3
265+ state " confirmed" as s1_state_4
266+ state " in_production" as s1_state_5
267+ state " scheduled_for_installation" as s1_state_6
268+ state " completed" as s1_state_7
269+ state " cancelled" as s1_state_8
270+ s1_state_1 --> s1_state_2
271+ s1_state_2 --> s1_state_3
272+ s1_state_2 --> s1_state_4
273+ s1_state_3 --> s1_state_4
274+ s1_state_4 --> s1_state_5
275+ s1_state_5 --> s1_state_6
276+ s1_state_6 --> s1_state_7
277+ s1_state_1 --> s1_state_8
278+ s1_state_2 --> s1_state_8
279+ s1_state_3 --> s1_state_8
280+ s1_state_7 --> [*]
281+ s1_state_8 --> [*]</ pre > </ div >
290282 </ section >
291283
292284
@@ -295,6 +287,7 @@ <h2>OrderLifecycle</h2>
295287 < h2 > NoProductionWithoutDeposit</ h2 >
296288 < div class ="summary-container ">
297289
290+
298291 < p > < strong > Scope:</ strong > Applies to < code > order</ code > </ p >
299292 < p > Contains behavioral constraints and logic for < code > NoProductionWithoutDeposit</ code > .</ p >
300293
@@ -305,7 +298,7 @@ <h2>NoProductionWithoutDeposit</h2>
305298 </ main >
306299
307300 < footer >
308- < p > OrgScript — Human-readable, AI-interpretable business logic.</ p >
301+ < p > OrgScript - Human-readable, AI-interpretable business logic.</ p >
309302 </ footer >
310303
311304 < script type ="module ">
0 commit comments