Enable Order Activity View in STORE webapps
Author:
Fluent Commerce
Changed on:
3 Dec 2023
Key Points
- 2 main steps to enable order activity view in STORE app.
- add OMS plugin to your store fragment,
- add EVENT_VIEW permission to your location user
Steps
Current view
By default, the STORE is not able to display the Activity tab as component fc.activity.entity is under the OMS plugin

Add plugin
Add the oms plugin into your store app JSON: fc.mystique.manifest.store. (Also add the order fragment into the store fragment which contains the activity view)

Check Order Activity View after the the plugin is added
After adding the oms plugin, log on to your store webapp and open up the activity tab, you should able to see the webapps is returning a message: fc.events.activity.list.noRecords

Add new role and permission
This error message means the location user does not have sufficient permission to view the log. Therefore create a new role with this permission: EVENT_VIEW

1
2{ POST: {{fluentApiHost}}/graphql }
3
4
5mutation {
6 createRole(input: {name: "STORE_ORDER_VIEW", permissions: [
7 {
8 name: "EVENT_VIEW"
9 }
10 ]}) {
11 name
12 permissions {
13 name
14 }
15 }
16}
17
Language: json
Name: new role and permission
Description:
[Warning: empty required content area]
Assign the new role to the location user

1POST: {{fluentApiHost}}/graphql
2
3QUERY:
4mutation updateUser ($input: UpdateUserInput) {
5 updateUser (input: $input) {
6 id
7 ref
8 username
9 title
10 firstName
11 lastName
12 primaryEmail
13 primaryPhone
14 type
15 status
16 department
17 country
18 timezone
19 promotionOptIn
20 createdOn
21 updatedOn
22 }
23}
24
25Variables:
26{
27 "input": {
28 "id": 667,
29 "roles": [
30
31 {
32 "contexts": [
33 {
34 "contextId": "1",
35 "contextType": "RETAILER"
36 },
37 {
38 "contextId": "59",
39 "contextType": "AGENT"
40 }
41 ],
42 "role": {
43 "name": "STORE_ORDER_VIEW"
44 }
45
46 }
47 ]
48
49 }
50}
Language: json
Name: Assign the new role to the location user
Description:
[Warning: empty required content area]
Update user role
Do not worry if you make a mistake. use this to remove roles from the user:
1
2POST:{{fluentApiHost}}/graphql
3
4mutation{
5 removeUserRolesFromUser(input:{
6 user:{username:"LOC_MELB2"}
7 roles:{
8 role:{name:"STORE_ORDER_VIEW"} contexts:{contextType:"AGENT" contextId:"59"}
9 }
10 }) {
11 status
12 }
13}
Language: plain_text
Name: update user
Description:
[Warning: empty required content area]
Test result
logout, refresh the browser and login again and you should able to see the activity content in STORE webapps:
