Skip to main content

GraphQL API

Leverage the power of GraphQL with Help Desk MX to seamlessly integrate your store’s support system with external tools, mobile applications, and other services. By connecting Help Desk MX with external systems, your store can efficiently manage customer queries, emails, and offline chat messages from a unified interface. This API helps you streamline support operations, enhance customer satisfaction, and ultimately drive more conversions.

For comprehensive information about GraphQL, refer to the GraphQL developer guide on the Magento DevDocs page.

Prerequisites

To begin using GraphQL with Help Desk MX, ensure that the Help Desk MX module is installed on your store. Additionally, the Helpdesk GraphQL module must be installed, which is included with the purchase of Help Desk MX. To install Helpdesk GraphQL module refer to Installing the extension section.

Helpdesk GraphQL objects overview

Customer object

The Customer object allows you to retrieve customer-specific ticket data. This object supports the following attributes:

AttributeData TypeDescription
mstHelpdeskTicketsHelpdeskTicketsFetches the tickets associated with a given customer. You must provide either the customer's information or parameters like external_id or order_id.

Mutation object

Mutations are used to create, update, or delete resources. In GraphQL, mutations function similarly to POST, PUT, or DELETE requests in REST.

The Mutation object in this module contains the following attributes:

AttributeData TypeDescription
mstHelpdeskCreateTicketMstHelpdeskTicketInputCreates a new help desk ticket. This attribute is required and cannot be null.
mstHelpdeskAddMessageMstHelpdeskMessageInputAdds a message to an existing ticket. This attribute is required and cannot be null.

HelpdeskTicketInput input object

The HelpdeskTicketInput object is an input type that contains various fields. It allows users to create and submit tickets with specific details.

AttributeData TypeDescription
subjectStringThe subject line of the ticket. This field is required.
messageStringThe body of the ticket message. This field is required.
channelHelpdeskTicketChannelIndicates the communication channel through which the ticket was submitted. This field is required.
telephoneStringCustomer's phone number.
current_urlStringThe current URL where the ticket was submitted.
close_ticketBooleanIndicates whether the ticket is marked as closed.
department_idIntThe ID of the department handling the ticket.
priority_idIntThe priority level assigned to the ticket.
custom_fieldsArrayAn array of custom field inputs related to the ticket.

HelpdeskTicketsFilterInput input object

The HelpdeskTicketsFilterInput object allows you to filter tickets based on specific criteria.

AttributeData TypeDescription
external_idStringFilters tickets by External ID.
order_idIntFilters tickets by Order ID.

HelpdeskMessageInput input object

The HelpdeskMessageInput object is used to send messages within a ticket.

AttributeData TypeDescription
customer_nameStringName of the guest customer (if applicable).
customer_emailStringEmail address of the guest customer.
messageStringThe message content to be added to the ticket.

HelpdeskCustomFieldInput input object

The HelpdeskCustomFieldInput object handles custom fields related to tickets.

FieldData TypeDescription
codeStringThe identifier for the custom field. This field is required.
valueStringThe value entered for the custom field.

HelpdeskTicketsOutput output object

This object provides the output details of tickets fetched from the system. The MstHelpdeskTicketsOutput contains data with the following attributes:

AttributeData TypeDescription
itemsArrayAn array of ticket objects. This field is required.
total_countIntTotal number of tickets retrieved.
page_infoSearchResultPageInfoPagination information for the search results.

HelpdeskStatus object

The HelpdeskStatus object provides the current status of a ticket. The MstHelpdeskStatus contains data with the following attributes:

AttributeData TypeDescription
status_idIntThe ID of the ticket's current status. This field is required.
nameStringThe name of the ticket's current status. This field is required.
codeStringThe code representing the ticket status. This field is required.
colorStringThe color associated with the ticket's status. This field is required.

HelpdeskDepartment object

The HelpdeskDepartment object manages department-related data for help desk tickets. The MstHelpdeskDepartment contains data with the following attributes:

