Working with requests in CRMScript

A word of caution

Edit message

For obvious reasons, you should not alter the text in a message after the fact.

However, you might need to edit some properties for bookkeeping or compliance. For example:

  • Time spent (accumulates)
  • Invoicing info
  • Access level (internal/external)
  • Attachments (removal might be required)

Delete tickets

⚠️ Warning
In general, we don’t recommend deleting requests. It is usually preferable to add a comment and/or tag and mark it as closed.

Deleting a ticket will also delete all messages and attachments linked to it!

However, you may be required to delete a request to comply with your company’s privacy policy. Proceed with caution! Use the same statements as for closing a ticket, just change the status code from 2 to 4.

Reference

Status

StatusDescription
0Unknown/uninitialized
1Active
2Closed
3Postponed
4Deleted
5Merged/Linked

Timestamp values - ticket

ParameterDb fieldDescription
activateactivateWhen to activate a postponed ticket
createdAtcreated_atWhen the ticket was created
repliedAtreplied_atWhen the 1st external message was added
stopEscalationstop_escalation
readStatusread_statusHas the owner has read the ticket? (red, yellow, green)
deadlinedeadlineThe deadline of the ticket
timeToClosetime_to_closeMinutes between create and close

For a complete list of fields, see the database reference.

Timestamp values - message

ParameterDb fieldDescription
createdAtcreated_atWhen the message was posted
timeSpenttime_spentMinutes used on this message
timeChargetime_chargeMinutes to be invoiced for this message