web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Copilot Studio - General
Suggested answer

How to Define Trigger Phrases for dynamic value

(0) ShareShare
ReportReport
Posted on by 38
Whenever user posts a message as "jobname,status,approvername" it should trigger the Bot. The Jobname, status and approvername values are dynamic and comma is the delimiter. How to Define the trigger Phrases  for this? 
 
After triggering need to capture the jobname value into JobName variable , Status into Status variable and approvername into approver variable and ask the user confirm the details by posting the values . 
 
Need to do the validation also. if jobname is not started with devjob123 then we should inform the user the jobname is wrong and please provide valid jobname. 
status should match with list of given valus (open, inprogress, closed), if other than this should throw an error message to user. 
approvername also should contain in the list .
 
Please guide me to do this steps using virtual agents ? 
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    266 on at
    How to Define Trigger Phrases for dynamic value

    Steps to Automate the Process in Power Virtual Agents:


    1. Define Trigger Phrases Automatically

    In PVA, define a trigger that will recognize a message pattern like "jobname,status,approvername." You don’t need to say it every time manually, as PVA will catch the dynamic inputs once the trigger is set.

    • Add the following trigger phrases:
      • jobname, status, approvername
      • jobname status approvername
      • jobname status approvername (with spaces)
    • Regular expression support (for better matching) can be used, though PVA doesn’t directly support regex, but the general delimiter will work as intended.

    2. Capture User Input Dynamically

    To capture values like JobName, Status, and ApproverName:

    1. Add a Message Node to prompt the user:
      • "Please enter the job details in the format: jobname, status, approvername."
    2. Extract values from the user input after triggering the topic.
      • Use a Power Automate flow to handle the splitting and capturing of each part from the comma-separated string.
      • In the flow, the input will be split into three parts and assigned to variables (JobName, Status, ApproverName).

    3. Implement Validation Logic

    Now, validate these values automatically once they are captured.

    JobName Validation:

    • Condition Node: If JobName doesn’t start with devjob123, return an error message:
      • "The job name is invalid. Please provide a job name that starts with 'devjob123'."

    Status Validation:

    • Condition Node: Check if Status matches one of open, inprogress, or closed. If not:
      • "The status is invalid. Valid statuses are 'open', 'inprogress', or 'closed'."

    ApproverName Validation:

    • Condition Node: Compare ApproverName with a predefined list of allowed names. If the name is not found:
      • "The approver name is invalid. Please provide a valid approver name from the list."

    4. Confirm Details Automatically

    Once the values are captured and validated, you can automatically ask the user to confirm the details.

    Example Confirmation:

    • Message Node:
      `"You provided the following details:
      • Job Name: {{JobName}}
      • Status: {{Status}}
      • Approver Name: {{ApproverName}}
        Is this correct?"`
    • Yes/No Options:
      • Yes: Continue processing.
      • No: Ask the user to provide the details again.

    5. Automate the Process

    After these steps, the process will be automated without requiring you to ask for a post every time. Once the bot receives the input in the correct format, the validations will happen automatically. If there are any errors, the bot will inform the user and ask for corrections. If everything is valid, it will proceed with the next steps.


    Sample Flow Overview

    1. Trigger Phrase: User enters the job details in the format "jobname,status,approvername".
    2. Power Automate Flow: Split the input into JobName, Status, and ApproverName.
    3. Validation: Check the validity of each variable (e.g., does JobName start with devjob123, is Status valid, and is ApproverName approved?).
    4. Confirmation: Automatically ask the user to confirm the extracted details.
    5. If Correct: Proceed with the next steps.
    6. If Incorrect: Ask the user to re-enter the details.

    This setup will ensure that your PVA bot is fully automated and handles dynamic inputs, validations, and responses without manual intervention each time.

  • Suggested answer
    CU27110519-0 Profile Picture
    38 on at
    How to Define Trigger Phrases for dynamic value
    Thanks for the reply.
    Whenever user enter <anystring>,<anystring>,<anyemail> pattern the topic should get triggered. 
    I have added the following trigger phrases:
    • jobname, status, approvername
    • jobname status approvername
    • jobname status approvername (with spaces)
    But While testing the bot with batchjob, close , john . it is not getting triggered.
     
    The requirement is - User will enter the sentence as batchjob, close , john . whenever user enters the jobname, status, approver format the topic should get triggered. 
     
    jobname, status, approver are dynamic values. 
     
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 364 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 309 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 53 Moderator

Last 30 days Overall leaderboard