Help Desk MX
v1.2.44

GraphQL Objects Reference

The full documentation on GraphQL is available on the Magento DevDocs page GraphQL Developer Guide

Prerequisites

Your store should have installed the module Help Desk MX. In order to begin using GraphQL in the Help Desk MX module it is mandatory to install Helpdesk GraphQl for Magento 2 module. It is not available separately, but it can be installed after the purchase of Help Desk MX.

After you have installed the module Helpdesk Graph Ql, open command line interface and go to the directory with your Magento setup. Run command composer require mirasvit/module-helpdesk-graph-ql and after it finishes activate Helpdesk Graph Ql module with command bin/magento module:enable Mirasvit_HelpdeskGraphQl.

In the end run bin/magento setup:upgrade to avoid errors regarding the unavailability of the module's data.

Helpdesk GraphQl objects

Customer object

The Customer object is responsible for providing data on the tickets that include a specific customer.

The Customer object can contain the following attributes.

Attribute Data Type Description
mstHelpdeskTickets HelpdeskTickets Displays the tickets of the chosen customer. On input requires customer or parameters "external_id" or "order_id" is required

Mutation object

A mutation can create, update, or delete objects and fields. In REST terminology, queries operate like GET requests, while mutations are similar to POST, PUT, and DELETE.

A mutation contains the following elements:

  • The keyword mutation
  • An operation name for your local implementation. This name is required if you include variables. Otherwise, it is optional.
  • The mutation name
  • The input object or attributes. Most mutations require an input object that contains data or individual attributes for the Magento server to process. However, some mutations, such as createEmptyCart, do not require an input object.
  • The output object, which specifies which data the mutation returns.

The Mutation object in this module can contain the following attributes.

Attribute Data Type Description
mstHelpdeskCreateTicket MstHelpdeskTicketInput This attribute is used for creating ticket. The attribute in non-nullable.
mstHelpdeskAddMessage MstHelpdeskMessageInput Adds a message for created ticket. The attribute in non-nullable.

HelpdeskTicketInput input object

Being an input type the HelpdeskTicketInput object can consist of fields that are a scalar, list or other input types.

The HelpdeskTicketInput object can contain the following attributes:

Attribute Data Type Description

subject | String | The subject of the ticket. The field is non-nullable. message | String | The body message of the ticket. The field is non-nullable. channel | HelpdeskTicketChannel object | Depicts the communication channel that was used for the ticket. The field is non-nullable. telephone | String | Customer's phone number. current_url | String | Depicts current URL to the ticket. close_ticket | Boolean | Displays if the ticket is closed. department_id | Int | Shows the ID of the department the ticket belongs to. priority_id | Int | Displays the ticket priority level. custom_fields | Array | Array of of HelpdeskCustomField input objects.

Attributes customer_name and customer_email each can have a description field that is used only for guest customer

HelpdeskTicketsFilterInput input object

This is another object of the HelpDesk MX module and it is used to filter out the tickets from the database. The HelpdeskTicketsFilterInput object can contain the following attributes:

Attribute Data Type Description
external_id String Filters the list of tickets by specific External ID.
order_id Int Filters tickets by the Order ID.

HelpdeskMessageInput input object

It contains the message that has to be sent by the Helpdesk service. The HelpdeskMessageInput object can contain the following attributes:

Attribute Data Type Description
customer_name String This attribute is used only for guest customer.
customer_email String This attribute is used only for guest customer.
message String Message that has to be placed in the ticket.

HelpdeskCustomFieldInput input object

The HelpdeskCustomFieldInput input object can contain the following fields regarding the

Field Data Type Description
code Srting Shows the code ID of the custom field. The field in non-nullable
value String Contains the information of the custom field.

HelpdeskTicketsOutput output object

It displays the general information on the list of tickets. The MstHelpdeskTicketsOutput object can contain the following attributes.

Attribute Data Type Description
items Array Is the array of MstHelpdeskTicket objects. The field in non-nullable.
total_count Int Displays a number of total tickets in the output.
page_info SearchResultPageInfo Displays search results.

HelpdeskStatus object

