Zendesk.createTicket()

Log a hello message with a generated secret code and other information

This example machine is part of machinepack-boilerplate, used to introduce everyone to machines.

Usage

Hover over inputs/exits for more info.

var Zendesk = require('machinepack-zendesk');


// Log a hello message with a generated secret code and other information

Zendesk.createTicket({

username: 'matt@machines.edu',

token: 'fjPCIjPEjCBfgwlfjPCIjPEjCBfgwl',

remoteUri: 'https://machines.zendesk.com/api/v2',

requestorName: 'Customer',

requestorEmail: 'customer@gmail.com',

subject: 'I need help with assembly',

tags: [],

comment: 'When I opened the box the parts were missing. I need new parts.',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

username required

The email of a Zendesk user account

'matt@machines.edu'
token required

API token for access

'fjPCIjPEjCBfgwlfjPCIjPEjCBfgwl'
remoteUri required

API for your zendesk instance

'https://machines.zendesk.com/api/v2'
requestorName required

Name of ticket requestor

'Customer'
requestorEmail required

Email of ticket requestor

'customer@gmail.com'
subject required

Short title for ticket

'I need help with assembly'
tags

Array of tags for ticket

[]
comment

Detailed comment for ticket

'When I opened the box the parts were missing. I need new parts.'

Exits

error

An unexpected error occurred.

success

OK.

{}