Create new ticket
createTicket()
This gets called when a customer creates a new ticket in the storefront. This gets called in the following file:
app/Http/Controllers/Storefront/Account/SupportTicketController.php Line 125Parameters
Type | Name | Description |
|---|---|---|
SalesChannel | salesChannel | The salesChannel |
Customer or null | customer | The Customer object. If null, then guestName and guestMail is filled. (The ticket was created without login using contact forms) |
string | subject | The ticket subject. |
string | message | The initial message. |
ProductHosting or Domain or null | product | The selected ProductHosting or Domain or null. Check with instanceof() |
TicketDepartment or null | department | The selected Department |
array | attachments | Array of ticket attachments |
String or null | guestName | If customer is null, this contains the guest name |
String or null | guestMail | If customer is null, this contains the guest email |
Response
TicketCreatedResponse() class.
Type | Name | Description |
|---|---|---|
mixed | $id | The ID of the ticked. Usually integer or UUID. |
mixed | $number | The number of the ticket which was created during generation. |
mixed | $messageId | The ID of the initial message. |
array | $attachmentFilePaths | Array of file paths in the same order as the files. |
Example Code
Testing
You can test this function by creating a ticket in the storefront.