-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproduct_order_flow
21 lines (21 loc) · 4.75 KB
/
product_order_flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// GoalChain
digraph {
node [fillcolor="#FFFFFF" fontname=Helvetica shape=box style="rounded,filled"]
edge [fontname=Helvetica]
G0 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>Product Order</B></TD></TR><TR><TD ALIGN='LEFT'><I>Goal:</I> to obtain information on an order to be made</TD></TR><TR><TD ALIGN='LEFT'><I>Opener:</I> I see you are trying to order a product, how can I help you?</TD></TR><TR><TD><TABLE BORDER='1' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT' COLSPAN='4'><U>Fields:</U></TD></TR><TR><TD ALIGN='LEFT'><B>Name</B></TD><TD ALIGN='LEFT'><B>Description</B></TD><TD ALIGN='LEFT'><B>Format</B></TD><TD ALIGN='LEFT'><B>Validator</B></TD></TR><TR><TD ALIGN='LEFT'>customer_email</TD><TD ALIGN='LEFT'>customer email</TD><TD ALIGN='LEFT'>a string</TD><TD ALIGN='LEFT'>-</TD></TR><TR><TD ALIGN='LEFT'>product_name</TD><TD ALIGN='LEFT'>product to be ordered</TD><TD ALIGN='LEFT'>a string</TD><TD ALIGN='LEFT'>-</TD></TR><TR><TD ALIGN='LEFT'>quantity</TD><TD ALIGN='LEFT'>quantity of product</TD><TD ALIGN='LEFT'>an integer</TD><TD ALIGN='LEFT'>quantity_validator</TD></TR></TABLE></TD></TR></TABLE>> fillcolor="#AEDFF7" shape=box style="rounded,filled"]
G1 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>Cancel Current Order</B></TD></TR><TR><TD ALIGN='LEFT'><I>Goal:</I> to obtain the reason for the cancellation</TD></TR><TR><TD ALIGN='LEFT'><I>Opener:</I> I see you are trying to cancel the current order, how can I help you?</TD></TR><TR><TD><TABLE BORDER='1' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT' COLSPAN='4'><U>Fields:</U></TD></TR><TR><TD ALIGN='LEFT'><B>Name</B></TD><TD ALIGN='LEFT'><B>Description</B></TD><TD ALIGN='LEFT'><B>Format</B></TD><TD ALIGN='LEFT'><B>Validator</B></TD></TR><TR><TD ALIGN='LEFT'>reason</TD><TD ALIGN='LEFT'>reason for order cancellation (optional)</TD><TD ALIGN='LEFT'>a string</TD><TD ALIGN='LEFT'>-</TD></TR></TABLE></TD></TR></TABLE>> fillcolor="#AEDFF7" shape=box style="rounded,filled"]
G2 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>High-Value Order Verification</B></TD></TR><TR><TD ALIGN='LEFT'><I>Goal:</I> to verify high-value orders</TD></TR><TR><TD ALIGN='LEFT'><I>Opener:</I> Since you're ordering a large quantity, we need to verify your order by sending you a verification code over email.</TD></TR><TR><TD><TABLE BORDER='1' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT' COLSPAN='4'><U>Fields:</U></TD></TR><TR><TD ALIGN='LEFT'><B>Name</B></TD><TD ALIGN='LEFT'><B>Description</B></TD><TD ALIGN='LEFT'><B>Format</B></TD><TD ALIGN='LEFT'><B>Validator</B></TD></TR><TR><TD ALIGN='LEFT'>quantity</TD><TD ALIGN='LEFT'>quantity of product</TD><TD ALIGN='LEFT'>an integer</TD><TD ALIGN='LEFT'>quantity_validator</TD></TR><TR><TD ALIGN='LEFT'>verification_code</TD><TD ALIGN='LEFT'>verification code</TD><TD ALIGN='LEFT'>a 6-digit code</TD><TD ALIGN='LEFT'>-</TD></TR></TABLE></TD></TR></TABLE>> fillcolor="#AEDFF7" shape=box style="rounded,filled"]
A0 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>Action: process_order</B></TD></TR><TR><TD ALIGN='LEFT'><I>Response Template</I></TD></TR><TR><TD ALIGN='LEFT'>[Rephrase]</TD></TR><TR><TD ALIGN='LEFT'>[End]</TD></TR></TABLE>> fillcolor="#FFD1DC" shape=box style="rounded,filled"]
A1 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>Action: cancel_order</B></TD></TR><TR><TD ALIGN='LEFT'><I>Response Template</I></TD></TR><TR><TD ALIGN='LEFT'>[Rephrase]</TD></TR><TR><TD ALIGN='LEFT'>[End]</TD></TR></TABLE>> fillcolor="#FFD1DC" shape=box style="rounded,filled"]
A2 [label=<<TABLE BORDER='0' CELLBORDER='0' CELLSPACING='0'><TR><TD ALIGN='LEFT'><B>Action: process_high_value_order</B></TD></TR><TR><TD ALIGN='LEFT'><I>Response Template</I></TD></TR><TR><TD ALIGN='LEFT'>[Rephrase]</TD></TR><TR><TD ALIGN='LEFT'>[End]</TD></TR></TABLE>> fillcolor="#FFD1DC" shape=box style="rounded,filled"]
G0 -> A0 [label="" color=black fontcolor=black fontsize=10 style=solid]
G0 -> G1 [label="to cancel the current order" color=black fontcolor=black fontsize=10 style=solid]
G1 -> A1 [label="" color=black fontcolor=black fontsize=10 style=solid]
G1 -> G0 [label="to continue with the order anyway" color=black fontcolor=black fontsize=10 style=solid]
G2 -> A2 [label="" color=black fontcolor=black fontsize=10 style=solid]
G2 -> G1 [label="to cancel the current order" color=black fontcolor=black fontsize=10 style=solid]
G0 -> G2 [label="is_high_quantity
\"Since this order is for a large quantity, we need to verify the order.\"" color=orange fontcolor=orange fontsize=10 style=dashed]
G2 -> G0 [label="is_normal_quantity
\"The order is no longer a high-value order. Proceeding without verification.\"" color=orange fontcolor=orange fontsize=10 style=dashed]
}