Purpose:
Allow users to perform one of an enumerated set of actions, as supported by the host application. For example, allowing the user to upload/attach a file to the transaction request, or update a set of invalid/expired credentials configured for their use with your integration.
Runtime supported action discovery!
You can also discover whether the host application within which your integration is currently embedded supports a specific action or not. You can invoke the
application.supportsActionmethod - which returns a boolean value indicating whether the action provided as an argument is supported by the host application.You can also get all the host application supported actions using the
application.getCapabilitiesmethod which returns a list of supportedActions
Sample Usage:
import host from '@elliemae/em-ssf-guest'
...
const action = "ACTION_ID"
const options = "OPTIONS"
async function performAction(action) {
try {
const applicationObject = await host.getObject('application');
const capabilities = await applicationObject.getCapabilities();
const supportedActions = capabilities.supportedActions;
const actionResult = null
if (supportedActions.includes('ACTION_ID')){
actionResult = await applicationObject.performAction(action, options);
}
console.log(actionResult);
} catch (error) {
console.log({error});
}
}
await performAction(action);
import host from '@elliemae/em-ssf-guest'
...
const action = "ACTION_ID"
host.getObject('application')
.then(
(applicationObject) => {
applicationObject.performAction(action)
.then(
(actionResult) => {
console.log(actionResult)
}
}
)
.catch(
(error) => {
console.log({error})
}
)
}
)
.catch(
(error) => {
console.log({error})
}
)
Interface:
| Input | Description | Supporting Applications |
|---|---|---|
ACTION_ID | The action to be performed. | Desktop Version of Encompass & Web Version of Encompass |
OPTIONS | The actions parameters | Desktop Version of Encompass & Web Version of Encompass |
Returns:
Type: Promise
==> Resolved
The action result. Action's parameters and results are different for each ACTION_ID
Supported Actions
- getAvailableResouces
- getRoles
- getPersonas
- getContext
- setContext
- getEligibleServiceSetups
- updateCredentials