This object shows the curent status of the HelpDesk. The MstHelpdeskStatus contains data with the following attributes:

Attribute Data Type Description
status_id Int ID of the HelpDesk current status. The field is non-nullable.
name String Displays the name of the status. The field is non-nullable.
code String Displays the code of the HelpDesk status. The field is non-nullable.
color String Depicts the color of the HelpDesk status. The field is non-nullable.

HelpdeskDepartment object

This object is used to work with the HelpDesk department data. The MstHelpdeskDepartment contains data with the following attributes:

Attribute Data Type Description
department_id Int ID of the HelpDesk department. The field is non-nullable.
name String Displays the name of the HelpDesk department. The field is non-nullable.

HelpdeskPriority object

This object is used to work with the HelpDesk priority data. The MstHelpdeskPriority contains data with the following attributes:

Attribute Data Type Description
priority_id Int ID of the HelpDesk priority level. The field is non-nullable.
name String Displays the name of the HelpDesk priority level. The field is non-nullable.
color String Shows the color coding of the HelpDesk priority level. The field is non-nullable.

HelpdeskTicket object

This object is used to work with the ticket data. The MstHelpdeskTicket contains data with the following attributes:

Attribute Data Type Description
subject String The text for the subject field of the ticket. The field is non-nullable.
code String Displays the code of the ticket type. The field is non-nullable.
priority MstHelpdeskPriority Shows the ticket priority level.
status MstHelpdeskStatus Depicts the current ticket status.
department MstHelpdeskDepartment Shows the data on the department the ticket is processed in.
customer Customer Shows the data on the customer.
order Order Shows the data on the order.
messages MstHelpdeskMessages Displays the list of messages created in the ticket.
customFields Array of MstHelpdeskTicketCustomField Displays the custom fields data of the ticket.

HelpdeskMessages object

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

Attribute Data Type Description
items Array of MstHelpdeskMessage Represents the messages of the ticket. The field is non-nullable.
page_info SearchResultPageInfo Displays the resulting page of the search.
total_count Int Depicts the total number of messages.

HelpdeskMessage object

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

Attribute Data Type Description
triggeredBy MstHelpdeskTriggeredBy Represents who has triggered the message. The field is non-nullable.
ownerName String Shows the name of a person who triggered the message. The field is non-nullable.
text String represents a message content. The field is non-nullable.
createdAt String Depicts a date and time the message was created. The field is non-nullable.

HelpdeskTicketCustomField object

It is used for the message's custom fields. The MstHelpdeskTicketCustomField contains data with the following attributes:

Attribute Data Type Description
name MstHelpdeskTriggeredBy Represents a name for the custom field. The field is non-nullable.
value String Depicts the custom field content.

HelpdeskCustomFieldsFilterInput object

It is used to filter the input type of custom fields. The MstHelpdeskCustomFieldsFilterInput contains data with the following attributes:

Attribute Data Type Description
is_visible_customer Boolean Filters the customer visible fields.
is_visible_contact_form Boolean Filters the input contact form.

HelpdeskCustomFieldsOutput object

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

Attribute Data Type Description
items Array of MstHelpdeskCustomField Represents the custom fields of the ticket The field is non-nullable.
total_count Int Depicts the total number of messages.
page_info SearchResultPageInfo Displays the resulting page of the search.

HelpdeskCustomField object

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

Attribute Data Type Description
name String Represents the name of the custom field. The field is non-nullable.
code String Stands for the code marking of the custom field. The field is non-nullable.
type String The type of the custom field data. The field is non-nullable.
options Array of MstHelpdeskCustomFieldOption Options of the custom field.
description String Description of the custom field. The field is non-nullable.
is_required_customer Boolean If the field requires customer actions. The field is non-nullable.
is_visible_customer Boolean If the field is customer visible. The field is non-nullable.
is_editable_customer Boolean If the field can be edited by customer. The field is non-nullable.
is_visible_contact_form Boolean If 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:

Attribute Data Type Description
value String Represents the value of the custom field option. The field is non-nullable.
label String Stands for the label of the custom field option. The field is non-nullable.