[DP-3] Action Path with Results
Problem
Users need to view results of an API action or continue performing additional actions.
What does this pattern do?
Provide results & additional details after a Paths API call.
I need to submit a new PO
What's the Purchase Order for?
Need to purchase 30 Macbook Airs for new hires joining next month
API call to middleware to:
1. Submit the purchase order in source system:
{
"po_description": "Need to purchase 30 Macbook Airs for new hires joining next month",
"requestor_email": "gwen@moveworks.ai"
}
2. Generate tracking link & return with Events API:
{
"message": "👉 You can track your PO here.",
"recipients": ["gwen@moveworks.ai"]
}
Got it, I've successfully submitted your Purchase Order request.
Event notification is delivered
👉 You can track PO123 here.
Example Use Cases
- Procurement: Show purchase order tracking link after submission
- HR: Collect CSAT feedback after user updates information in Workday
- Productivity: Show calendar invite after scheduling a meeting
Design Considerations
Design time
- Must handle chaining Events to a Paths using automation tools.
- Must send Events follow up after Paths shows user confirmation. May need to delay your Events API call accordingly.
Run time
- Bot will always show default Paths success / fail confirmations.
- Bot will ask all questions sequentially & will not "shortcut"