Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Translations Ignore


Code Block
POSTPATCH {baseURL}/cockpitVariables/acdcockpitVariable/events{CockpitVariablesID}/createsetValue


Parameters

None.

Post Data

...

RequiredYes

Parameter

Where

Supported in AcdEventTypes

Type

Data

AcdEventTypesIDvalueURLIntegerThe ID of the AcdEventType to create.
AcdGroupsIDYesAllIntegerThe ID of the AcdGroup to which this event should be distributed.
UsersIDNoAllIntegerThe ID of the User to which this event should be distributed. If not provided, the event is distributed via the group queue.
SenderYesAllString

A string identifying the sender.

For telephone related events this should be a telephone number in E.164 format (Voice Mail and Callback Requests).

For other events the data may be context specific - for example an email address.

ReceiverNoAllString

A string identifying the receiver.

For telephone related events this should be a telephone number which is available in the system as a configured service number in E.164 format (Voice Mail and Callback Requests).

For other events, the data may be context specific - for example an email address.

SubjectYesAllStringA string subject to associate with the event. Can be any text.
BodyNoCallbackStringA body which will be added to the event body data.
CrmURLNoAllStringAn URL which will be associated with the event. This should correspond to a well formed URL.
UserDataNoAllString

An optional user data field which will be associated with the event.

For Ticket (Workflow) events, this will correspond to the foreign system ticket number.

value to set.

Responses

If the request is performed, 200 OK is returned. See Return Codes for further possible status codes.

...

A JSON Structure containing the following fields:

FieldTypeData
recordsAcdEvent []An array of AcdEvents containing the created AcdEvent.
resultInteger

0 = Operation was OK

1 = Variable is not writable

2 = Variable not found or not visible for cockpit

3 = value was not changed (same value)

4 = value was not changed (min / max values would be exceeded)

errorStringA string representation of the error,countInteger1
statusIntegerThe return code (also provided by the http status code).

Example Post Data

Create a callback event:

...

Code Block
{  
	"AcdEventTypesID": 3,
	"AcdGroupsID": 235,
	"UsersID": null,
	"Sender" : "49199123456789",
	"Receiver" : "4919900112233",
	"Subject": "Callback request from 49199123456789 on 2020.08.09 at 09:00",
	"Body": "This is an automatically generated callback request via the REST API.\r\nCongratulations!\r\n",
	"CrmURL": "https://www.jtel.de",
	"UserData": "987654"
}

Create a callback event for a specific user:

...

Code Block
{  
	"AcdEventTypesID": 3,
	"AcdGroupsID": 235,
	"UsersID": 3,
	"Sender" : "49199123456789",
	"Receiver" : "4919900112233",
	"Subject": "Callback request from 49199123456789 on 2020.08.09 at 09:00",
	"Body": "This is an automatically generated callback request via the REST API.\r\nCongratulations!\r\n",
	"CrmURL": "https://www.jtel.de",
	"UserData": "987654"
}

Create a ticket event:

...

Code Block
{  
	"AcdEventTypesID": 6,
	"AcdGroupsID": 235,
	"UsersID": null,
	"Sender" : "info@example.com",
	"Receiver" : "support@jtel.de",
	"Subject": "A new ticket 123456 has been created via the REST API. Congratulations!",
	"CrmURL": "https://www.jtel.de",
	"UserData": "123456"
}

Example response:

...

languagejs

...

.

...