Skip to content

Commit fa089f8

Browse files
committed
Adding screenshots and finishing architecture doc
1 parent 1e4f977 commit fa089f8

9 files changed

+95
-3
lines changed

Documentation/Architecture.md

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,101 @@
11
# Architecture
22

3+
The below documentation details the architecture of the Prompt Pulse solution. Prompt Pulse is provided as a Power Apps solution file (**unmanaged**), this allows easy updates when new versions are released.
4+
5+
## Connectors
6+
7+
The following connectors are used in the Prompt Pulse solution:
8+
9+
- Viva Engage
10+
- Office 365 Users
11+
- SharePoint
12+
- Microsoft Teams
13+
14+
When executed from the Power App (to retrieve Groups, Teams and Viva Engage communities) they will be executed in the context of the current user so they should only see ones they have access to. They will also only see group chats they are part of.
15+
16+
The above connectors are also used in the Power Automate flows.
17+
318
## Power App
419

5-
The Prompt Pulse Power App is a canvas app using mostly **modern** controls which provides an interface to share prompts directly, schedule the sharing of prompts and view prompts (all/recent/liked).
20+
The Prompt Pulse Power App is a canvas app using mostly **modern** controls where possible. Prompts that are shared/scheduled are stored in the **Prompts** SharePoint list.
21+
22+
The app uses the above connectors to interact with the SharePoint site/lists and retrieve the locations in which to share the prompts.
23+
24+
The app can be customized if you wish, though it's worth noting that customizations will be lost if you attempt to update the solution in the future when new releases are available.
25+
26+
# Flows
27+
28+
Detailed information about the flows used in the solution can be found below:
29+
30+
31+
## Send Prompt:
32+
33+
Triggers when an item in the Prompts list is created or modified using the 'When an item is created or modified' SharePoint trigger.
34+
35+
The following trigger condition is used to only trigger the flow when a prompt should be sent:
36+
37+
```@equals(triggerBody()?['Status']?['Value'], 'Send')```
38+
39+
The flow uses a switch statement to switch on the value of the 'ShareLocation' column and based on the value, the relevant actions are used to post the adaptive cards/message in the Viva Engage community.
40+
41+
The status of the list item is then updated to 'Sent'.
42+
43+
**Please note - The cards and message will be sent AS the user whom you deployed the solution as. You may change the connections if you wish to change the user.**
44+
45+
If the flow fails, a scope has been used to capture the error and the 'Status' column will be updated with the value **Failure**, you can then locate the flow and troubleshoot the error.
46+
47+
48+
## Send Scheduled Prompt
49+
50+
Triggers on a recurrent schedule (default is 5 minutes). The flow retrieves all prompts that are scheduled to be sent by using the following odata query on the 'Get Items' action:
51+
52+
```ScheduledDateTime lt '@{outputs('Current_datetime')}' and Status eq 'Not Sent' and Scheduled eq 1```
53+
54+
The remainder of the flow is the same as the **Send Prompt** flow.
55+
56+
## Like Prompt
57+
58+
This flow is triggered using the 'When someone responds to an adaptive card' trigger and is executed when the user clicks the 'Like Prompt' button in the adaptive card.
59+
60+
The user responding to the adaptive card is retrieved from the 'Users' list and the prompt list item is retrieved from the 'Prompts' list.
61+
62+
The flow then increments the value of the 'Likes' column by 1 and adds the prompt to an array. The value of the 'LikedPrompts' column in the Users list is checked to see whether it already contains the current prompt id.
63+
64+
If this value does not exist, it is appended to an array and the value of the 'LikedPrompts' column in the Users list is updated.
65+
66+
## Data Source
67+
68+
As detailed in the [Overview](Documentation/Overview.md) documentation, there are 3 SharePoint lists used in prompt pulse. Please see the details of each list below and what each column is used for:
69+
70+
### Prompts list
71+
72+
| Column Name | Type | Used for |
73+
| -------- | ------- | ------- |
74+
| Prompt | Multiple lines of text | Storing the prompt text.
75+
| Likes | Number | Number of likes the prompt list item has.
76+
| ShareLocation | Choice | Location to share the prompt to.
77+
| Users | Person or Group (Allow multiple selections) | Users to share the prompt to.
78+
| TeamId | Single line of text | Id of the Team selected in the app to share the prompt to.
79+
| ChannelId | Single line of text | Id of the Channel selected in the app to share the prompt to.
80+
| GroupId | Single line of text | Id of the Group selected in the app (when sharing to Viva Engage).
81+
| GroupChatId | Single line of text | Id of the Group Chat selected in the app to share the prompt to.
82+
| MessageId | Single line of text | Unique id of the adaptive card message - used so we can refer back to it in Power Automate.
83+
| Scheduled | Yes/No | Whether or not the prompt has been scheduled.
84+
| ScheduledDateTime | Date and time | Date/Time to send the prompt.
85+
| Status | Choice | Status of the prompt.
86+
87+
### Users list
88+
89+
| Column Name | Type | Values |
90+
| -------- | ------- | ------- |
91+
| User | Person or Group | The user that has opened Prompt Pulse.
92+
| LikedPrompts | Lookup | The prompts that the user has liked.
93+
| TutorialComplete | Yes/No | Whether or not the user has completed the tutorial.
94+
95+
### Configuration list
696

7-
The app is fully responsive and works on mobile devices 📱 (please note that completion of the initial tutorial needs to be carried out on a desktop device).
97+
| Column Name | Type | Used for |
98+
| -------- | ------- | ------- |
99+
| Value | Single line of text | The configuration value.
8100

9101

-4.12 KB
Loading
5.71 KB
Loading
6.04 KB
Loading
66.7 KB
Loading
12.3 KB
Loading
34.9 KB
Loading
32.5 KB
Loading

Documentation/Overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can then paste the prompt into Microsoft 365 Copilot.
4747

4848
The **All Prompts** tab allows you to view all prompts that have been shared, text can also be copied by clicking the tile.
4949

50-
The adaptive card also has a button which will take a user straight to the **All Prompts** screen.
50+
The adaptive card also has a button which will take a user straight to the **All Prompts** screen. Please note - this will open the app as a 'personal' app due to restrictions with deeplinking, if the user does not have the app installed they will be prompted to install it.
5151

5252
### Liking prompts
5353

0 commit comments

Comments
 (0)