📤 Built a useful command? Submit it here — we'll review & add it to the library.

Put Ticket On Hold

Hint: Set state to On Hold (Awaiting Caller) and greet the caller

Trigger: \hold

(function() {
  // Pull the caller so we can @mention them
  var callerSysId = g_form.getValue('caller_id');
  var callerName = g_form.getDisplayValue('caller_id');

  // State = On Hold (3), Reason = Awaiting Caller (1)
  g_form.setValue('state', '3');
  g_form.setValue('hold_reason', '1');

  var mention = '@[' + callerSysId + ':' + callerName + ']';
  var message = 'Hello ' + mention + ',\nGreetings!\n\n\nRegards,\nService Desk';
  g_form.setValue('comments', message);
})();