[DP-8] Filter Records by Name
Problem
Employees contact experts to assemble simple reports filtering by a business record they're interested in.
What does this pattern do?
Convert names provided by users into API IDs before filtering a table to relevant rows. You can visualize this as a filter applied on a table like below:
Who is the current on-call for the Infrastructure team?
Moveworks extracts "Infrastructure" and maps it to the API value:
{"team_id": "team-728-infra"}
One moment, fetching your results. This may take ~10 seconds
Paul Brudebaker: +1 (555) 999-0000
Drew Downs: +1 (555) 987-6543
Show me more about Paul
Sure thing! Here is the current on-call details for the Infrastructure team:
IT Infrastructure: Paul Brudebaker
Title: Director of Infrastructure
Emergency Phone: +1 (555) 999-0000
On-call Since: July 1, 2023
Emergency Phone: +1 (555) 999-0000
On-call Since: July 1, 2023
Example Use Cases
- Engineering: Find on-call by Team Name
- Sales: Find Opportunities by Account Name
- Finance: Find invoices by vendor name
Design Considerations
Design time
- Must return non-200 status code if records are not found
- Must provide a list of sample aliases for common names to Moveworks customer support.
- Must return a JSON dictionary from the API. (No embedded lists)SupportedNot Supported
{ "attribute1": "value1", "attribute2": { "nested_attribute_1": "value2" } }
{ "record": [ { "attribute1": "value1" }, { "attribute2": { "nested_attribute_1": "value2" }} ] }
- Must display a single record of attributes & values. Multiple records, or related records are not supported in this design pattern.
Run time
- Bot will make an API call for each possible ID detected. This will give your users a more robust experience.
- Bot will not ask for the "name" if it is omitted from the utterance