ActionEdit(
object Action
bool WebhookEvaluate
)
Add or edit an action.
Request
Request Data:
- (object) Action(required)
- (int) AlternateID (Since RPM24) – set or identify the action to add/edit, if not ActionID will be used. If provided but no action is found matching said AlternateID a new action is created.
- (int) ActionID – the id for the action to edit, if not provided a new action is created.
- (bool) Done – whether or not the action is marked as done.
- (string) Description (required) – the action’s description.
- (string) Result – the action’s result.
- (object) Added
- (int) UserID – which user you want the action to be added by.
- (int) TypeID – which action type you want this action to be.
- (object) Form
- (int) FormID (required) – which form you want this action to be attached to.
- (int) Priority – whether you want this action to be high priority or not.
- (bool) StaffOnly – whether this action will be visible to non-staff users.
- (date) Due (required) – when this action is due.
- (object) Assignee(required)
- (int) ParticipantID (required) – the form’s participant you want this action to be assigned to (ParticipandID is available via the ProcForm API endpoint.
- (int) UserID (required) – the user you want this action to be assigned to. (Used only if ParticipantID is not provided.
- (date) Start – the action’s start date.
- (date) End – the action’s end date.
- (bool) WebhookEvaluate (optional, default=false) – Whether to evaluate any action related webhooks. (Since: RPM18)
{
"Action": {
"ActionID": <int>,
"AlternateID": <string>, // Since RPM24: client-generated UUID
"Done": <bool>,
"Description": <string>,
"Result": <string>,
"Added": {
"UserID": <int>
},
"TypeID": <int>,
"Form": {
"FormID": <int>
},
"Priority": <int>,
"StaffOnly": <bool>,
"Due": <date>,
"Assignee": {
"ParticipantID": <int>,
"UserID": <int>
},
"Start": "<date>",
"End": "<date>"
},
"WebhookEvaluate": <bool>
}Response
{
"Result": {
"Action": {
"ActionID": <int>,
"AlternateID": <string>, // Since RPM24: client-generated UUID
"Form": {
"Title": <string>,
"FormID": <int>,
"ProcessID": <int>,
"UserCanEdit": <bool>,
"UserIsParticipant": <bool>
},
"Description": <string>,
"Due": "<date>",
"DueOriginal": "<date>",
"Result": <string>,
"Priority": <int>,
"StaffOnly": <bool>,
"Done": <bool>,
"UserCanEdit": <bool>,
"Assignee": {
"ParticipantID": <int>,
"UserID": <int>,
"AssigneeName": <string>
},
"Added": {
"UserID": <int>,
"AddedBy": <string>
},
"TypeID": <int>,
"TypeName": <string>,
"Start": "<date>" (only sent if a valid date is set),
"End": "<date>" (only sent if a valid date is set)
}
}
}Errors
- "Action not found – when an ID is provided but it’s not valid"
- "A description is required"
- "Unable to find/set assignee"
- "Call requires parameter: \"Action\" which was not found"
- "Form not found"
- "A valid date is required"