Domo Actions (Beta)
Execute a Domo Action
Scope
Domo Actions have three possible scopes: personal, customer and global. Newly created Domo Actions have a personal scope, which means they can only be executed by the user who published that Domo Action. Once an action is published it will have a customer scope, which means all users in the customer instance can execute the Action. A global scope means anyone using the Domo platform will be able to use the action.
As of now, Domo Actions are changed to a global scope manually. Contact Diane Stewart at diane.stewart@domo.com to change to a global scope.
Using Domo Actions with a Custom App
- Add the
accountMapping
property to yourmanifest.json
. The data-provider key will be provided to you when your action is published. Yourmanifest.json
will look something like the following:
This account mapping provides an account picker for the user of the app to select which account they want to use in their instance of the app.
2. Use your account mapping alias, and action GUID to execute your action.
Sample processAction function:
processAction = () => {
let actionGUID = 'ff859375-e27f-40f7-afc8-bdebbbc0720b'; return fetch(`/domo/actions/v1/${actionGUID}/process?
accountAlias=googleSheetsAccount&scope=personal`, //the accountAlias value is defined in the manifest.
json
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"sheetID": this.state.sheetID
}) })
.then(response => response.json());
}
Sample Domo App:
handleSave(data) {
let actionGUID = '0ca46ccc-f4e1-4227-8d89-95397ed4fe7a';
let accountId = '57658'
return fetch(`/domo/actions/v1/${actionGUID}/process?account=${accountId}&scope=personal`,
{
method: "POST", headers:{
"Content-Type": "application/json" },
body: JSON.stringify({ "Opportunity ID": data.id,
"Stage Name": data.stage
}) });
}
Screenshots of Domo Action in action in the Domo App:
Q & A
Why can’t we just call Salesforce directly within the Domo app? Why do we need to wrap that code in a Domo Action?
Accounts. Domo Actions are essentially connectors, so they know about data providers, how to consume accounts and refresh tokens. By passing in the Domo Account ID into the Domo Action, it handles all of those account details so you don’t need to do so within your app.