Support integrations

Close ticket

closeTicket()

Closes the ticket when the customer clicks the "close" button. This should set the ticket status to "closed". This also must be the same one you have configure in the property "$closedStatusId" at the top of your integration (Statuses)

Parameters

Type

Name

Description

Ticket

$ticket

The Ticket object of hostware. The $ticket->ticket_provider_external_id contains the external ticket id.

Response

None

Example Code

public function closeTicket(Ticket $ticket) {
	$response = $this->makeRequest("conversations/{$ticket->ticket_provider_external_id}", "PUT", [
		"status" => "closed",
	]);
}

Testing

You can test this function by closing a ticket as a customer.

Was this helpful?