addMessage
Some tooltip text!
• 1 minute to read
• 1 minute to read
Description
Adds a message to an existing ticket. You are only allowed to add messages to a ticket owned by the logged-in customer.
In parameters
| Parameter | Description |
|---|---|
| sessionKey | A valid session key |
| messageBody | The text in the message. |
| ticketId | The ticket to attach the message to. |
| sLevel | Security level of the ticket. Can be: 1 – Internal 2 – External Other values will result in an error. |
| attachmentIds | An array of the IDs of all attachments that you wish to connect to this message. The ID is received from addAttachment(). |
Out parameters
| Parameter | Description |
|---|---|
| errorCode | See list of codes |
| messageId | The internal ID of the new message |
Example
customer.customerService custService = new customer.customerService();
string sessionKey;
string ret = custService.login("test","test", out sessionKey);
if(ret == "0")
{
string\[\] attachmentIDs = new string\[0\];
string messageId;
ret = custService.addMessage(sessionKey,
"I would like more information","1201","2",
attachmentIDs,
out messageId);
if(ret == "0")
cout << messageId;
//messageId now contains the new ID
custService.logout(sessionKey);
}