Passing information from Service Manager notification template to a Microsoft powerapps via URL
Hello, first time question here.
When we send the completed notification for a Service Request, we include a link to a survey hosted in powerapps via a link in the email. Currently the URL passes the Ticket ID using the following URL (tenant ID Xd out)
https://apps.powerapps.com/play/e/default-
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/a/b1d6a633-47ca-4793-ba94-2d5065779ece?tenantId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&TicketID=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$
We want to also pass the name of the technician the ticket was assigned to...but that appears to use 2 different libraries, and the query does not work.
https://apps.powerapps.com/play/e/default-
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/a/b1d6a633-47ca-4793-ba94-2d5065779ece?tenantId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&TicketID=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$&TechName=$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemAssignedToUser'%20TypeConstraint='System_Library!System.User']/Property[Type='System_Library!System.User']/DisplayName$
Does anyone know of a way I can pass the Assigned To information to powerapps using a URL?
Thanks!
Answers
Hi @Chris_Cromwell
Nice question. I've just been digging into deep linking into PowerApps. Its a very cool concept.
The above method should be good. Are you using the Email Notification editor to generate these "tokens"?
Geoff
Hi @Geoff_Ross
Yes, we are using a Service Manager notification template with a link to the powerapps survey (I can post a screen capture). The link has the code above that passes the Ticket ID to the survey, and as I mentioned, I have added the query for the assigned technician, but it does not resolve the way the ticket ID does. The query does resolve properly in the HTML of the template but not the URL.
Chris, thats odd.
I don't see why being in a url would make a different. The SDK just replaces the tokens with the values, without considering context.
What does the URL come out as?
Geoff
The only thing I can think of is that the ticket ID query is a single query with no spaces. The assigned to is two separate with a space in the middle (which I have compensated for in the URL by inserting a %20), but it comes out like this:
You can see just to the left side the TicketID is coming out ok...but the TechName does not.
The last part of the URL is
&TicketID=SR0215480&TechName=$Context/Path%5bRelationship=%27CustomSystem_WorkItem_Library!System.WorkItemAssignedToUser%27%20TypeConstraint=%27System_Library!System.User%27%5d/Property%5bType=%27System_Library!System.User%27%5d/DisplayName$