Webhookは、「Webhook」ページからZendesk管理センターで作成され、管理されます。
Webhookを管理するには、管理者であるか、またはトリガの管理権限のあるカスタムロールのエージェントである必要があります。
Webhookを編集および管理する
多くの場合、管理者はWebhookの編集、複製、非アクティブ化、削除を行うことができます。ただし、アプリの要件によって作成されたWebhookは、編集は可能ですが、複製や削除はできません。アプリの要件によって作成されたWebhookは、アプリの開発者が変更することが可能で、アカウント管理者による変更よりも優先させることができます。Webhookが作成された後で、接続方法を変更することはできません。
Webhookを編集するには
- 管理センターで、サイドバーにある「
アプリおよびインテグレーション」をクリックし、「アクションおよびWebhook」>「Webhook」を選択します。
- リストでWebhookを見つけ、Webhookの行にあるオプションメニューアイコン(
)をクリックして、「編集」をクリックします。
- 必要に応じて、Webhookに変更を加えます。
すべてのフィールドは編集可能です。ただし、認証を使用する場合、Webhookを作成または更新した後は、キー、トークン、またはパスワードを見ることはできなくなります。カスタムヘッダーを削除するには、削除アイコン(
)をクリックします。
- (オプション)Webhookに加えた変更をテストします。
- 「保存」をクリックします。
Webhookを複製するには
- 管理センターで、サイドバーにある「
アプリおよびインテグレーション」をクリックし、「アクションおよびWebhook」>「Webhook」を選択します。
- リストでWebhookを見つけ、Webhookの行にあるオプションメニューアイコン(
)をクリックして、「複製」をクリックします。
- Webhookの名前を編集し、必要に応じてWebhookを変更します。
- 「更新」をクリックします。
ブランドを非アクティブにするには
- 管理センターで、サイドバーにある「
アプリおよびインテグレーション」をクリックし、「アクションおよびWebhook」>「Webhook」を選択します。
- リストでWebhookを見つけ、Webhookの行にあるオプションメニューアイコン(
)をクリックして、「非アクティブにする」をクリックします。
- 確認ダイアログで、「非アクティブにする」をクリックします。
Webhookを削除するには
- 管理センターで、サイドバーにある「
アプリおよびインテグレーション」をクリックし、「アクションおよびWebhook」>「Webhook」を選択します。
- リストでWebhookを見つけ、Webhookの行にあるオプションメニューアイコン(
)をクリックして、「削除」をクリックします。
- 「削除」をクリックします。
Webhookのアクティビティを表示する
各Webhookにはアクティビティ記録があり、呼び出しの詳細な記録に加えて、過去7日間のリクエスト数を確認することができます。
エンドポイントが特定のHTTPレスポンスコードを返した場合、Webhook呼び出しは最大3回まで自動的に再試行されます。再試行シナリオの詳細と例については、開発者向けドキュメントの「Webhook retry logic」を参照してください。
Zendeskは、Webhookへのアクションの配信が一度で済むよう、最大限の努力を払っています。ただし、保証の限りではありません。Webhookが同じアクションによって複数回呼び出される可能性があります。また、webhook circuit breakerがトリガされるなどの特定の状況下では、アクションがまったく配信されない可能性もあります。重複した呼び出しを検出するには、Webhook署名を使用することができます。ワークフローに問題がある場合は、Webhookから生じるアクションが冪等であることを確認してください。
- 管理センターで、サイドバーにある「
アプリおよびインテグレーション」をクリックし、「アクションおよびWebhook」>「Webhook」を選択します。
- リストでWebhookを見つけ、Webhookの行にあるオプションメニューアイコン(
)をクリックして、「詳細を表示」をクリックします。
- 「アクティビティ」タブをクリックします。
- 「フィルター」をクリックして、アクティビティ記録を開始日、開始時間、終了日、終了時間、またはステータスでフィルターした後、「フィルターを適用」をクリックします。
Webhookをデバッグする
Webhookが正常に動作していない場合、失敗した呼び出しはWebhookのアクティビティ記録に表示されます。アクティビティ記録は、「Failed」というステータスや特定のエラータイプでフィルターできます。「アクティビティ」タブでは、「呼び出しID」をクリックして、特定のWebhook呼び出しのリクエストとレスポンスを表示することもできます。
レスポンスはほとんどの場合、Zendesk自身からではなく、Webhookのリクエストを受けたサードパーティーのサービスから送信されます。通常、エラーを修正するためにはこのサードパーティのサービスとの連携が必要です。
レスポンスステータスに含まれる数値コードを使用して、問題を診断することができます。これらのレスポンスステータスコードは、HTTPリクエスト全体で標準です。標準のHTTPレスポンスステータスコードの一覧とその意味については、MDN web docsのHTTPレスポンスステータスコードを参照してください。
Webhookのリクエストには10秒のタイムアウトがあります。レスポンスステータス「Failed: 504 Gateway Timeout」は、サービスがこのタイムアウト時間内にWebhookのリクエストに応答しなかったことを示します。タイムアウト時間は調整できません。
30件のコメント
Rajesh Patil
Hi Team,
Need help to send json payload but it seems my backend api doesn't accept the some special characters due to security reason.
"description": "----------------------------------------------\n\nTest, 28 Nov 2024, 11:39\n\nTrial test",
Anyhelp will appricated for webhook payload.
0
David
@Cloudhuset A/S
The issue you're facing with Zendesk's webhook activity/invocations tracking, especially regarding the inability to see the full URL invoked by a webhook, including dynamic elements like {{ticket.id}}, is indeed challenging.
Given the current limitations, you may want to look in to:
External Logging Service: Use an intermediate service or a serverless function (AWS Lambda, Azure Functions, Google Cloud Functions) that your webhook calls first. This service would log the full URL (including the {{ticket.id}} replacement) and then make the API call to Zendesk on your behalf. This approach allows you to implement detailed logging according to your needs.
Embedded Identifiers in Payload: Include additional identifiers or logging information within the webhook payload itself. While this doesn't solve the visibility of the URL directly, it can help correlate the invocation with specific actions or tickets.
0
Cloudhuset
I am really missing a way to see the URL on the webhook activity/invocations. For example I have webhooks that are updating tickets via the Zendesk API, so my webhook url is defined as https://mysubdomain.zendesk.com/api/v2/tickets/{{ticket.id}}. But when I look at a failed webhook invocation, there is no way that I can see which ticket it was trying to update, because I can't see the url. And on a huge Zendesk account with thousands of tickets created every day, that is a huge pain.
2
Greg Katechis
Hi Daniel! Yes, that is definitely possible to do, however if the main reason to use the form-encoded method is to avoid writing things manually, you'll find that this is going to be the same situation. Additionally, the issue with using URL params is that it is much more difficult to scale, as JSON is much easier to read than URL params. If you have other needs for form-encoded, then ignore that last bit, just wanted to make sure you weren't making more work down the road!
0
Daniel Rafeedie
Thanks Jacquelyn Brewer!
With the Form-encoded content, is it possible to pull custom fields from the organization attached to the ticket. For example, if the organization has a custom fields labeled "Organization_Service_Level" is there parameter like "Ticket.Organization.Organization_Service_Level" that we can enter to pull that custom field from the organization?
1
Jacquelyn Brewer
Daniel Rafeedie The Request format that you specify when creating the webhook determines the structure of the request body you define in the trigger. If you select JSON, you'll indeed need to manually write the JSON request in the trigger action. However, if you select Form-encoded content, you'll be asked to provide URL parameters and values in the trigger actions. I hope this helps!
1
Daniel Rafeedie
After creating a webhook it seems that it must be connected to a trigger to fire. When creating the trigger it seems that you have to manually write the JSON to define which variables should pass with the trigger. Is it possible to skip this step with JSON to just pass all available fields?
1
Rosie
Apologies as you're not getting the organization custom field in Webhook.
I would like to get more of your use case to help you here. I'll go ahead and create a separate ticket on your behalf so I can get more account-specific details to troubleshoot this issue. You may expect an email shortly with the ticket information.
Thank you.
0
Roee Aizman
I am not getting an organization custom filed filled by the webhoo.
Only the standard fields are filled.
The json includes:
"organization": {
"custom_fields": [
{
"key": 107953418xxxxxx,
"value": "Hello"
}
]
}
}
0
Gulzar Shikalgar
Hi Support,
Is there any timeline when feature 'Viewing a webhook's activity (beta)', will be out of beta and go to stable/feature release?
0
サインインしてコメントを残してください。