[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:

dp 8
[object Object]
Gwen11:43 AM

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"}

[object Object]
Moveworks11:43 AM

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

Paul Brudebaker: +1 (555) 999-0000
Drew Downs: +1 (555) 987-6543
[object Object]
Gwen11:43 AM

Show me more about Paul

[object Object]
Moveworks11:43 AM

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

Example Use Cases

  1. Engineering: Find on-call by Team Name
  2. Sales: Find Opportunities by Account Name
  3. 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
    Copy
    Copied
    {
      "attribute1": "value1",
      "attribute2": { 
        "nested_attribute_1": "value2" 
      }
    }
    Copy
    Copied
    {
      "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