Actions
The actions
attribute is used to whitelist user actions on the List and Details screens.
There are two types of action:
jobAction
: Actions that are on a job level. These actions appear in a panel at the top right of the Details screen. Supported actions:Receipt
,View Notes
.txnAction
: Actions specific to their associated Txn. Supported actions:Assign
,Claim
,Decision
,Recover
,Release
,Unassign
,View Form
,Withdraw
,Custom
.
Each of these actions has their own display rules as described below.
Job Actions
Receipt
The Receipt action opens a modal displaying the current Txn formReceipt. If there is more than one receipt attached to the Txn, the modal includes a dropdown list allowing the user to select a receipt to view.
Display rules
txn.job || txn.receiptUrl;
View Notes
This action displays the list of available notes/comments associated with a job in a modal. If the Txn is not associated with a job, any notes/comments will be shown for that Txn.
Display rules
txn.comments;
Txn Actions
Assign
This action opens a dropdown list of usernames to pick from. When a user is selected, the current Txn is assigned to that user.
Display rules
txn.taskType === 'Review' &&
txn.userLoginName === '' &&
txn.availableActions.includes('assign') &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
note
Task assignment happens in Workspaces based on a user's email address. Make sure all JM user accounts have distinct email addresses.
Claim
This action assigns the current Txn to the current user.
Display rules
txn.taskType === 'Review' &&
txn.userLoginName === '' &&
txn.availableActions.includes('assign') &&
txn.userLoginName === currentUser &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Decision
This action opens a modal with the current Txn formUrl and &pageId=decision
.
info
We send the query parameter &pageId=decision
in the URL so that it can be used to support special handling on the Maestro form. We also send a message using a postMessage API with the following schema:
{
pageId: 'decision';
}
Display rules
This action is available on the Details screen only, not on the List screen.
!shortcut &&
txn.taskType === 'Review' &&
txn.userLoginName === currentUser &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Reassign
This action opens a dropdown list of usernames to pick from. When a user is selected, the current Txn is reassigned to that user (without having to unassign it first).
Display rules
txn.taskType === 'Review' &&
txn.userLoginName === currentUser &&
txn.availableActions.includes('assign') &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
note
Task assignment happens in Workspaces based on a user's email address. Make sure all JM user accounts have distinct email addresses.
Recover
The Recover action re-opens an abandoned Txn.
Display rules
txn.taskType !== 'Review' &&
txn.availableActions.includes('reopen') &&
txn.userLoginName === currentUser &&
txn.formStatus === 'Abandoned';
Release
This action unassigns the current Txn; that is, it removes the Txn's assignee. This action is available only if the current user is the assignee.
Display rules
txn.taskType === 'Review' &&
txn.availableActions.includes('unassign') &&
txn.userLoginName === currentUser &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Unassign
This action unassigns the current Txn; that is, it removes the Txn's assignee. Unassign
differs from Release
in that you can unassign another user, and that it is made available only to users with management oversight.
Display rules
txn.taskType === 'Review' &&
txn.availableActions.includes('unassign') &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
info
If both the Release
and Unassign
actions are enabled for a Txn then Release
takes precedence and Unassign
is not displayed.
View Form
This action opens a modal with the current Txn formUrl and &pageId=view
.
info
We send the query parameter &pageId=view
in the URL so that it can be used to support special handling on the Maestro form. We also send a message using a postMessage API with the following schema:
{
pageId: 'view';
}
Display rules
txn.taskType !== 'Review' &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Withdraw
The Withdraw action is used to abandon a saved Txn.
Display rules
txn.taskType === 'Review' &&
txn.userLoginName === currentUser &&
!['Completed', 'Abandoned', 'Expired', 'Submitted'].includes(txn.formStatus);
Custom
When this action type is activated in the UI, a dropdown list of custom actions is displayed. Two custom action types are supported: url
and invoke
.
Invoke
The invoke
custom action type lets you associate a Fluent Function with a custom action list item. When the list item is clicked, the Fluent Function is invoked.
info
The invoke
custom action type is configured similarly to the Invoke Configuration with serviceName
, versionNumber
, and params
attributes. However, invoke
custom actions do not require an object on the Fluent Function to be returned. As long as the Fluent Function returns an HTTP 200
status code, an invoke
custom action is considered successful.
{
label: 'Fluent Function',
type: 'invoke',
serviceName: 'DAO - Fluent Function',
versionNumber: '0.1.0',
params: {
...
}
}
note
In order to use invoke functions, the user must have the Invoke Fluent Functions permission.
Url
The url
custom action type allows you to display a form within a modal.
Display rules
Custom actions are available on the Details screen only, not on the List screen.
!shortcut;
In addition, custom actions use visibility rules as an additional control to show and hide the custom actions. You can read more about rules here.
Example
The following example showcases some actions that can be configured for a manager.
{
...
txnActions: {
Claim: {
label: 'Claim',
},
Release: {
label: 'Release',
},
Decision: {
label: 'Decision',
},
Custom: {
label: 'More',
properties: [
{
label: 'Review Checklist',
type: 'url',
dataIndex: "properties['ReviewChecklistUrl']",
rules: [
{
dataIndex: 'userLoginName',
value: currentUser,
},
],
},
{
label: 'Re-run Background Checks',
type: 'invoke',
serviceName: 'DAO - Rerun Integrations',
versionNumber: '0.1.0',
rules: [
{
dataIndex: 'userLoginName',
value: currentUser,
},
],
},
],
},
},
jobActions: {
Receipt: {
label: 'Receipt',
},
ViewNotes: {
label: 'View Notes',
},
},
...
}
Attributes
To review the list of supported attributes, see CurrentSpaceTxnActions and CurrentSpaceJobActions.