Toggle menu

caseAttachmentCreate

Attaches a file to a case.

Namespace

goss.CaseManagement.v1.api.case.caseAttachment.caseAttachmentCreate

Worker

serverlibrary

Parameters

Required PropertiesTypeDescription
caseBusinessKeyString <businessKey>The business key of the case
caseAttachmentToSaveObjectDetails of the file
caseAttachmentToSave.idStringThe file reference
caseAttachmentToSave.filenameStringThe file name
caseAttachmentToSave.fieldStringA form field name, in the format from_FIELDNAME, which will make the file available to the case process variables
userObjectDetails of the user
user.siteUserNameStringThe username of the person who raised the case, or a valid case manager
Optional PropertiesTypeDescription
n/an/an/a

{
    "caseAttachmentToSave": {
        "filename": "Abc",
        "field": "Abc",
        "id": "Abc"
    },
    "caseBusinessKey": "0123-4567-8901-2345",
    "user": {
        "siteUserName": "Abc"
    }
}

Rules

RuleValidation error
User must existCould not retrieve siteUser details
Case must existCould not retrieve case Case 1234-5678-9012-3456
Case must be activeUser aUser does not have permissions to add an attachment
User must be the case owner, a member of the case managers group or the case manager if one is assignedUser aUser does not have permissions to add an attachment

Behaviour

If the validation rules pass

  • Adds the attachment to the case
  • A system note will be recorded to case history documenting the addition
Last modified on 11 September 2026