AttributeData TypeDescription
department_idIntThe ID of the help desk department. This field is required.
nameStringThe name of the help desk department. This field is required.

HelpdeskPriority Object

The HelpdeskPriority object manages priority data for tickets. The MstHelpdeskPriority contains data with the following attributes:

AttributeData TypeDescription
priority_idIntThe ID of the priority level. This field is required.
nameStringThe name of the priority level. This field is required.
colorStringThe color representing the priority level. This field is required.

HelpdeskTicket object

The HelpdeskTicket object represents individual tickets within the system.The MstHelpdeskTicket contains data with the following attributes:

AttributeData TypeDescription
subjectStringThe subject of the ticket. This field is required.
codeStringThe ticket type code. This field is required.
priorityMstHelpdeskPriorityPriority data for the ticket.
statusMstHelpdeskStatusCurrent status of the ticket.
departmentMstHelpdeskDepartmentDepartment handling the ticket.
customerCustomerCustomer information.
orderOrderOrder information associated with the ticket.
messagesMstHelpdeskMessagesList of messages associated with the ticket.
customFieldsArrayArray of custom fields related to the ticket.

HelpdeskMessages object

The HelpdeskMessages object is used to work with the ticket's messages data. The MstHelpdeskMessages contains data with the following attributes:

AttributeData TypeDescription
itemsArrayArray of ticket messages. This field is required.
page_infoSearchResultPageInfoPagination information for messages.
total_countIntTotal number of messages in the ticket.

HelpdeskMessage object

The HelpdeskMessage object is used to work with the message data fields. The MstHelpdeskMessage contains data with the following attributes:

AttributeData TypeDescription
triggeredByMstHelpdeskTriggeredByIndicates who triggered the message. This field is required.
ownerNameStringThe name of the person who triggered the message. This field is required.
textStringThe message content. This field is required.
createdAtStringThe date and time the message was created. This field is required.

HelpdeskTicketCustomField object

The HelpdeskTicketCustomField object manages custom fields for tickets. The MstHelpdeskTicketCustomField contains data with the following attributes:

AttributeData TypeDescription
nameMstHelpdeskTriggeredByThe name of the custom field. This field is required.
valueStringThe value of the custom field.

HelpdeskCustomFieldsFilterInput object

The HelpdeskCustomFieldsFilterInput object filters custom fields based on visibility.

AttributeData TypeDescription
is_visible_customerBoolean

HelpdeskCustomFieldsOutput object

It is used to output the custom fields. The MstHelpdeskCustomFieldsOutput contains data with the following attributes:

AttributeData TypeDescription
itemsArray of MstHelpdeskCustomFieldRepresents the custom fields of the ticket The field is non-nullable.
total_countIntDepicts the total number of messages.
page_infoSearchResultPageInfoDisplays the resulting page of the search.

HelpdeskCustomField object

Works with the custom fields of the ticket. The MstHelpdeskCustomField contains data with the following attributes:

AttributeData TypeDescription
nameStringRepresents the name of the custom field. The field is non-nullable.
codeStringStands for the code marking of the custom field. The field is non-nullable.
typeStringThe type of the custom field data. The field is non-nullable.
optionsArray of MstHelpdeskCustomFieldOptionOptions of the custom field.
descriptionStringDescription of the custom field. The field is non-nullable.
is_required_customerBooleanIf the field requires customer actions. The field is non-nullable.
is_visible_customerBooleanIf the field is customer visible. The field is non-nullable.
is_editable_customerBooleanIf the field can be edited by customer. The field is non-nullable.
is_visible_contact_formBooleanIf the field contains customer visible contact form. The field is non-nullable.

HelpdeskCustomFieldOption object

Sets the options for the custom fields of the ticket. The MstHelpdeskCustomFieldOption contains data with the following attributes:

AttributeData TypeDescription
valueStringRepresents the value of the custom field option. The field is non-nullable.
labelStringStands for the label of the custom field option. The field is non-nullable.