orgId = "41071068";
//获取工单信息
ticketdetails = zoho.desk.getRecordById(orgId,"tickets",id);
//从工单信息中获取客户的邮箱地址
contactemail = ticketdetails.getJSON("email");
//批量回复时调用的模板id
templateId = 7326000000007107;
//通过连接器调模板
Render = invokeurl
[
type :POST
connection:"zohodesk"
];
//Map赋值,固定格式
Mappy = Map();
Mappy.put("to",contactemail);
Mappy.put("content",Render.getJSON("body"));
Mappy.put("contentType","html");
Mappy.put("fromEmailAddress",temail);
Mappy.put("channel","EMAIL");
//通过连接器模拟手动回复的效果,生成一个回复的线程
sendreply = invokeurl
[
type :POST
parameters:Mappy + ""
headers:{"orgId":orgId}
connection:"zohodesk"
];