Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Answered

Create unique order ID directly from virtual agent

(0) ShareShare
ReportReport
Posted on by 52

Hello
I have created an ordering flow and connected it with my power virtual agent. Our employees can, among other things, use the agent to order services and products. Everything works well and the orders are sent to the right manager for approval and everything is saved to an sharepoint list. What I miss is that the agent creates a unique order ID for each order. I'm a beginner at this 🙂 and it's a little too difficult for me. Appreciate if anyone can help me.

 

This is what a flow looks like. After the employee has placed an order, the Agent / Robot shows a summary of that order (name, address, email, phone, order type, product, etc) before it is sent to the manager for approval. I also want to show order ID in that summary.

 

Thank you in advance!

 

Categories:
  • Verified answer
    renatoromao Profile Picture
    renatoromao 6,819 on at
    Re: Create unique order ID directly from virtual agent

    It's hidden.

    Create an action above this email action called "Compose".

    Basically in this action, maybe you will able to see the ID field, insert the ID and after you add the output of compose action to your email.

     

    @sany98 

  • sany98 Profile Picture
    sany98 52 on at
    Re: Create unique order ID directly from virtual agent

    @renatoromao 

    The problem is that ID does not appear in the Dynamic content.

     

    sany98_1-1611233091710.png

    Sharepoint list

    sany98_2-1611233194880.png

     

  • renatoromao Profile Picture
    renatoromao 6,819 on at
    Re: Create unique order ID directly from virtual agent

    Hi @sany98 ,

     

    I created a simple example that you can do it.

     

    1- Create your order inside SharePoint (insert the list, fields, etc)

    2- You can send inside the email all properties that you create inside your SharePoint item (but you will search about "ID"), you don't need to get object by Id because you just need to use this ID.

     

    When you create an item inside SharePoint, this ID is filled automatically and is an auto incremental field with numbers. (1, 2, 3, 4,...)

     

    sample-1.pngsample-2.png

  • sany98 Profile Picture
    sany98 52 on at
    Re: Create unique order ID directly from virtual agent

    @Jcook 

    I used Get Item to retrieve ID but have problems with the next step. What do I need to do to be able to send that ID by email with the rest of information?

     

    sany98_0-1611225565632.png

     

  • Jcook Profile Picture
    Jcook 7,770 on at
    Re: Create unique order ID directly from virtual agent

    Hello @sany98 

     

    As @renatoromao has mentioned, When putting the information inside SharePoint, you can pass the ID of the item from SharePoint to your Bot, and display to user.

  • renatoromao Profile Picture
    renatoromao 6,819 on at
    Re: Create unique order ID directly from virtual agent

    Hi @sany98 ,

     

    You can see some ready articles about it using Power Automate with SharePoint:

    Solved: Create unique ID like 2019-001 - Power Platform Community (microsoft.com)

    Solved: Unique ID like 2019-01 with condition don't count ... - Power Platform Community (microsoft.com)

  • sany98 Profile Picture
    sany98 52 on at
    Re: Create unique order ID directly from virtual agent

    Hi @renatoromao 

     

    Thank you for your reply!

     

    I understand that, but I want to create a unique order ID when the user places the order in the chat with the agent. The agent then shows the summary including the new Order ID to the employee / customer and sends it to the appropriate manager for approval. When the manager has approved, a confirmation is sent by email to the employee / customer which contains the same summary that the agent has created, including a new Order ID. In the last step, everything is saved in the sharepoint list.
    This is how my flow is structured and works, except for order id of course 🙂

  • renatoromao Profile Picture
    renatoromao 6,819 on at
    Re: Create unique order ID directly from virtual agent

    Hi @sany98 ,

     

    you don’t need to create a order Id code, inside Sharepoint data we have a internal id that is unique.

     

    You can use it, it’s called “ID”.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,526

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics