This class retrieves helpdesk ticket information based on a wide range of criteria. You can optionally get the ticket responses, attachments, notes, events and user data. This class should only be instantiated by dispatchMBAPI() found in include/mbapi/mbapi.php. Something similar to the following XML should be passed to dispatchMBAPI() when you want to call the GetHelpdeskTickets command:
<mbapi> <command><!-- None --></command> <showXMLHeader><!-- None --></showXMLHeader> <params> <hdTicketID><!-- int --></hdTicketID> <hdBucketID><!-- int --></hdBucketID> <hdDepartmentID><!-- int --></hdDepartmentID> <userID><!-- int --></userID> <userType><!-- int --></userType> <hdTicketSubject><!-- string --></hdTicketSubject> <hdTicketBody><!-- string --></hdTicketBody> <helpdeskTicketPriority><!-- string --></helpdeskTicketPriority> <helpdeskTicketStatus><!-- string --></helpdeskTicketStatus> <hdTicketDateCreatedLessThan><!-- int --></hdTicketDateCreatedLessThan> <hdTicketDateCreated><!-- int --></hdTicketDateCreated> <hdTicketDateCreatedGreaterThan><!-- int --></hdTicketDateCreatedGreaterThan> <hdTicketDateModifiedLessThan><!-- int --></hdTicketDateModifiedLessThan> <hdTicketDateModified><!-- int --></hdTicketDateModified> <hdTicketDateModifiedGreaterThan><!-- int --></hdTicketDateModifiedGreaterThan> <getHelpdeskTicketResponseData><!-- int --></getHelpdeskTicketResponseData> <getHelpdeskTicketAttachmentData><!-- int --></getHelpdeskTicketAttachmentData> <getHelpdeskTicketNoteData><!-- int --></getHelpdeskTicketNoteData> <getHelpdeskTicketEventData><!-- int --></getHelpdeskTicketEventData> <getUserData><!-- int --></getUserData> <sortDir><!-- None --></sortDir> <sortColumn><!-- None --></sortColumn> <recordOffset><!-- None --></recordOffset> <numRecords><!-- None --></numRecords> </params> </mbapi>
None
mbapi
command
showXMLHeader
params
hdTicketID
The ID of the ticket to fetch. This will always select at most 1 ticket.
hdBucketID
The ID of the bucket to fetch. This will always select at most 1 bucket.
hdDepartmentID
The ID of the department to fetch. This will always select at most 1 department.
userID
The ID of the client or admin whose tickets you wish to fetch. For clients, this should always be their clientID.
userType
The type of user for the tickets you wish to fetch. This is used by getUserData to obtain the correct information.
hdTicketSubject
The subject of the ticket to fetch. This is a searched using a LIKE clause.
hdTicketBody
The text body of the ticket to fetch. This is a searched using a LIKE clause.
helpdeskTicketPriority
The exact string representation of the priority of the ticket to fetch.
helpdeskTicketStatus
The exact string representation of the status of the ticket to fetch.
hdTicketDateCreatedLessThan
The maximum UNIX timestamp for which a helpdesk ticket in the result set was created.
hdTicketDateCreated
The exact UNIX timestamp for which a helpdesk ticket in the result set was created.
hdTicketDateCreatedGreaterThan
The minimum UNIX timestamp for which a helpdesk ticket in the result set was created
hdTicketDateModifiedLessThan
The maximum UNIX timestamp for which a helpdesk ticket in the result set was modified.
hdTicketDateModified
The exact UNIX timestamp for which a helpdesk ticket in the result set was modified.
hdTicketDateModifiedGreaterThan
The minimum UNIX timestamp for which a helpdesk ticket in the result set was modified
getHelpdeskTicketResponseData
Set to 1 obtain all response data associated with the ticket.
getHelpdeskTicketAttachmentData
Set to 1 obtain all attachment data associated with the ticket.
getHelpdeskTicketNoteData
Set to 1 obtain all note data associated with the ticket.
getHelpdeskTicketEventData
Set to 1 obtain all event data associated with the ticket.
getUserData
Set to 1 obtain all user data associated with the ticket.
sortDir
sortColumn
recordOffset
numRecords