# Save Workflow Save Workflow Endpoint: POST /rest/2.0/WORKFLOW_RULE Version: 1.0 Security: JWT ## Header parameters: - `sessionId` (string, required) ## Request fields (application/json; charset=utf-8): - `brmObjects` (object) - `brmObjects.CounterTotalAction` (string) Total Workflow Action - `brmObjects.SheduleInterval` (string) Frequency: For Scheduled workflow, use this field to define how often the workflow rule will be evaluated and executed. - `brmObjects.Event` (string) Event Type: Specifies when the rule is evaluated based on activities against the entity. Available options are: After Create - Workflow is evaluated whenever a record is created in the entity. After Create and After Update - Workflow is evaluated whenever a record is created in the entity or saved when making updates. After Create and After Update(with criteria met and changed) - Workflow is evaluated when a record is created and when the criteria changes from not being met to being met. Before Delete - Workflow is evaluated when a record is deleted from the entity. This is only applicable for entities that have the recycle bin enabled, making the record deletion feature available. After Restore - Workflow is evaluated when a record is restored from the recycle bin. Scheduled - The workflow runs during the interval that is specified in the scheduling parameters. Mass Update - This is a special type of workflow that can be used only with the INVOICE DETAIL entity. This workflow is used to update invoice detail fields during the rating process. These updated fields can then be leveraged for processes such as invoice presentment, reporting and Event Invoice Cycle. Use the Update Fields table to configure which fields should be updated and the required criteria to update a field. - `brmObjects.LastRunTime` (string) Last Run Date - `brmObjects.ExecTime` (string) Execution Time (seconds) - `brmObjects.TimeZoneId` (integer, required) Time Zone - `brmObjects.CounterFailAction` (string) Failed Action Executions - `brmObjects.WorkflowRuleName` (string, required) Name - `brmObjects.RunTime` (string, required) Start Time: Select when scheduled workflow will begin processing on the defined interval. For workflow that runs daily, use this to define what time of day or night the workflow will run. - `brmObjects.UpdatedUserId` (string) System controlled field: Id of the last user that updated the record - `brmObjects.Status` (string, required) Status: Use the status to control whether the workflow is actively firing or not by selecting either ACTIVE or DEACTIVATED. - `brmObjects.EvalOrder` (string, required) Order of Evaluation: It is possible to define several workflow processes for a single entity. Use this field to define the order in which the rules for the common entity will fire. - `brmObjects.EntityId` (integer) Entity: For Standard workflow type specify the entity to trigger the workflow. - `brmObjects.IsBulk` (integer) Enable Bulk Update: If selected, workflow actions will apply to all records matching workflow criteria as a bulk update at once. This should typically result in faster completion times. All workflow actions have to be of Field Update action type to enable bulk update. - `brmObjects.Id` (string, required) ID: WORKFLOW_RULE_ID - `brmObjects.Description` (string) Description: Describe the functionality of the workflow here so that other users will have an idea at a glance without having to look at the configuration. - `brmObjects.RuleCriteria` (string) Rule Action Criteria: This will determine which method the workflow will use to determine if the record should enter the workflow process. Choose whether to use the defined record filter criteria or to use a formula to evaluate the workflow entry criteria. - `brmObjects.Formula` (string) Formula: Enter the formula that when evaluated to true will cause the workflow to execute its actions. Information about formula syntax can be found in the help system, workflow section. - `brmObjects.CounterSucces` (string) Succeeded Evaluations - `brmObjects.IsLogHidden` (integer) Hide Action Data in Log Analyzer: Select this to hide the execution data of the actions of this workflow from the Log Analyzer. This can be used for privacy reasons. The generic execution details will still display. - `brmObjects.Created` (string) System controlled field: Date and time the record was created - `brmObjects.FilterLogic` (string) Criteria Join Logic: Use this to define the logical grouping of your filter criteria. The ordered list of Filters defined above can be segregated to more narrowly define the filter as a whole. Use parentheses as well as AND and OR operators to define the filter logic. For example, three filters can be grouped as: (1 AND 2 ) OR 3. - `brmObjects.WorkflowType` (string) Workflow Type: Standard - most common option addressing all needs not covered by the other 2. For specialized version of standard workflow on Invoice Detail (activity) choose this option as well and select Invoice Detail as an Entity.For Collections Only - A workflow triggered by collections actions, only shown if collections module is enabled in your organization.Configurable API - Define how your API will process data by creating a workflow of this type. This workflow converts the API input into BP entities records by performing actions in your workflow. - `brmObjects.Updated` (string) System controlled field: Date and time the record was last updated - `brmObjects.CreatedUserId` (string) System controlled field: Id of the user that created the record - `brmObjects.CounterExec` (string) Number Of Record Affected - `brmObjects.AdHocRunTime` (string) Ad Hoc Run Date - `brmObjects.ErrorMessage` (string) Workflow failure error message - `brmObjects.AlertFlag` (string) Raise Alert: Indicates if system should raise an alert on execution failure - An alert message will be generated and sent to the alert processing routines of the platform. These can then be subscribed to in the same manner as subscribing to other alerts. - `brmObjects.NextRunTime` (string) NextRunTime - `brmObjects.RollbackFlag` (string) RollbackFlag - `brmObjects.SystemFlag` (string) SystemFlag - `brmObjects.TotalEvaluations` (string) TotalEvaluations - `brmObjects.AdhocRunFlag` (integer) AdhocRunFlag: Run Now - `brmObjects.PlannedNextRunTime` (string) Planned Next Run Time ## Response 200 fields (application/json): - `retrieveResponse` (object) - `retrieveResponse.CounterTotalAction` (string) Total Workflow Action - `retrieveResponse.SheduleInterval` (string) Frequency: For Scheduled workflow, use this field to define how often the workflow rule will be evaluated and executed. - `retrieveResponse.Event` (string) Event Type: Specifies when the rule is evaluated based on activities against the entity. Available options are: After Create - Workflow is evaluated whenever a record is created in the entity. After Create and After Update - Workflow is evaluated whenever a record is created in the entity or saved when making updates. After Create and After Update(with criteria met and changed) - Workflow is evaluated when a record is created and when the criteria changes from not being met to being met. Before Delete - Workflow is evaluated when a record is deleted from the entity. This is only applicable for entities that have the recycle bin enabled, making the record deletion feature available. After Restore - Workflow is evaluated when a record is restored from the recycle bin. Scheduled - The workflow runs during the interval that is specified in the scheduling parameters. Mass Update - This is a special type of workflow that can be used only with the INVOICE DETAIL entity. This workflow is used to update invoice detail fields during the rating process. These updated fields can then be leveraged for processes such as invoice presentment, reporting and Event Invoice Cycle. Use the Update Fields table to configure which fields should be updated and the required criteria to update a field. - `retrieveResponse.LastRunTime` (string) Last Run Date - `retrieveResponse.ExecTime` (string) Execution Time (seconds) - `retrieveResponse.TimeZoneId` (integer) Time Zone - `retrieveResponse.CounterFailAction` (string) Failed Action Executions - `retrieveResponse.WorkflowRuleName` (string) Name - `retrieveResponse.RunTime` (string) Start Time: Select when scheduled workflow will begin processing on the defined interval. For workflow that runs daily, use this to define what time of day or night the workflow will run. - `retrieveResponse.UpdatedUserId` (string) System controlled field: Id of the last user that updated the record - `retrieveResponse.Status` (string) Status: Use the status to control whether the workflow is actively firing or not by selecting either ACTIVE or DEACTIVATED. - `retrieveResponse.EvalOrder` (string) Order of Evaluation: It is possible to define several workflow processes for a single entity. Use this field to define the order in which the rules for the common entity will fire. - `retrieveResponse.EntityId` (integer) Entity: For Standard workflow type specify the entity to trigger the workflow. - `retrieveResponse.IsBulk` (integer) Enable Bulk Update: If selected, workflow actions will apply to all records matching workflow criteria as a bulk update at once. This should typically result in faster completion times. All workflow actions have to be of Field Update action type to enable bulk update. - `retrieveResponse.Id` (string) ID: WORKFLOW_RULE_ID - `retrieveResponse.Description` (string) Description: Describe the functionality of the workflow here so that other users will have an idea at a glance without having to look at the configuration. - `retrieveResponse.RuleCriteria` (string) Rule Action Criteria: This will determine which method the workflow will use to determine if the record should enter the workflow process. Choose whether to use the defined record filter criteria or to use a formula to evaluate the workflow entry criteria. - `retrieveResponse.Formula` (string) Formula: Enter the formula that when evaluated to true will cause the workflow to execute its actions. Information about formula syntax can be found in the help system, workflow section. - `retrieveResponse.CounterSucces` (string) Succeeded Evaluations - `retrieveResponse.IsLogHidden` (integer) Hide Action Data in Log Analyzer: Select this to hide the execution data of the actions of this workflow from the Log Analyzer. This can be used for privacy reasons. The generic execution details will still display. - `retrieveResponse.Created` (string) System controlled field: Date and time the record was created - `retrieveResponse.FilterLogic` (string) Criteria Join Logic: Use this to define the logical grouping of your filter criteria. The ordered list of Filters defined above can be segregated to more narrowly define the filter as a whole. Use parentheses as well as AND and OR operators to define the filter logic. For example, three filters can be grouped as: (1 AND 2 ) OR 3. - `retrieveResponse.WorkflowType` (string) Workflow Type: Standard - most common option addressing all needs not covered by the other 2. For specialized version of standard workflow on Invoice Detail (activity) choose this option as well and select Invoice Detail as an Entity.For Collections Only - A workflow triggered by collections actions, only shown if collections module is enabled in your organization.Configurable API - Define how your API will process data by creating a workflow of this type. This workflow converts the API input into BP entities records by performing actions in your workflow. - `retrieveResponse.Updated` (string) System controlled field: Date and time the record was last updated - `retrieveResponse.CreatedUserId` (string) System controlled field: Id of the user that created the record - `retrieveResponse.CounterExec` (string) Number Of Record Affected - `retrieveResponse.AdHocRunTime` (string) Ad Hoc Run Date - `retrieveResponse.ErrorMessage` (string) Workflow failure error message - `retrieveResponse.AlertFlag` (string) Raise Alert: Indicates if system should raise an alert on execution failure - An alert message will be generated and sent to the alert processing routines of the platform. These can then be subscribed to in the same manner as subscribing to other alerts. - `retrieveResponse.NextRunTime` (string) NextRunTime - `retrieveResponse.RollbackFlag` (string) RollbackFlag - `retrieveResponse.SystemFlag` (string) SystemFlag - `retrieveResponse.TotalEvaluations` (string) TotalEvaluations - `retrieveResponse.AdhocRunFlag` (integer) AdhocRunFlag: Run Now - `retrieveResponse.PlannedNextRunTime` (string) Planned Next Run Time ## Response 400 fields (application/json): - `error` (string) Bad request - `message` (string) Bad request ## Response 401 fields (application/json): - `error` (string) Unauthorized - `message` (string) Unauthorized ## Response 404 fields (application/json): - `error` (string) Not found - `message` (string) Not found ## Response 429 fields (application/json): - `error` (string) Too many requests - `message` (string) Too many requests ## Response 500 fields (application/json): - `error` (string) Internal error - `message` (string) Internal error