Skip to main content

Commands


Commands

Commands are bound to toolbars, defining menu actions and their execution logic. Each toolbar menu item specifies which service to execute or what action to perform, such as opening a form in a modal, adding a new object, or deleting a selected row. Commands include a settings configuration where you can define the related service and refresh behavior based on the use case.

"commands": {
"csvExport" : {
"type": "export",
"label": "CSV Export",
"settings": {
"columns": ["title", "description"],
"excludeHiddenColumn": true
}
},
"createNewCR" : {
"type": "genericService",
"label": "Create Change Request",
"isMenu": false,
"settings": {
"relatedConfig": {
"services": [
{
"name": "CreateChangeRequest"
}
],
"useSavedContextId":true,
"refreshBehavior": "removeRow"
}
}
},
}

Command properties

Prop NameDescriptionData TypeRequiredExample
nameUnique identifier for the command.stringyes"createIssue"
labelDisplay text for the command in the UI.stringyes"Create Issue"
typeCommand type (e.g., form 1) launchFormAsModal this is used to popup form with data.genericService without form perform action behind service call trigger.stringno"launchFormAsModal"
settingsConfiguration specific to the command type.objectno{"config": {"type": "form", "id": "createNewIssue"}} or {"relatedConfig": {"name": "CreateChangeRequest"}}
isMenuDisplays as a menu if true. Defaults to false if omitted.booleannofalse

Command settings properties

Below sub elements define how command settings should be configured

Property NameDescriptionData TypeRequiredExample
refreshBehaviorDefines how the UI refreshes after execution. Possible values: refreshRow — refreshes the selected row from graph data. refreshParents — refreshes parent rows. refreshRowWithColumnService — refreshes the row using a column-specific service (network call). expandRowWithService — expands the row using a service. removeRow — removes the selected row. Ignored when responseMapping is defined.stringno"refreshRow"
relatedConfigDefines the service to call and how to refresh the row after execution.objectno
responseMappingMaps fields from the service response directly to graph node attributes, triggering an instant row re-render without an extra network call. Single object { expression, attribute } or an array for multiple mappings. See responseMapping below.object or arrayno{ "expression": "results[0].maturityState", "attribute": "state" }
serviceControls if to select data from nodes or edges in dataset.booleannotrue
useSavedContextIdBoolean indicating if a saved context ID should be used.booleannotrue

responseMapping

responseMapping is a single object or an array of objects applied to the raw HTTP response body after a genericService call. Each entry evaluates a JSONata expression against the response and writes the result to a graph node attribute, which is immediately reflected in the table row — no second network call needed.

"promote": {
"type": "genericService",
"label": "Promote",
"settings": {
"relatedConfig": {
"services": ["promoteItemService"],
"responseMapping": { "expression": "results[0].maturityState", "attribute": "state" }
}
}
}

For multiple attributes, pass an array:

"relatedConfig": {
"services": ["promoteItemService"],
"responseMapping": [
{ "expression": "results[0].maturityState", "attribute": "state" },
{ "expression": "results[0].owner", "attribute": "owner" }
]
}
FieldDescriptionTypeRequired
expressionJSONata expression evaluated against the raw HTTP response body.stringyes
attributeGraph node attribute to write the result to. Must match the data field of the target column definition.stringyes

When to use responseMapping vs refreshBehavior

ScenarioUse
The service response contains the updated attribute valuesresponseMapping — instant update, no extra network call
The service response does not include the updated datarefreshBehavior: "refreshRowWithColumnService" — re-fetches column services