ProcFormAdd( int ProcessID, string Process, object Form, bool WebhookEvaluate, int FlowSource )
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, following the JSON structure for forms, some important entries are:
- (string) Number (optional and not recommended) – unique number for this form.
Will be generated automatically if not provided. - (string) AlternateID (optional) – a client-provided ID, the recommended value is an UUID but any string of up to 40 characters.
- (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.
Fields with missing Value will be considered null and the value will be set to an empty string.
Field value formatting can be found on the JSON Structure for Forms page.
- (string) Number (optional and not recommended) – unique number for this form.
- (bool) WebhookEvaluate (optional, default: false) – whether RPM should issue webhook requests (since RPM 11).
- (int) FlowSource (optional) a form ID. If valid then the form will display as if it had been made by flow from that form in terms of listing the flow source and displaying the flow chain. No actual flow will be done in terms of field values or customer creation. (since RPM 23)
Notes
- The value for Percent fields has to be sent using a percent sign, for example: 50%, 0.5% and 123.456%
- The value for Yes/no fields follows a strict rule: send “0”, “no”, “n” for “No”. Everything else is interpreted as “Yes”
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
- “Source form not found” – when FlowSource is provided but was not found
- “Flow not found” – when FlowSource is provided but the provided Form ID does not belong to a valid flow
- “Form specified by AlternateID already exists” – when an existing form is found with the provided AlternateID (since RPM24)