Action Change Step
Non-standard resource
Note: This is a non-standard resource and does not implement all the same functionality as a regular resource. The GET and POST requests do not have the same structure and do not return the same result.
Changing a step in actionstep requires two attributes, a "step id" and also a "node id".
In actionstep, a step has all the information required associated to it, but a step can re-occur multiple times inside the step tree. Each occurrence is known as a "node" in the step tree. To further complicate things, you can also change to an "alternate" step (a different step associated to a node), a "jump" step (where a node points to another node somewhere else in the tree) or you can also jump to any previous step/node combination that has already occurred for the selected action.
To simplify this list of possible next steps, you should simply call the "GET /api/rest/actionchangestep/{action id}" resource and it will return a list of all the possible "next" steps/nodes. If you want to jump to a previous step you will need to get the step history (not yet implemented).
The Actionchangestep resource will return a list of all the steps/nodes and all of the requirements for each step so that you can build a user-interface to display to the user to collect the information required to change step.
Â
Resource Properties
Scope Parameter | actionchangestep |
---|---|
Location | /actionchangestep |
Methods | GET, POST |
Default Page Size | 50 |
Max Page Size | 200 |
Default Includes | mustCompleteTasks, mustHaveEmailAddresses, step, node, stepTasks, stepMessages, documentTemplates, stepParticipantTypes, otherParticipantTypes, stepDataFields and stepRelatedActionTypes |
Â
GET requests
The GET request for the actionchangestep resource will return a set of resources which you must complete for the POST request. For example, you may get a list of "stepTasks" which contain a list of tasks (some optional) which the user must see (and confirm/unselect if task is optional).
The request structure is: GET /api/rest/actionchangestep/{action-id}
Â
GET Resource Attributes
Field | Description | Format | Field Type | Notes |
---|---|---|---|---|
id | Action ID | string | default | Â |
mustCompleteTasks | List of existing "tasks" which need to be completed PRIOR to moving to this step | collection | link | These tasks must be completed (or deleted) via the tasks resource before making a POST request to the actionchangestep resource. |
mustHaveEmailAddresses | List of participant records which need to have an email address defined PRIOR to moving to this step | collection | link | These are usually due to emails in the stepMessages, if you change the participants or disable an email from being sent then you can assume their email address is not longer required. |
step | Link to the "Start" step being described | string | link | Â |
node | Link to the "node" in the step tree (required in the POST) | integer | link | Â |
stepTasks | List of all the tasks (both required + optional) for this step | collection | link | Â |
stepMessages | List of all the messages to be sent (currently limited to emails) for this step | collection | link | Â |
documentTemplates | List of all the document templates to be added to the action for this step | collection | link | Â |
stepParticipantTypes | List of all the participant types specifically requested to be displayed to the user for this step | collection | link | Â |
otherParticipantTypes | List of participant types (other than those in stepParticipantTypes) that should be shown to the user due to their inclusion in an email etc | collection | link | Â |
stepDataFields | List of data-fields that should be editable by the user for this step | collection | link | Â |
stepRelatedActionTypes | List of related action types that are required for the user to associate on this step | collection | link | Â |
Â
Link Templates
Identifier | Resource | Location Template |
---|---|---|
actionchangestep.mustCompleteTasks | tasks | /tasks/{actionchangestep.mustCompleteTasks} |
actionchangestep.mustHaveEmailAddresses | participants | /participants/{actionchangestep.mustHaveEmailAddresses} |
actionchangestep.step | steps | /steps/{actionchangestep.step} |
actionchangestep.node | nodes | /nodes/{actionchangestep.node} |
actionchangestep.stepTasks | steptasks | /steptasks/{actionchangestep.stepTasks} |
actionchangestep.stepMessages | stepmessages | /stepmessages/{actionchangestep.stepMessages} |
actionchangestep.documentTemplates | documenttemplates | /documenttemplates/{actionchangestep.documentTemplates} |
actionchangestep.stepParticipantTypes | stepparticipanttypes | /stepparticipanttypes/{actionchangestep.stepParticipantTypes} |
actionchangestep.otherParticipantTypes | participanttypes | /participanttypes/{actionchangestep.otherParticipantTypes} |
actionchangestep.stepDataFields | stepdatafields | /stepdatafields/{actionchangestep.stepDataFields} |
actionchangestep.stepRelatedActionTypes | steprelatedactiontypes | /steprelatedactiontypes /{actionchangestep.stepRelatedActionTypes} |
Â
Â
POST Requests
Unlike a regular resource, the POST request format is different to the GET request as you are not saving the step configuration, instead you are submitting the data entered by the user in relation to the step configuration.
The best way to understand a POST request is to configure your a step in Actionstep then try changing to that step using the Actionstep user-interface. There you will see all the user-input fields that we display to the user to change to that step. In order for the API to change to the same step, we require all that data to be specified in the POST request using a format that is consistent with our standard API data structures.
Note: the response to a POST request is the actionchangestep GET request for the action's new node/step, so you can show the next steps to the user without having to query the API again.
Â
POST Resource Attributes
Field | Description | Format | Required | Field Type | Notes |
---|---|---|---|---|---|
id | The action's ID that you want to change step for | integer | true | default | Â |
step | The step id for the step you want to change to | string | true | default | Â |
node | The node id for the step you want to change to | integer | true | default | Â |
actionName | The new name of the action | string | false | default | Â |
fileReference | The new file reference of the action | string | false | default | Â |
priority | The new priority of the action | integer | false | default | Â |
assignedToParticipant | Who to re-assign the action | integer | false | default | Defaults to the access token's participant if not specified |
status | The new status for the action | string | false | default | Defaults to Active, options are Active, Inactive, Template or Closed |
timestamp | The date/time to set as the step-change date | date | false | default | Defaults to now. |
stepDataField{N} | Values for each step data field. (may be many occurrences of this attribute). | mixed | true | default | Fields not specified will be updated to NULL if the field is optional. |
fileNote | File-note text to be added as a step-change file note | string | sometimes | default | Is required when the step configuration requires a file note. |
stepTasks | List of the {stepTasks}.{id} that the user confirmed they want to create. | collection | false | link | Mandatory tasks will always be created regardless of them being specified or not. Make sure to check there are participants specified for the task's assigned to participant type. |
stepMessages | List of {stepMessages}.{id} that the user confirmed they want to create. | collection | false | link | Mandatory messages will always be created regardless of them being specified or not. Make sure to check there are participants specified for the messages to/from are specified. Also check those participants have a valid email address if the message is an email. |
documentTemplates | List of {documentTemplates}.{id} that the user confirmed they want to create. Any missing ID implies the user deselected the template. The list of available {documentTemplates}.{id} is set in the GET response | collection | false | link |  |
participantType{N} | List of participants for each participant type. (may be many occurrences of this attribute). Note that {N} is for each of the {stepParticipantType}.{participantType} or {otherParticipantTypes}.{id} listed in the GET response. | collection | false | link | Â |
relatedActionType{N} | List of actions for each action type. (may be many occurrences of this attribute). Note that {N} is for each of the {stepRelatedActionTypes}.{id} listed in the GET response. | collection | false | link | Â |
Â
The error reporting for this resource is a little sparse at the moment, so please email us at api@actionstep.com if you have any trouble using this resource.
Â