The
Configuration
Before using this tool you'll need to set up its configuration rules.
The rules for the close case utility should be placed in an End Point at
It has the following structure:
function(params, credentials) {
let config = {
batchSize: 20,
maximumRunTime: "PT10M",
report: {
to: [{
name: "The support team",
address: "support@my-website.com"
}]
},
rules: [{
caseType: "feedback",
ignoreClosureRules: true,
closeCriteria: [{
status: "*",
statusDuration: "P3W",
closureReason: "Automatic",
closureNotes: "Automatically closed"
}]
},
{
caseType: "complaint",
ignoreClosureRules: false,
closeCriteria: [{
status: "On hold",
statusDuration: "P2W"
},{
status: "With client",
statusDuration: "P1W"
}]
}
]
};
return config;
}
Where:
Property | Description |
---|---|
batchSize | The number of cases to process in a batch. We recommend between 20-50 |
maximumRuntime | An ISO8601 duration string that sets how long the end point will continue to process the rules. If this time is exceeded the end point will complete processing the current batch and then terminate |
report.to | An array of objects where each sets the name and email address of a recipient |
rules | An array of object rules where: |
rules[n].caseType | This is the case type ID the rules will apply to |
rules[n].ignoreClosureRules | If set as true, the case will be force closed even if it has outstanding tasks |
rules[n].caseType.closeCriteria | An array of criteria to consider for this case type |
rules[n].caseType.closeCriteria[n].status | The case status to test. An asterisk "*" will test against any status |
rules[n].caseType.closeCriteria[n].statusDuration | An ISO8601 duration string. Cases that have exceeded this time spent at the named status with no activity logged against them will be closed. The End Point determines "activity" by looking for the timestamp of the last note added to the case, including system notes |
rules[n].caseType.closeCriteria[n].closureReason | A close reason to record in the case history |
rules[n].caseType.closeCriteria[n].closureNotes | A close note to add to the case history |
In the examples above:
- any feedback cases that have been inactive and spent more than three weeks at their current status (whatever that status is) would be closed
- any complaint cases that have been inactive and either on hold for over two weeks or with client for one week would be closed
Running the End Point
The
Dry Run
If you run the End Point using the testing tab in iCM, set the dryRun parameters as true:
{
"dryRun": true
}
This will email a report to the users named in the configuration without closing any cases. The email includes a list of the cases that would be closed and those that would fail to close (because they may have outstanding tasks etc).
Scheduling
When scheduling the End Point, pass in the
The End Point would normally be set to run daily or weekly, depending on the number of cases you suspect may be dormant. Each time it runs it will check the rules set in your configuration End Point and attempt to close any cases that meet the close criteria.