Skip to content

Case

Represents a case in a channel: a request or an issue that is tracked until it is closed.

Remarks

Get the case of the current script with $Case, or another case by its ID with $Domain.GetCase. A case has a subject, a priority, an assignee, tags, profile data defined by its content type, and Milestones that measure service levels.

Changes to a case are saved when the operation that runs the script completes, and they are discarded when the operation fails. A closed case is read-only: changing its subject, description, priority, assignee or deadline throws an error.

Examples

Escalate an open case

1
2
3
4
5
6
var relatedCase = $Domain.GetCase($Xml.Evaluate('CaseId'));

if (relatedCase !== null && !relatedCase.IsClosed) {
    relatedCase.Priority = 4;
    relatedCase.AddTag('Escalated');
}

Capabilities

Assignment and Deadlines

  • Case.AssignedAt: Gets the date and time when the case was assigned.
  • Case.AssignedTo: Gets or sets the identity of the user to whom the case is assigned.
  • Case.DeadlineAt: Gets or sets the deadline date and time for the case.
  • Case.Assign: Assigns the case to the specified identity.

Details

Lifecycle and Scheduling

Audit

Classification and Tracking

Messaging

  • Case.Reply: Sends a message attached to the case.