我想在我的Zendesk票证更新时向API发送评论详细信息。评论包含一些文本,可以包含多个附件。
我找到了一种发送附件详细信息的简单方法。但是找不到发送多个附件的详细信息的方法。
{
"ticket_id": "{{ticket.id}}",
"phone_number": "{{ticket.requester.name}}",
"comment_id": "{{ticket.latest_public_comment.id}}",
"comment": "{{ticket.latest_public_comment.value}}",
"status": "{{ticket.status}}",
"attachment": {
"url": "{{ticket.latest_public_comment.attachments.first.url}}",
"file_name": "{{ticket.latest_public_comment.attachments.first.filename}}"
}
}
我在电子邮件通知中找到了以下内容,但不知道使它用于通知目标(JSON)的确切语法。
{% for comment in ticket.comments %}
Comment:
{{comment.id}}
{{comment.created_at}}
{{comment.created_at_with_time}}
{{comment.author.name}}
{{comment.value}}
Attachment:
{% for attachment in comment.attachments %}
{{attachment.filename}}
{{attachment.url}}
{% endfor %}
{% endfor %}
我可以使用液体标记发送所有附件吗?