Skip to main content
Solved

Handling mixed input types (Email vs. Computer Name) in a single slot

  • November 11, 2025
  • 7 replies
  • 66 views

I am trying to build a conversational process that can target either a user's email or computer name. Is it possible to configure a slot to automatically handle user input as follows?

  • If the input is an email address, use it as the slot value.
  • If the input is not in an email address format, attempt to find a user by that name and use the matching user's email address as the slot value. If no matching user is found, use the original input text as the slot value.

I plan to use a decision policy to process this slot differently based on whether it’s an email address or a computer name.

Thank you.

Best answer by Kevin Mok

Hey ​@nanthid You will need two separate slots for your use case, because you are looking to have a User slot and a string slot, and you cannot mix  & match two data types in one slot. And a third slot to disambiguate between the two slots.

My approach here would be the following:

  • Have three slots:
    • user (User data type)
    • device_name (string data type)
    • decision (string data type with a static resolver)
      • Query by user - raw_value: “user”
      • Query by device name - raw_value: “device_name
  • Decision policy with two cases with decision as a required slot
    • data.decision.value == “user”
      • Http action has the user slot as required
    • data.decision.value == “device_name”
      • HTTP action has the device_name slot as required

This way, it should be as deterministic as possible, and based on the user's utterance, it should be able to infer the decision and not ask between the two options and move on to collect the correct slot.

 

7 replies

Forum|alt.badge.img+2

hey ​@nanthid , could you share a bit more about what you’re expecting from the user as the input? i’m not sure where the “Computer Name” fits in here. regardless, finding the user’s email is usually pretty simple if it’s the same email that is ingested by MW from your identity source. you can use the meta_info.user.email_addr user attribute to automatically find the user’s email.

you also may not need to use a decision policy to determine which data to use (either user input or resolved email address), you could try using a Slot Resolver which can be dynamic or static. also see the user attribute data bank option, specifically for use in the resolver in this section


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • Answer
  • November 11, 2025

Hey ​@nanthid You will need two separate slots for your use case, because you are looking to have a User slot and a string slot, and you cannot mix  & match two data types in one slot. And a third slot to disambiguate between the two slots.

My approach here would be the following:

  • Have three slots:
    • user (User data type)
    • device_name (string data type)
    • decision (string data type with a static resolver)
      • Query by user - raw_value: “user”
      • Query by device name - raw_value: “device_name
  • Decision policy with two cases with decision as a required slot
    • data.decision.value == “user”
      • Http action has the user slot as required
    • data.decision.value == “device_name”
      • HTTP action has the device_name slot as required

This way, it should be as deterministic as possible, and based on the user's utterance, it should be able to infer the decision and not ask between the two options and move on to collect the correct slot.

 


  • Author
  • New Participant
  • November 12, 2025

Hi ​@chaney.zimmerman, ​@Kevin Mok,

Thank you for your responses.

 

What I want to do is allow user to ask questions like, "How is John Doe's laptop performing?" or "How is john.doe@xxx.com’s PC performing?" or "How is device_name performing?" and get the performance summary of the specified user’s computer(s) or the specified computer.

  • If the input is a user’s email, run HTTP action1, passing the email as a parameter.
  • If the input is a user’s name, resolve it to an email, then run HTTP action1, passing the email as a parameter.
  • If the input is a computer name, run HTTP action2, passing the computer name as a parameter.

Would this be possible without the user having to specify whether the input is a user or a computer name?

 

Thank you.


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • November 12, 2025

It’s going to be hard doing that because it’s nondeterministic - with the static resolver I mentioned, you can prompt it in the description with something such as “Never ask for this slot and infer based on the user’s utterance, try that out, and the Assistant will probably never ask the user and fill the slot itself

 

You can also provide the examples above for it to understand where to steer the slot.


  • Author
  • New Participant
  • November 13, 2025

Hi ​@Kevin Mok,


Thank you. I’ll try that.


  • Author
  • New Participant
  • November 14, 2025

Hi ​@Kevin Mok ,


Just wanted to report back that your suggestion works.

I configures decision’s inference policy to “Infer slot value if available”. Most of the time, it correcty infer the input type and does not ask user to confirm.

Thank you.


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • November 14, 2025

Glad it worked out!