メールAPIでは、通知に対する返信メールや新規チケットを作成するメールの本文にコマンドを追加することで、チケットのプロパティを設定できます。メールAPIを使用できるのはエージェントだけです。これらのコマンドをエンドユーザーが使用しても無視されます。
以下の例では、エージェントは、メール通知に対する返信の中でチケットのステータスと担当者を設定しています。
また、エージェントは、サポートアドレスに送信する新規のメール内でもコマンドを使用できます。この種のメールは新規チケットを作成します。
シンタックス
メールAPIは、実行するコマンドがあるかどうか、メール本文の先頭を調べます。
コマンドはHTMLではなく、プレーンテキストで、次のパターンで記述します。
#command value
たとえば、チケットのステータスを設定したい場合、以下のコマンドを使用します。
#status solved
各行は、改行で区切る必要があります。たとえば、チケットのステータスと担当者を設定したい場合、以下のコマンドを使用します。
#status solved
#assignee jake@zendesk.com
メールの本文はコマンドブロックの下に入力します。
コマンドリファレンス
以下は、有効なメールの本文に含めることができる全コマンドのリストです。各コマンドは、1行に1個ずつ記述します。リストには、ショートコマンドも含まれます。これは、よく使われる1語のコマンドで、値を必要としません。たとえば、#status
solved
ではなく、ショートコマンド#solved
を使用します。
コマンド | 説明 |
---|---|
#status
|
有効な値は、open、pending、solvedです。メモ:チケットを「解決済み」(solved)に設定するには、#assigneeが設定されている必要があります。 ショートコマンドのシンタックス: #solved コマンドは、チケットを解決するためにエージェントが入力しなければならないフィールドを必要としないチケットに対してのみ機能します。 |
#requester
|
チケットのリクエスタを設定します。値は、自社アカウントでのユーザーID、またはメールアドレスのいずれかを指定できます。アカウント内にリクエスタが存在しない場合、そのリクエスタが新規ユーザーとして作成されます。 ライトエージェントはこのコマンドを使用できません。 |
#group
|
チケットをグループに割り当てます。有効な値は、グループ名またはグループIDです。
このコマンドは、転送されたメールに対して特に有効です。エージェントがZendeskにメールを転送した場合、デフォルトでは、転送されたチケットは未割り当てになるか、エージェントのデフォルトグループに割り当てられます。(サポートアドレスへのメールの回送」を参照。) エージェントはこのコマンドを使用して、転送されたチケットを、指定したグループに自動的に割り当てることができます。 |
#assignee |
チケットをエージェントに割り当てます。有効な値は、担当者のメールアドレスか、担当者のZendesk Support ID(RESTインテグレーションなどを経由して取得)です。 このコマンドを使用すると、コマンドを使用したエージェントが自動的にチケットのコラボレータ(CC)として追加されます。 |
#priority
|
チケットの優先度を設定します。有効な値は、low、normal、high、urgentです。メモ:ただし、優先度を設定するには、併せてチケットタイプを設定する必要があります(下の項目を参照)。 ショートコマンドのシンタックス: |
#type |
有効な値は、incident、question、task、problemです。 ショートコマンドのシンタックス: |
|
チケットに任意のタグを設定します。複数設定する場合は、スペースまたはカンマで区切ります。 メモ:コマンドでタグを設定すると、そのチケットの既存のタグはすべて削除されます。 |
#public
|
チケットのコメントの更新をパブリックに設定します。チケットの更新時にのみ使用できます。 パブリックチケットのデフォルトの値はtrueです。つまり、メール本文に記載した他のすべての内容がリクエスタに表示されます。プライベートチケットのデフォルト値はfalseです(例:ライトエージェントが作成したチケットなど)。 ショートコマンドのシンタックス: |
無効なコマンド
無効なコマンドまたは値が入力された場合、Zendeskに無視されます。
例
この例では、エージェントはすべてのコマンドを使用します。
チケットNo.178に対して次のことを行います。
- ステータスを「オープン」に設定する
- グループを「サポート」グループに設定し、jake@zendesk.comというメールアドレスのエージェントが担当者として設定する
- 優先度をnormalに設定する
- タイプをquestionに設定する
- 「ヘルプ」と「API」というタグを設定する
- コメントの公開属性を「プライベート」に設定する
- 「Hello world!」ではじまる新規のコメントをチケットに追加し、リクエスタに表示されない上記のコマンドと結合する
27件のコメント
Julian
On Dec 22, 2021, Jeff C said:
Yet, the article says
What would be, now, a turnaround to this scenario:
Goal:
When a partner company forwards a user request to my Zendesk, the forwarded email often includes internal information meant only for my agents and not for the requester.
Need:
I want the first message in the conversation (the forwarded email) to be created automatically as an internal note, so it is not visible to the end user.
Thank you for your ideas.
0
Axel de Jong
This is something we too would really appreciate: some kind of trigger to allow to set the organization on email tickets for users with multiple organisations.
1263792605130 did you ever find a way to achieve this?
0
Justin Near
We have several clients with multiple organizations. I'm not seeing “Organization” in the placeholder list, but I'm also not seeing a way to change organization on a ticket with a trigger. Is there a way to change the organization using a placeholder and/or some other method while forwarding an email?
0
Dainne Kiara Lucena-Laxamana
Hi 5094134994970
That's rather odd. I went ahead & created a ticket to look into that Email trail using the latest comment placeholder. Please keep an eye out for our Email
0
Kiran Yadav
Hi Team, if we are replying to the requester about the ticket and the requester is replying back through their email, is it possible that the requester see only the latest comment and not the other trail mail comments. I have tried using the latest comment placeholder in the trigger but still if the agent replies back the comments are visible in the trail mail
0
Sriram Parthasarathy
Support team, are you planning on getting html-formatted tags to work? We are not able to ask our agents (who all use Outlook) to make sure they switch to plain text email every single time they want to reply to a ticket and use mail api for changing the assignee, status, or adding a note.
0
Patrick Lanwehr
Hi Mike,
just check my comment from the 29.06.2023
I have already added the link.
0
Mike DR
0
Joyce
#brand
is not a supported command for Mail API. All the supported Mail API commands are listed in the Command reference topic of this article.As a workaround, you can use the
#tags
command to add a ticket tag and use this tag as a condition in a trigger to set the ticket brand.Hope this helps.
1
Patrick Lanwehr
Hallo Jennifer,
ich möchte gerne eine E-Mail, die bisher ohne Ticketbezug ist, als internen Kommentar einem bestehenden Tickets hinzufügen.
Im Jahr 2015 gab es dazu mal einen Community-Post mit sehr viel Feedback. Ist das nun die Lösung ?
https://support.zendesk.com/hc/de/community/posts/4409217600666-Ability-to-forward-emails-into-an-existing-ticket
0
サインインしてコメントを残してください。