cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sany98
Helper I
Helper I

Create unique order ID directly from virtual agent

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
renatoromao
Super User
Super User

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 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

View solution in original post

8 REPLIES 8
renatoromao
Super User
Super User

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”.


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português
sany98
Helper I
Helper I

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
Super User
Super User

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....


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português
Jcook
MVP

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.


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





@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

 

renatoromao
Super User
Super User

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


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português
sany98
Helper I
Helper I

@renatoromao 

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

 

sany98_1-1611233091710.png

Sharepoint list

sany98_2-1611233194880.png

 

renatoromao
Super User
Super User

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 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (4,373)