[DP-28] Filter Records by ID / Keyword

Problem

Employees contact experts to assemble simple reports filtering by a business record they're interested in.

What does this pattern do?

Apply filters against your internal databases and return rows that match an ID provided by the user. You can visualize this as a filter applied on a table like below:

dp 28
[object Object]
Gwen11:43 AM

I'm in building 86 -- where's the nearest printer?

Moveworks converts "building 86" to "86" and passes to to API:

{"building": "86"}

API returns a list of printer objects matching the criteria:
[{"printer": "Calisto", ...}, {"printer": Titan", ...}]

[object Object]
Moveworks11:43 AM

One moment, fetching your results. This may take ~10 seconds

Calista: Canon PIXMA
Titan: Epson Workforce
[object Object]
Gwen11:43 AM

Show me Titan.

[object Object]
Moveworks11:43 AM

Sure, here is Titan.

Titan: Epson Workforce
Paper Level: Full
Driver Installation: Click here

Example Use Cases

  1. Finance: Find Invoices by their linked PO ID
  2. IT: View watchers on an incident

Design Considerations

Design time

  • Must return non-200 status code if records are not found
  • Must return a list of records. Each record should be a simple JSON dictionary from API for EACH record. (No embedded lists)
SupportedNot Supported
Copy
Copied
  [
    { "attribute1": "value1" },
    { "attribute2": "value2" },
  ]
Copy
Copied
[
  { "attribute1": [{"related_record_id_1": "value1"}, {"related_record_id_2": "value2"}] },
  { "attribute2": "value2" },
]
  • Your automation tools should use the exact ID that's extracted from the user.

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 ID if it is omitted from the utterance
  • Bot will support up to 20 records in the list view.