Created
July 14, 2014 20:11
-
-
Save tstachl/734580988df47eb57c88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ticket = DeskApi.cases.create({ | |
external_id: 123456, | |
subject: 'Subject', | |
description: 'Description', | |
priority: 1, | |
status: 'resolved', | |
type: 'email', | |
labels: ['Label 1', 'Label 2'], | |
custom_fields: { | |
my_key: 'My Value' | |
}, | |
message: { | |
direction: 'in', | |
from: 'Customer <john@example.com>', | |
to: 'Support <support@example.com>', | |
subject: 'Subject', | |
status: 'received', | |
body: 'Some body', | |
created_at: '2014-07-14T13:06:19-07:00', | |
updated_at: '2014-07-14T13:06:19-07:00' | |
}, | |
_links: { | |
assigned_user: { href: '/api/v2/users/123456' }, | |
assigned_group: { href: '/api/v2/groups/123456' }, | |
customer: { href: '/api/v2/customers/123456' } | |
}, | |
created_at: '2014-07-14T13:06:19-07:00', | |
updated_at: '2014-07-14T13:06:19-07:00' | |
}) | |
ticket.replies.create({ | |
direction: 'out', | |
to: 'Customer <john@example.com>', | |
from: 'Support <support@example.com>', | |
subject: 'Subject', | |
status: 'sent', | |
body: 'Some body', | |
created_at: '2014-07-14T13:06:19-07:00', | |
updated_at: '2014-07-14T13:06:19-07:00' | |
}) | |
ticket.notes.create({ | |
body: 'Some note' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment