runAction

Purpose

Runs a workflow action on a record.

For objects in dedicated tables, you must specify the objName parameter.

HTTP Method

POST

URL

https://app.infiniteblue.com/rest/api/runAction

URL Parameters

sessionId

The session ID obtained from the body of the response when calling login.

objName

The object integration name.

id

The record ID.

actionId

The original ID of the workflow action to run.

output

Optional parameter specifying the output format, one of: xml (default) or json.

Additional parameters

The integration name(s) of field(s) to be updated as part of the workflow action. If the workflow action type is Status Change, the Use Web Page property must be specified on the action for fields to be updated. See Status Change action for details.

Permissions Required

Edit permission for the requested object type.

Response

The status in XML or JSON format. The following is an XML response upon success:

<?xml version="1.0" encoding="UTF-8" ?>
<resp status="ok"></resp>

The following is a JSON response upon failure:

{
  "status": "fail",
  "message": "Action with original id 225886927 not applicable on the data record."
}

If the workflow action is of the type Related Record, the response includes the ID of the newly created record (see example below). Note that a conversion map or a record template is required to run a Related Record workflow action to create a record of a different object type; if neither is specified, the related record is not created. If the action creates a record of the same object type, a record will get created with the same data as the record on which the workflow action is being executed. See Related Record action for details.

Example

The following example creates a new related record for an Order record and sets the value of the Product field:

https://app.infiniteblue.com/rest/api/runAction?sessionId=d802a98210e9447c95691e36b1e79f28@148219868
&objName=Order&id=203783751&actionId=226380776&Product=Cheese&output=xml

The response includes the ID of the new record:

<?xml version="1.0" encoding="UTF-8" ?>
<resp status="ok">
    <data id="366891304"></data>
</resp>