# Upsert Collection Actions

Upsert Collection Actions

Endpoint: PATCH /rest/2.0/CS_ACTION_TYPE
Version: 1.0
Security: JWT

## Header parameters:

  - `sessionId` (string, required)

## Request fields (application/json; charset=utf-8):

  - `brmObjects` (object)

  - `brmObjects.Name` (string, required)
    Name

  - `brmObjects.Type` (string)
    System Action: Determines the UI shown to the user when setting up and completing actions. By default, all action types include the option to select the Status of the Action (Completed or Pending), Action Date, Priority, and Notes. Aside from this:Blank: No additional fields. If the action is Can Be Scheduled, the user will have the option to let it execute automatically on the action date.Call: The user will be able to select a Contact Category and/or add a phone number to the action. Call actions cannot be automatic.Email: The user will be able to select a Contact Category, add attachments, use an email template, or create a new one from scratch. If the action is Can Be Scheduled, the user will have the option to let it execute automatically on the action date.

  - `brmObjects.Status` (string, required)
    Status

  - `brmObjects.ActionNote` (string)
    Pre-defined Action Note: Text that will be pre-populated in the Action Notes when the action is created/scheduled.

  - `brmObjects.CanBeScheduled` (integer)
    Can Be Scheduled: Action can be created and scheduled for a future date. Otherwise the action will be executed/completed upon creation. Actions that cannot be scheduled cannot be added to strategies.

  - `brmObjects.WorkflowRuleId` (integer)
    Workflow When Completed: Workflow will execute when the action is completed, either manually by the user or automatically by the system.

  - `brmObjects.WhenCreatedWorkflowRuleId` (integer)
    Workflow When Created: Workflow will execute as soon as the action is created. This includes actions created at the time a strategy is triggered, even if they are future dated.

  - `brmObjects.Created` (string)
    System controlled field: Date and time the record was created

  - `brmObjects.Id` (string, required)
    Id: Primary key

  - `brmObjects.Description` (string)
    Description

  - `brmObjects.Updated` (string)
    System controlled field: Date and time the record was last updated

  - `brmObjects.UpdatedUserId` (string)
    System controlled field: Id of the last user that updated the record

  - `brmObjects.CreatedUserId` (string)
    System controlled field: Id of the user that created the record

  - `brmObjects.AccountContactRecipients` (string)
    Account Contact Recipients: Account Contact Recipients defines which account contacts receive the email when the collection action is performed in cases where separate collection cases are created for each overdue child account, but the collection cases are managed at the parent account.                        When this field is set to the Parent Account then the collection email will be sent to the email contacts of the parent account where the collection case resides.                        When this field is set to Account, then the collection email will be sent to the email contacts of the child account where the overdue invoices caused the creation of the collections case

  - `brmObjects.ConfigurationId` (integer, required)
    Configuration Id

  - `externalIDFieldName` (string)
    Enum: "Name"

## Response 200 fields (application/json):

  - `upsertResponse` (array)

  - `upsertResponse.Id` (integer)

  - `upsertResponse.success` (boolean)

  - `upsertResponse.ErrorText` (string)

  - `upsertResponse.ErrorElementField` (string)

  - `upsertResponse.created` (boolean)


