ProcFormAdd

ProcFormAdd(
    int    processID,
    string Process,
    object Form,
    bool MarkUnreadAndNotify,
    bool WebhookEvaluate
)

Add a Form to an existing Process.

Note: this endpoint cannot be used to add actions, participants, notes or files. There are separate API calls for them.

Request

Request Data:

  • (int) ProcessID or (string) Process identify the process by Name or ID
    If both are provided the Name will be used.
  • (object) Form (required) – data that you want populated:
    • (string) Number (optional and not recommended) – unique number for this form.
      Will be generated automatically if not provided.
    • (string) Owner (optional) the Name of the owner for this form.
      Will default to the API user if not provided.
      If the name provided is not a valid User, it will default to the API user.
    • (string) Status (optional) the Status for the form. Has to be one of the valid status names. Will be the default status if not provided.
    • (string) StatusID (optional) the Status for the form, identified by the internal ID. Has to be one of the valid status IDs. Will be the default status if not provided. (If provided at the same time as “Status”, StatusID will be used)
    • (array) Fields (optional) list of field to be filled in.
      Any field not specified will be left empty.
      Any field that does not exist in the process template will be ignored.
      Field value formatting can be found on the JSON Structure for Forms page.
  • (bool) MarkUnreadAndNotify (optional, default: true) – have RPM generate notifications as necessary (since RPM 11).
  • (bool) WebhookEvaluate (optional, default: false) – whether RPM should issue webhook requests (since RPM 11).

Notes

  • The value for Percent fields has to be sent using a percent sign, for example: 50%, 0.5% and 123.456%

Request Body:

{
    "Process": <string>,
    "ProcessID": <int>,
    "Form" : {
        "Number": <string>,
        "Owner" : <string>,
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            },
            ... <More Field Definitions>
        ]
    }
}

Response

On success, the response will contain the newly created Form, see the JSON Formatting for Forms.

Errors

  • “Process not found” – If process Name or ID is not found
  • “Form number already exists” – If the form number is provided and it already exists
%d bloggers like this: