Possibility to send e-mails in tickets via REST API

Hi,

Is it possible to send e-mails from Service out (ex: to persons/customers in tickets) with the REST API?

We have looked at the documentation for both Ticket and TicketMessage entities, but cannot seem to find anything that explains how to add a message to a ticket and send it to someone.

Thank you!

RE: Possibility to send e-mails in tickets via REST API

Hi,

I tired ot do this recently as well. I ended up creating a CRMScript and calling that from REST API instead.

The CRM Script was similar to this:


String ticketId = getVariable("TicketNumber");
String emailTo = getVariable("EmailTo");

msg.setValue("ticketId", ticketId);
msg.setValue("createdBy", createdByEjuserId);
msg.setValue("emailHeader", "Test");
msg.setValue("subject", subject);
msg.setValue("type", "html");
msg.setValue("bodyHtml", bodyHtml);
msg.setValue("body", body);
msg.setValue("createdAt", appointmentDate);
msg.setValue("timeSpent", appointmentDuration);

msg.save();

msg.addHeader("To",emailTo.substitute(";",","));
Vector vTO;
vTO.parseString(emailTo,",");
Vector vCC;
vCC.parseString("",",");
Vector vBCC;
vBCC.parseString("",",");

msg.send(vTO, vCC, vBCC, subject))


Cheers

Rich

 

By: Rich Hacker 7 May 2020

RE: Possibility to send e-mails in tickets via REST API

Hi Rich,

Glad to see I'm not the only one wondering about this.

Thank you so much! I'll check out the CRMScript method you provided to see if we can apply it in our scenario.

 

Does anybody else know if this is possible without creating a separate script?

By: Markus Moripen 13 May 2020

RE: Possibility to send e-mails in tickets via REST API

Hi.

We really need this to work! When using the SOAP version I can set email and notification both for customer and owner.
When posting api/v1/TicketMessage none of this is working!
String field "Author" is the only thing that is shown.

We can't use this without the possibility to see who is posting the message and send notification e-mail!

Espen

By: Espen Fosshaug 31 Jul 2020

RE: Possibility to send e-mails in tickets via REST API

Hi,

Unfortunately in current version of REST api this is not possible without proposed workaround, we have added this to our backlog.

By: Michel Krohn-Dale 17 Aug 2020