snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
0
zerver/webhooks/intercom/__init__.py
Normal file
0
zerver/webhooks/intercom/__init__.py
Normal file
36
zerver/webhooks/intercom/doc.md
Normal file
36
zerver/webhooks/intercom/doc.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Zulip Intercom integration
|
||||
|
||||
Get Intercom notifications in Zulip!
|
||||
|
||||
{start_tabs}
|
||||
|
||||
1. {!create-an-incoming-webhook.md!}
|
||||
|
||||
1. {!generate-webhook-url-basic.md!}
|
||||
|
||||
1. Go to **Settings** in your Intercom account, and click on
|
||||
**Integrations** in the left sidebar. Click on **Developer Hub**,
|
||||
and click **New app**.
|
||||
|
||||
1. Set **App name** to a name of your choice, such as `Zulip`. Set
|
||||
**Workspace** to the Intercom workspace of your choice, and click
|
||||
**Create app**.
|
||||
|
||||
1. From the app's dashboard, click on **Webhooks** in the left sidebar. Set
|
||||
**endpoint URL** to the URL generated above. Select the topics you'd
|
||||
like to be notified about, and click **Save**. You should receive a test
|
||||
message.
|
||||
|
||||
{end_tabs}
|
||||
|
||||
{!congrats.md!}
|
||||
|
||||

|
||||
|
||||
{!event-filtering-additional-feature.md!}
|
||||
|
||||
### Related documentation
|
||||
|
||||
* [Intercom doc on Webhooks](https://developers.intercom.com/docs/webhooks/setting-up-webhooks)
|
||||
|
||||
{!webhooks-url-specification.md!}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin_activity_log_event",
|
||||
"id": "f98f9a55-e125-4d4d-ad60-7cfc5f553cfc",
|
||||
"performed_by": {
|
||||
"type": "admin",
|
||||
"id": "1234567",
|
||||
"email": "bwilliams@example.com",
|
||||
"ip": "192.0.2.1"
|
||||
},
|
||||
"metadata": {
|
||||
"enabled": false
|
||||
},
|
||||
"created_at": 1768016203,
|
||||
"activity_type": "ai_inbox_translation_setting_change",
|
||||
"activity_description": "Bo Williams disabled the AI inbox translation settings."
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_6a8c959f-3b5b-46f8-b8a6-9a7a5e6f2bec",
|
||||
"topic": "admin.activity_log_event.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768016203,
|
||||
"created_at": 1768016203,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin",
|
||||
"id": 1234567,
|
||||
"name": "Bo Williams",
|
||||
"email": "bwilliams@example.com",
|
||||
"job_title": null,
|
||||
"away_mode_enabled": false,
|
||||
"away_mode_reassign": false,
|
||||
"away_status_reason": "",
|
||||
"has_inbox_seat": true,
|
||||
"team_ids": [
|
||||
9680998
|
||||
],
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_5a0b13ce-6163-47b4-bd2d-4f65d09b0762",
|
||||
"topic": "admin.added_to_workspace",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768016560,
|
||||
"created_at": 1768016560,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin",
|
||||
"id": 1234567,
|
||||
"name": "Bo Williams",
|
||||
"email": "bwilliams@example.com",
|
||||
"job_title": null,
|
||||
"away_mode_enabled": true,
|
||||
"away_mode_reassign": false,
|
||||
"away_status_reason": "",
|
||||
"has_inbox_seat": true,
|
||||
"team_ids": [
|
||||
9680998
|
||||
],
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_ca8a37c8-c6b7-4a5c-89bf-1491a6e53131",
|
||||
"topic": "admin.away_mode_updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768016828,
|
||||
"created_at": 1768016828,
|
||||
"self": null
|
||||
}
|
||||
34
zerver/webhooks/intercom/fixtures/admin_logged_in.json
Normal file
34
zerver/webhooks/intercom/fixtures/admin_logged_in.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin",
|
||||
"id": 1234567,
|
||||
"name": "Bo Williams",
|
||||
"email": "bwilliams@example.com",
|
||||
"job_title": null,
|
||||
"away_mode_enabled": true,
|
||||
"away_mode_reassign": false,
|
||||
"away_status_reason": "",
|
||||
"has_inbox_seat": true,
|
||||
"team_ids": [
|
||||
9680998
|
||||
],
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_1fdf450f-851a-4608-8fa6-31c818df2e94",
|
||||
"topic": "admin.logged_in",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768016966,
|
||||
"created_at": 1768016966,
|
||||
"self": null
|
||||
}
|
||||
34
zerver/webhooks/intercom/fixtures/admin_logged_out.json
Normal file
34
zerver/webhooks/intercom/fixtures/admin_logged_out.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin",
|
||||
"id": 1234567,
|
||||
"name": "Bo Williams",
|
||||
"email": "bwilliams@example.com",
|
||||
"job_title": null,
|
||||
"away_mode_enabled": true,
|
||||
"away_mode_reassign": false,
|
||||
"away_status_reason": "",
|
||||
"has_inbox_seat": true,
|
||||
"team_ids": [
|
||||
9680998
|
||||
],
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_df1a2d64-5fe0-473f-bc99-cb2345f75e4d",
|
||||
"topic": "admin.logged_out",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768016917,
|
||||
"created_at": 1768016917,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "admin",
|
||||
"id": 1234567,
|
||||
"name": "Bo Williams",
|
||||
"email": "bwilliams@example.com",
|
||||
"job_title": null,
|
||||
"away_mode_enabled": false,
|
||||
"away_mode_reassign": false,
|
||||
"away_status_reason": "",
|
||||
"has_inbox_seat": true,
|
||||
"team_ids": [],
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_593f00e1-3fdd-4faf-baaf-00a75749c8b5",
|
||||
"topic": "admin.removed_from_workspace",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768017183,
|
||||
"created_at": 1768017182,
|
||||
"self": null
|
||||
}
|
||||
139
zerver/webhooks/intercom/fixtures/company_contact_attached.json
Normal file
139
zerver/webhooks/intercom/fixtures/company_contact_attached.json
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"company": {
|
||||
"type": "company",
|
||||
"id": "6961d175205cf6a4438f0c21",
|
||||
"company_id": "6961d175205cf6a4438f0c22-qualification-company",
|
||||
"app_id": "abc123def",
|
||||
"name": null,
|
||||
"plan_id": null,
|
||||
"remote_created_at": null,
|
||||
"created_at": "2026-01-10T04:11:34.013+00:00",
|
||||
"updated_at": "2026-01-10T04:11:34.091+00:00",
|
||||
"last_request_at": null,
|
||||
"monthly_spend": 0,
|
||||
"session_count": 0,
|
||||
"user_count": 1,
|
||||
"tag_ids": [],
|
||||
"custom_attributes": {}
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961d162fb0ef1f1ac90ce8c",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "3c5f32be-a02e-413c-9a0f-4f5518e9d495",
|
||||
"role": "lead",
|
||||
"email": "lead@example.com",
|
||||
"phone": null,
|
||||
"formatted_phone": null,
|
||||
"name": "Jane Lead",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:11:14.436+00:00",
|
||||
"updated_at": "2026-01-10T04:11:34.135+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d162fb0ef1f1ac90ce8c/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d162fb0ef1f1ac90ce8c/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961d175205cf6a4438f0c21",
|
||||
"type": "company",
|
||||
"url": "/companies/6961d175205cf6a4438f0c21"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d162fb0ef1f1ac90ce8c/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d162fb0ef1f1ac90ce8c/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d162fb0ef1f1ac90ce8c/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_3690afb3-f427-4e37-a164-b98284119e57",
|
||||
"topic": "company.contact.attached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768018294,
|
||||
"created_at": 1768018294,
|
||||
"self": null
|
||||
}
|
||||
139
zerver/webhooks/intercom/fixtures/company_contact_detached.json
Normal file
139
zerver/webhooks/intercom/fixtures/company_contact_detached.json
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"company": {
|
||||
"type": "company",
|
||||
"id": "6961d38729675009a437c3bf",
|
||||
"company_id": "6961d38729675009a437c3c0-qualification-company",
|
||||
"app_id": "abc123def",
|
||||
"name": "Acme Corp",
|
||||
"plan_id": null,
|
||||
"remote_created_at": null,
|
||||
"created_at": "2026-01-10T04:20:23.273+00:00",
|
||||
"updated_at": "2026-01-10T04:20:23.424+00:00",
|
||||
"last_request_at": null,
|
||||
"monthly_spend": 0,
|
||||
"session_count": 0,
|
||||
"user_count": 1,
|
||||
"tag_ids": [],
|
||||
"custom_attributes": {}
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": "+1 555-123-4567",
|
||||
"formatted_phone": null,
|
||||
"name": "Jane Smith",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T04:20:23.458+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961d38729675009a437c3bf",
|
||||
"type": "company",
|
||||
"url": "/companies/6961d38729675009a437c3bf"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_ed6c579b-feb7-4ef5-bd9b-6a516d270a48",
|
||||
"topic": "company.contact.detached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019066,
|
||||
"created_at": 1768019066,
|
||||
"self": null
|
||||
}
|
||||
36
zerver/webhooks/intercom/fixtures/company_created.json
Normal file
36
zerver/webhooks/intercom/fixtures/company_created.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "company",
|
||||
"id": "6961d175205cf6a4438f0c21",
|
||||
"name": null,
|
||||
"app_id": "abc123def",
|
||||
"plan": null,
|
||||
"company_id": "6961d175205cf6a4438f0c22-qualification-company",
|
||||
"remote_created_at": null,
|
||||
"created_at": "2026-01-10T04:11:34.013+00:00",
|
||||
"updated_at": "2026-01-10T04:11:34.013+00:00",
|
||||
"last_request_at": null,
|
||||
"size": null,
|
||||
"website": null,
|
||||
"industry": null,
|
||||
"monthly_spend": 0,
|
||||
"session_count": 0,
|
||||
"user_count": 0,
|
||||
"custom_attributes": {},
|
||||
"tag_ids": []
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_f3a337e8-f452-4ab9-9929-d6a4a8dba4ae",
|
||||
"topic": "company.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768018294,
|
||||
"created_at": 1768018294,
|
||||
"self": null
|
||||
}
|
||||
21
zerver/webhooks/intercom/fixtures/company_deleted.json
Normal file
21
zerver/webhooks/intercom/fixtures/company_deleted.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"id": "6961d38729675009a437c3bf",
|
||||
"type": "company",
|
||||
"deleted": true
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_e821a7f7-2785-47d6-8fdd-dd43095fe523",
|
||||
"topic": "company.deleted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019067,
|
||||
"created_at": 1768019066,
|
||||
"self": null
|
||||
}
|
||||
36
zerver/webhooks/intercom/fixtures/company_updated.json
Normal file
36
zerver/webhooks/intercom/fixtures/company_updated.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "company",
|
||||
"id": "6961d175205cf6a4438f0c21",
|
||||
"name": "Acme Enterprises",
|
||||
"app_id": "abc123def",
|
||||
"plan": null,
|
||||
"company_id": "6961d175205cf6a4438f0c22-qualification-company",
|
||||
"remote_created_at": null,
|
||||
"created_at": "2026-01-10T04:11:34.013+00:00",
|
||||
"updated_at": "2026-01-10T04:11:34.206+00:00",
|
||||
"last_request_at": null,
|
||||
"size": null,
|
||||
"website": null,
|
||||
"industry": null,
|
||||
"monthly_spend": 0,
|
||||
"session_count": 0,
|
||||
"user_count": 1,
|
||||
"custom_attributes": {},
|
||||
"tag_ids": []
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_3a1862e2-6876-4c03-bd46-e065ab0f141c",
|
||||
"topic": "company.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768018294,
|
||||
"created_at": 1768018294,
|
||||
"self": null
|
||||
}
|
||||
22
zerver/webhooks/intercom/fixtures/contact_archived.json
Normal file
22
zerver/webhooks/intercom/fixtures/contact_archived.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"external_id": "22",
|
||||
"type": "contact",
|
||||
"archived": true
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_72d7d36b-5c4b-4a5b-811c-9c985d5b104e",
|
||||
"topic": "contact.archived",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019637,
|
||||
"created_at": 1768019637,
|
||||
"self": null
|
||||
}
|
||||
22
zerver/webhooks/intercom/fixtures/contact_deleted.json
Normal file
22
zerver/webhooks/intercom/fixtures/contact_deleted.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"id": "696122fb2591e0cadd20073a",
|
||||
"external_id": "1",
|
||||
"type": "contact",
|
||||
"deleted": true
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_d997a8b0-19f8-47df-b203-b7e8424a2029",
|
||||
"topic": "contact.deleted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019870,
|
||||
"created_at": 1768019869,
|
||||
"self": null
|
||||
}
|
||||
119
zerver/webhooks/intercom/fixtures/contact_email_updated.json
Normal file
119
zerver/webhooks/intercom/fixtures/contact_email_updated.json
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d43b372591e999b3ea56",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "55",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:23:23.215+00:00",
|
||||
"updated_at": "2026-01-10T04:39:55.000Z",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961d37afb9d13c23f871b6d",
|
||||
"type": "company",
|
||||
"url": "/companies/6961d37afb9d13c23f871b6d"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_75d5b08f-0305-4e0a-8902-81099d3342a1",
|
||||
"topic": "contact.email.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019995,
|
||||
"created_at": 1768019995,
|
||||
"self": null
|
||||
}
|
||||
113
zerver/webhooks/intercom/fixtures/contact_lead_added_email.json
Normal file
113
zerver/webhooks/intercom/fixtures/contact_lead_added_email.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d897719c606240178da8",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "c3ca7689-a3c1-4a05-b81d-6cdf995cea85",
|
||||
"role": "lead",
|
||||
"email": "hjgujguju@gmail.com",
|
||||
"phone": null,
|
||||
"name": "shuuuuz",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:41:59.251+00:00",
|
||||
"updated_at": "2026-01-10T04:44:57.195+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_b9e7a094-9cfc-474d-a733-2aa022962128",
|
||||
"topic": "contact.lead.added_email",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020297,
|
||||
"created_at": 1768020297,
|
||||
"self": null
|
||||
}
|
||||
113
zerver/webhooks/intercom/fixtures/contact_lead_created.json
Normal file
113
zerver/webhooks/intercom/fixtures/contact_lead_created.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d897719c606240178da8",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "c3ca7689-a3c1-4a05-b81d-6cdf995cea85",
|
||||
"role": "lead",
|
||||
"email": "shuz@gmail.com",
|
||||
"phone": null,
|
||||
"name": "shuuuuz",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:41:59.251+00:00",
|
||||
"updated_at": "2026-01-10T04:41:59.249+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_204d32ad-f47a-4276-8074-e5ce789d2987",
|
||||
"topic": "contact.lead.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020119,
|
||||
"created_at": 1768020119,
|
||||
"self": null
|
||||
}
|
||||
127
zerver/webhooks/intercom/fixtures/contact_lead_tag_created.json
Normal file
127
zerver/webhooks/intercom/fixtures/contact_lead_tag_created.json
Normal file
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_tag",
|
||||
"tag": {
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961d897719c606240178da8",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "c3ca7689-a3c1-4a05-b81d-6cdf995cea85",
|
||||
"role": "lead",
|
||||
"email": "hjgujguju@gmail.com",
|
||||
"phone": null,
|
||||
"name": "shuuuuz",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:41:59.251+00:00",
|
||||
"updated_at": "2026-01-10T04:49:07.847+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "12934044",
|
||||
"type": "tag",
|
||||
"url": "/tags/12934044"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d897719c606240178da8/tags",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_723cd050-01bf-487f-b32d-c2bd0f618a4d",
|
||||
"topic": "contact.lead.tag.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020547,
|
||||
"created_at": 1768020547,
|
||||
"self": null
|
||||
}
|
||||
121
zerver/webhooks/intercom/fixtures/contact_lead_tag_deleted.json
Normal file
121
zerver/webhooks/intercom/fixtures/contact_lead_tag_deleted.json
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_tag",
|
||||
"tag": {
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961d897719c606240178da8",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "c3ca7689-a3c1-4a05-b81d-6cdf995cea85",
|
||||
"role": "lead",
|
||||
"email": "hjgujguju@gmail.com",
|
||||
"phone": null,
|
||||
"name": "shuuuuz",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:41:59.251+00:00",
|
||||
"updated_at": "2026-01-10T04:53:41.545+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_34ba62b3-b000-4e0e-9eb7-9a34d4222755",
|
||||
"topic": "contact.lead.tag.deleted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020822,
|
||||
"created_at": 1768020821,
|
||||
"self": null
|
||||
}
|
||||
119
zerver/webhooks/intercom/fixtures/contact_lead_updated.json
Normal file
119
zerver/webhooks/intercom/fixtures/contact_lead_updated.json
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d897719c606240178da8",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "c3ca7689-a3c1-4a05-b81d-6cdf995cea85",
|
||||
"role": "lead",
|
||||
"email": "hjgujguju@gmail.com",
|
||||
"phone": null,
|
||||
"name": "shuuuuzdvgzs",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:41:59.251+00:00",
|
||||
"updated_at": "2026-01-10T04:55:06.766+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961db94d8da12993c3c1dcc",
|
||||
"type": "company",
|
||||
"url": "/companies/6961db94d8da12993c3c1dcc"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d897719c606240178da8/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d897719c606240178da8/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_6f57ad57-a792-484b-8e3a-28c20c586305",
|
||||
"topic": "contact.lead.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020906,
|
||||
"created_at": 1768020906,
|
||||
"self": null
|
||||
}
|
||||
121
zerver/webhooks/intercom/fixtures/contact_subscribed.json
Normal file
121
zerver/webhooks/intercom/fixtures/contact_subscribed.json
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_subscribe",
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961e1e6d1965062ce6434d1",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "333",
|
||||
"role": "user",
|
||||
"email": "qewd@hqj.com",
|
||||
"phone": null,
|
||||
"name": "wqr",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T05:21:42.099+00:00",
|
||||
"updated_at": "2026-01-10T05:22:22.657+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
},
|
||||
"subscription_types": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"created_at": 1768022542
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_0020db82-b78c-4d5b-910b-5ba8de5e71de",
|
||||
"topic": "contact.subscribed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768022542,
|
||||
"created_at": 1768022542,
|
||||
"self": null
|
||||
}
|
||||
113
zerver/webhooks/intercom/fixtures/contact_unarchived.json
Normal file
113
zerver/webhooks/intercom/fixtures/contact_unarchived.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T05:20:30.118+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_6e7bea45-2a72-4829-8dd5-61b3e8d49f87",
|
||||
"topic": "contact.unarchived",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768022430,
|
||||
"created_at": 1768022430,
|
||||
"self": null
|
||||
}
|
||||
121
zerver/webhooks/intercom/fixtures/contact_unsubscribed.json
Normal file
121
zerver/webhooks/intercom/fixtures/contact_unsubscribed.json
Normal file
@@ -0,0 +1,121 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_unsubscribe",
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961e1e6d1965062ce6434d1",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "333",
|
||||
"role": "user",
|
||||
"email": "qewd@hqj.com",
|
||||
"phone": null,
|
||||
"name": "wqr",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": true,
|
||||
"created_at": "2026-01-10T05:21:42.099+00:00",
|
||||
"updated_at": "2026-01-10T05:21:48.255+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e1e6d1965062ce6434d1/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
},
|
||||
"subscription_types": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"created_at": 1768022508
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_809e06ce-cdf2-4f03-87d8-c99574b66ee2",
|
||||
"topic": "contact.unsubscribed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768022508,
|
||||
"created_at": 1768022508,
|
||||
"self": null
|
||||
}
|
||||
113
zerver/webhooks/intercom/fixtures/contact_user_created.json
Normal file
113
zerver/webhooks/intercom/fixtures/contact_user_created.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d4041c1e12de4c5499cc",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "24",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:22:28.240+00:00",
|
||||
"updated_at": "2026-01-10T04:22:28.238+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_c47f7aeb-bdeb-4d35-8fc7-eb945334fdad",
|
||||
"topic": "contact.user.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768018948,
|
||||
"created_at": 1768018948,
|
||||
"self": null
|
||||
}
|
||||
132
zerver/webhooks/intercom/fixtures/contact_user_tag_created.json
Normal file
132
zerver/webhooks/intercom/fixtures/contact_user_tag_created.json
Normal file
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_tag",
|
||||
"tag": {
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961f1c19b981fb5a0b90afb",
|
||||
"workspace_id": "u7iknh8e",
|
||||
"external_id": null,
|
||||
"role": "user",
|
||||
"email": "merge_user_fixture@example.com",
|
||||
"phone": null,
|
||||
"name": "Merge User Fixture",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T06:29:21.953+00:00",
|
||||
"updated_at": "2026-01-12T15:23:19.730+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "12986331",
|
||||
"type": "tag",
|
||||
"url": "/tags/12986331"
|
||||
},
|
||||
{
|
||||
"id": "12934044",
|
||||
"type": "tag",
|
||||
"url": "/tags/12934044"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/tags",
|
||||
"total_count": 2,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_2be5716c-6ecd-4852-b6b2-3e66b0e3ede3",
|
||||
"topic": "contact.user.tag.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768231400,
|
||||
"created_at": 1768231399,
|
||||
"self": null
|
||||
}
|
||||
127
zerver/webhooks/intercom/fixtures/contact_user_tag_deleted.json
Normal file
127
zerver/webhooks/intercom/fixtures/contact_user_tag_deleted.json
Normal file
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact_tag",
|
||||
"tag": {
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961d4041c1e12de4c5499cc",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "24",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:22:28.240+00:00",
|
||||
"updated_at": "2026-01-10T04:50:56.449+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961d37afb9d13c23f871b6d",
|
||||
"type": "company",
|
||||
"url": "/companies/6961d37afb9d13c23f871b6d"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d4041c1e12de4c5499cc/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_58f7a078-b8b6-401a-8912-628a5675e813",
|
||||
"topic": "contact.user.tag.deleted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768020656,
|
||||
"created_at": 1768020656,
|
||||
"self": null
|
||||
}
|
||||
119
zerver/webhooks/intercom/fixtures/contact_user_updated.json
Normal file
119
zerver/webhooks/intercom/fixtures/contact_user_updated.json
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961d43b372591e999b3ea56",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "55",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:23:23.215+00:00",
|
||||
"updated_at": "2026-01-10T04:39:55.465+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "6961d37afb9d13c23f871b6d",
|
||||
"type": "company",
|
||||
"url": "/companies/6961d37afb9d13c23f871b6d"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/companies",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961d43b372591e999b3ea56/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_3a00d3fc-6fb0-400c-b089-ab44f0c9c28a",
|
||||
"topic": "contact.user.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768019995,
|
||||
"created_at": 1768019995,
|
||||
"self": null
|
||||
}
|
||||
113
zerver/webhooks/intercom/fixtures/contacts_merged.json
Normal file
113
zerver/webhooks/intercom/fixtures/contacts_merged.json
Normal file
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "contact",
|
||||
"id": "6961f1c19b981fb5a0b90afb",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": null,
|
||||
"role": "user",
|
||||
"email": "merge_user_fixture@example.com",
|
||||
"phone": null,
|
||||
"name": "Merge User Fixture",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T06:29:21.953+00:00",
|
||||
"updated_at": "2026-01-10T06:30:59.735+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f1c19b981fb5a0b90afb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_37175b28-db5f-4aa5-848a-7fbf18b0d043",
|
||||
"topic": "contact.merged",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768026660,
|
||||
"created_at": 1768026659,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032000,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 6,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358198341",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">aMSIJJO</p>",
|
||||
"created_at": 1768032000,
|
||||
"updated_at": 1768032000,
|
||||
"notified_at": 1768032000,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_4ad4cf66-d924-4d6a-8308-3979cae180de",
|
||||
"topic": "conversation.admin.assigned",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032001,
|
||||
"created_at": 1768032001,
|
||||
"self": null
|
||||
}
|
||||
156
zerver/webhooks/intercom/fixtures/conversation_admin_closed.json
Normal file
156
zerver/webhooks/intercom/fixtures/conversation_admin_closed.json
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032815,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": false,
|
||||
"state": "closed",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:13:08.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 15,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 756
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358541098",
|
||||
"part_type": "close",
|
||||
"body": null,
|
||||
"created_at": 1768032815,
|
||||
"updated_at": 1768032815,
|
||||
"notified_at": 1768032815,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "closed",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_93e58991-66f7-43b9-a20a-f8cc02b0ff2d",
|
||||
"topic": "conversation.admin.closed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032815,
|
||||
"created_at": 1768032815,
|
||||
"self": null
|
||||
}
|
||||
167
zerver/webhooks/intercom/fixtures/conversation_admin_noted.json
Normal file
167
zerver/webhooks/intercom/fixtures/conversation_admin_noted.json
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768033309,
|
||||
"waiting_since": 1768032894,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": [
|
||||
{
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request",
|
||||
"applied_at": 1768033257,
|
||||
"applied_by": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:14:54.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 1,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 21,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 865
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358737362",
|
||||
"part_type": "note",
|
||||
"body": "<p class=\"no-margin\">hwdqjhgj</p>",
|
||||
"created_at": 1768033309,
|
||||
"updated_at": 1768033309,
|
||||
"notified_at": 1768033309,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_c8794d57-5428-43ac-b313-7e03317c1d44",
|
||||
"topic": "conversation.admin.noted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768033310,
|
||||
"created_at": 1768033310,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032000,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 6,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358198341",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">aMSIJJO</p>",
|
||||
"created_at": 1768032000,
|
||||
"updated_at": 1768032000,
|
||||
"notified_at": 1768032000,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_58e78c8e-1755-4e61-954a-dc1bb1cead0d",
|
||||
"topic": "conversation.admin.open.assigned",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032001,
|
||||
"created_at": 1768032001,
|
||||
"self": null
|
||||
}
|
||||
156
zerver/webhooks/intercom/fixtures/conversation_admin_opened.json
Normal file
156
zerver/webhooks/intercom/fixtures/conversation_admin_opened.json
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032818,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:13:08.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 1,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 16,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 756
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358542539",
|
||||
"part_type": "open",
|
||||
"body": null,
|
||||
"created_at": 1768032818,
|
||||
"updated_at": 1768032818,
|
||||
"notified_at": 1768032818,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_13d516f4-fc98-46ef-9e99-260e6c8918d7",
|
||||
"topic": "conversation.admin.opened",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032819,
|
||||
"created_at": 1768032819,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032000,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 6,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358198341",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">aMSIJJO</p>",
|
||||
"created_at": 1768032000,
|
||||
"updated_at": 1768032000,
|
||||
"notified_at": 1768032000,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_726976e0-dde4-4944-9c90-2545c2bb7ac7",
|
||||
"topic": "conversation.admin.replied",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032001,
|
||||
"created_at": 1768032001,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621305755",
|
||||
"created_at": 1768033580,
|
||||
"updated_at": 1768033580,
|
||||
"waiting_since": null,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "219032411",
|
||||
"delivered_as": "admin_initiated",
|
||||
"subject": "",
|
||||
"body": "<p class=\"no-margin\">qftweqwrfeyufy</p>",
|
||||
"author": {
|
||||
"type": "admin",
|
||||
"id": "9608799",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"url": null,
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "6961e6de046e053d93e4da0b",
|
||||
"external_id": "fixture-user-1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": null,
|
||||
"admin_assignee_id": null,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": null,
|
||||
"time_to_admin_reply": null,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": null,
|
||||
"first_contact_reply_at": null,
|
||||
"first_assignment_at": null,
|
||||
"first_admin_reply_at": null,
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": null,
|
||||
"last_assignment_admin_reply_at": null,
|
||||
"last_contact_reply_at": null,
|
||||
"last_admin_reply_at": null,
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 0,
|
||||
"count_conversation_parts": 1,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": []
|
||||
},
|
||||
"title": null,
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [],
|
||||
"total_count": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_b735a345-53e3-4e99-ab8e-6bfd955d862c",
|
||||
"topic": "conversation.admin.single.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768033580,
|
||||
"created_at": 1768033580,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032729,
|
||||
"waiting_since": 1768032450,
|
||||
"snoozed_until": 1768102200,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "snoozed",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:07:30.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 12,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358507060",
|
||||
"part_type": "snoozed",
|
||||
"body": null,
|
||||
"created_at": 1768032729,
|
||||
"updated_at": 1768032729,
|
||||
"notified_at": 1768032729,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "snoozed",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_b9366b10-8d05-4954-a111-47537bda35b6",
|
||||
"topic": "conversation.admin.snoozed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032729,
|
||||
"created_at": 1768032729,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032989,
|
||||
"waiting_since": 1768032894,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:14:54.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 1,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 19,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 865
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358610849",
|
||||
"part_type": "timer_unsnooze",
|
||||
"body": null,
|
||||
"created_at": 1768032989,
|
||||
"updated_at": 1768032989,
|
||||
"notified_at": 1768032989,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_2ef33b1d-0dab-4c99-be31-3dbc79a6e7d9",
|
||||
"topic": "conversation.admin.unsnoozed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032990,
|
||||
"created_at": 1768032989,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"conversation": {
|
||||
"parts": [
|
||||
{
|
||||
"id": 37358461336,
|
||||
"app_id": 3239765,
|
||||
"conversation_id": 215472621202693,
|
||||
"body": "",
|
||||
"created_at": "2026-01-10T08:10:14.000Z",
|
||||
"updated_at": "2026-01-10T08:10:14.000Z",
|
||||
"owner_id": 9608799,
|
||||
"closer": false,
|
||||
"admin_only": false,
|
||||
"user_id": null,
|
||||
"url": null,
|
||||
"ua": null,
|
||||
"emailed": false,
|
||||
"markdown": true,
|
||||
"assignee_id": null,
|
||||
"opener": false,
|
||||
"channel": -1,
|
||||
"deleted": false,
|
||||
"json_blocks": "[]",
|
||||
"rule_id": null,
|
||||
"data": "{\"added_by\":{\"type\":\"admin\",\"id\":9608799,\"label\":\"John\",\"name\":\"John Doe\",\"email\":\"admin@example.com\"},\"participant\":{\"type\":\"user\",\"id\":\"6961cf78fb9d13be07871c78\",\"label\":\"Sample User\",\"name\":\"Sample User\",\"email\":\"user@example.com\"},\"previous_state\":\"state_open\",\"state\":\"state_open\",\"created_at_with_precision\":\"2026-01-10T08:10:14.903791+00:00\",\"admin\":{\"type\":\"admin\",\"id\":9608799,\"label\":\"John Doe\"}}",
|
||||
"unauthenticated": null,
|
||||
"facebook_message_id": null,
|
||||
"client_assigned_uuid": null,
|
||||
"external_source_id": null,
|
||||
"identity_verified": null
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"expand_for_notification": true
|
||||
},
|
||||
"model": {
|
||||
"app_id": 3239765,
|
||||
"id": 215472621202693,
|
||||
"user_id": "696205460674dbb9050aa7fd",
|
||||
"message_id": 3381828792,
|
||||
"created_at": "2026-01-10T07:56:29.000Z",
|
||||
"updated_at": "2026-01-10T08:10:14.000Z",
|
||||
"company_id": "-1",
|
||||
"message_version_id": null,
|
||||
"message_variation_id": 0,
|
||||
"message_type": "conversation",
|
||||
"read": false,
|
||||
"read_at": "2026-01-10T08:07:31.000Z",
|
||||
"latest_user_visible_comment_at": "2026-01-10T08:10:14.000Z",
|
||||
"latest_admin_visible_comment_at": "2026-01-10T08:10:14.000Z",
|
||||
"first_opened_at": "2026-01-10T07:56:34.000Z",
|
||||
"first_user_comment_at": "2026-01-10T08:07:30.000Z",
|
||||
"message_subclass_type": 3,
|
||||
"deleted": false,
|
||||
"original_user_id": "-1",
|
||||
"dismissed": false,
|
||||
"delivery_state": "delivered",
|
||||
"sent_at": "2026-01-10T07:56:29.000Z",
|
||||
"initiator_id": null,
|
||||
"initiator_type": null,
|
||||
"initial_channel": 2,
|
||||
"current_channel": 2
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": "",
|
||||
"formatted_phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T06:13:31.483+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": true,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_15048009-a4c5-472f-9055-a0e4d7c7a3bc",
|
||||
"topic": "conversation.contact.attached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032615,
|
||||
"created_at": 1768032615,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"conversation": {
|
||||
"parts": [
|
||||
{
|
||||
"id": 37358485044,
|
||||
"app_id": 3239765,
|
||||
"conversation_id": 215472621202693,
|
||||
"body": "",
|
||||
"created_at": "2026-01-10T08:11:14.000Z",
|
||||
"updated_at": "2026-01-10T08:11:14.000Z",
|
||||
"owner_id": 9608799,
|
||||
"closer": false,
|
||||
"admin_only": false,
|
||||
"user_id": null,
|
||||
"url": null,
|
||||
"ua": null,
|
||||
"emailed": false,
|
||||
"markdown": true,
|
||||
"assignee_id": null,
|
||||
"opener": false,
|
||||
"channel": -1,
|
||||
"deleted": false,
|
||||
"json_blocks": "[]",
|
||||
"rule_id": null,
|
||||
"data": "{\"removed_by\":{\"type\":\"admin\",\"id\":9608799,\"label\":\"John\",\"name\":\"John Doe\",\"email\":\"admin@example.com\"},\"participant\":{\"type\":\"user\",\"id\":\"6961cf78fb9d13be07871c78\",\"label\":\"Sample User\",\"name\":\"Sample User\",\"email\":\"user@example.com\"},\"previous_state\":\"state_open\",\"state\":\"state_open\",\"created_at_with_precision\":\"2026-01-10T08:11:14.481855+00:00\",\"admin\":{\"type\":\"admin\",\"id\":9608799,\"label\":\"John Doe\"}}",
|
||||
"unauthenticated": null,
|
||||
"facebook_message_id": null,
|
||||
"client_assigned_uuid": null,
|
||||
"external_source_id": null,
|
||||
"identity_verified": null
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"expand_for_notification": true
|
||||
},
|
||||
"model": {
|
||||
"app_id": 3239765,
|
||||
"id": 215472621202693,
|
||||
"user_id": "696205460674dbb9050aa7fd",
|
||||
"message_id": 3381828792,
|
||||
"created_at": "2026-01-10T07:56:29.000Z",
|
||||
"updated_at": "2026-01-10T08:11:14.000Z",
|
||||
"company_id": "-1",
|
||||
"message_version_id": null,
|
||||
"message_variation_id": 0,
|
||||
"message_type": "conversation",
|
||||
"read": false,
|
||||
"read_at": "2026-01-10T08:07:31.000Z",
|
||||
"latest_user_visible_comment_at": "2026-01-10T08:11:14.000Z",
|
||||
"latest_admin_visible_comment_at": "2026-01-10T08:11:14.000Z",
|
||||
"first_opened_at": "2026-01-10T07:56:34.000Z",
|
||||
"first_user_comment_at": "2026-01-10T08:07:30.000Z",
|
||||
"message_subclass_type": 3,
|
||||
"deleted": false,
|
||||
"original_user_id": "-1",
|
||||
"dismissed": false,
|
||||
"delivery_state": "delivered",
|
||||
"sent_at": "2026-01-10T07:56:29.000Z",
|
||||
"initiator_id": null,
|
||||
"initiator_type": null,
|
||||
"initial_channel": 2,
|
||||
"current_channel": 2
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": "",
|
||||
"formatted_phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T08:10:31.654+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": "2026-01-10T08:10:31.646+00:00",
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": true,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_865f9d8d-0f38-45f4-95c9-495e2bc1c907",
|
||||
"topic": "conversation.contact.detached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032674,
|
||||
"created_at": 1768032674,
|
||||
"self": null
|
||||
}
|
||||
20
zerver/webhooks/intercom/fixtures/conversation_deleted.json
Normal file
20
zerver/webhooks/intercom/fixtures/conversation_deleted.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"conversation_id": "215472621305755"
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_d808d1ab-c203-42fb-9e66-d281c7d1f74d",
|
||||
"topic": "conversation.deleted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768112097,
|
||||
"created_at": 1768112097,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768031793,
|
||||
"waiting_since": 1768031789,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": null,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": null,
|
||||
"time_to_admin_reply": null,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": null,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": null,
|
||||
"first_admin_reply_at": null,
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": null,
|
||||
"last_assignment_admin_reply_at": null,
|
||||
"last_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"last_admin_reply_at": null,
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 0,
|
||||
"count_conversation_parts": 3,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": []
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358121213",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>shetty will reply as soon as they can.</p>",
|
||||
"created_at": 1768031793,
|
||||
"updated_at": 1768031793,
|
||||
"notified_at": 1768031793,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_9108e504-998b-4afb-afd2-405cff43b99f",
|
||||
"topic": "conversation.operator.replied",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768031794,
|
||||
"created_at": 1768031793,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768033204,
|
||||
"waiting_since": 1768032894,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:14:54.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 1,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 19,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 865
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358539897",
|
||||
"part_type": "comment",
|
||||
"body": "<p><i>This message was deleted</i></p>",
|
||||
"created_at": 1768032812,
|
||||
"updated_at": 1768033204,
|
||||
"notified_at": 1768032812,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": true,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_574e80f7-1e3a-425d-a485-2fe8ddf0b6d9",
|
||||
"topic": "conversation_part.redacted",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768033205,
|
||||
"created_at": 1768033204,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation_part_tag",
|
||||
"created_at": 1768033257,
|
||||
"conversation": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768033257,
|
||||
"waiting_since": 1768032894,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": [
|
||||
{
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request",
|
||||
"applied_at": 1768033257,
|
||||
"applied_by": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": 1026,
|
||||
"time_to_last_close": 1026,
|
||||
"median_time_to_reply": 117,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:14:54.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:13:32.000Z",
|
||||
"last_close_at": "2026-01-10T08:13:35.000Z",
|
||||
"last_closed_by_id": 9608799,
|
||||
"count_reopens": 1,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 19,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": 865
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358198341",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">aMSIJJO</p>",
|
||||
"created_at": 1768032000,
|
||||
"updated_at": 1768033257,
|
||||
"notified_at": 1768032000,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [
|
||||
{
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
}
|
||||
],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
},
|
||||
"tag": {
|
||||
"type": "tag",
|
||||
"id": "12934044",
|
||||
"name": "Feature Request"
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_bb2d67b8-b0ab-480a-94df-b4fd81224e27",
|
||||
"topic": "conversation_part.tag.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768033257,
|
||||
"created_at": 1768033257,
|
||||
"self": null
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032534,
|
||||
"waiting_since": 1768032450,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:07:30.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 8,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358429305",
|
||||
"part_type": "priority_changed",
|
||||
"body": null,
|
||||
"created_at": 1768032534,
|
||||
"updated_at": 1768032534,
|
||||
"notified_at": 1768032534,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_92261e36-95a7-4a80-90ef-bda7b55287cf",
|
||||
"topic": "conversation.priority.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032535,
|
||||
"created_at": 1768032534,
|
||||
"self": null
|
||||
}
|
||||
232
zerver/webhooks/intercom/fixtures/conversation_read.json
Normal file
232
zerver/webhooks/intercom/fixtures/conversation_read.json
Normal file
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768031793,
|
||||
"waiting_since": 1768031789,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": null,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": null,
|
||||
"time_to_admin_reply": null,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": null,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": null,
|
||||
"first_admin_reply_at": null,
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": null,
|
||||
"last_assignment_admin_reply_at": null,
|
||||
"last_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"last_admin_reply_at": null,
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 0,
|
||||
"count_conversation_parts": 5,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": []
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358120248",
|
||||
"part_type": "language_detection_details",
|
||||
"body": null,
|
||||
"created_at": 1768031790,
|
||||
"updated_at": 1768031790,
|
||||
"notified_at": 1768031790,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
},
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358121213",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>shetty will reply as soon as they can.</p>",
|
||||
"created_at": 1768031793,
|
||||
"updated_at": 1768031793,
|
||||
"notified_at": 1768031793,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
},
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358121359",
|
||||
"part_type": "comment",
|
||||
"body": "<p>Give the team a way to reach you:</p>",
|
||||
"created_at": 1768031793,
|
||||
"updated_at": 1768031793,
|
||||
"notified_at": 1768031793,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
},
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358121434",
|
||||
"part_type": "attribute_collector",
|
||||
"body": null,
|
||||
"created_at": 1768031793,
|
||||
"updated_at": 1768031793,
|
||||
"notified_at": 1768031793,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_7fde0300-6bf1-4916-8475-75497db01d08",
|
||||
"topic": "conversation.read",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768031794,
|
||||
"created_at": 1768031794,
|
||||
"self": null
|
||||
}
|
||||
123
zerver/webhooks/intercom/fixtures/conversation_user_created.json
Normal file
123
zerver/webhooks/intercom/fixtures/conversation_user_created.json
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768031789,
|
||||
"waiting_since": 1768031789,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": null,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": null,
|
||||
"time_to_admin_reply": null,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": null,
|
||||
"first_contact_reply_at": null,
|
||||
"first_assignment_at": null,
|
||||
"first_admin_reply_at": null,
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": null,
|
||||
"last_assignment_admin_reply_at": null,
|
||||
"last_contact_reply_at": null,
|
||||
"last_admin_reply_at": null,
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 0,
|
||||
"count_conversation_parts": 1,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": []
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [],
|
||||
"total_count": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_35acc575-8564-4c14-b9f2-c4980cf7828d",
|
||||
"topic": "conversation.user.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768031790,
|
||||
"created_at": 1768031790,
|
||||
"self": null
|
||||
}
|
||||
156
zerver/webhooks/intercom/fixtures/conversation_user_replied.json
Normal file
156
zerver/webhooks/intercom/fixtures/conversation_user_replied.json
Normal file
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "conversation",
|
||||
"id": "215472621202693",
|
||||
"created_at": 1768031789,
|
||||
"updated_at": 1768032450,
|
||||
"waiting_since": 1768032450,
|
||||
"snoozed_until": null,
|
||||
"source": {
|
||||
"type": "conversation",
|
||||
"id": "3381828792",
|
||||
"delivered_as": "customer_initiated",
|
||||
"subject": "",
|
||||
"body": "<p>helklo</p>",
|
||||
"author": {
|
||||
"type": "lead",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"name": null,
|
||||
"email": ""
|
||||
},
|
||||
"attachments": [],
|
||||
"url": "http://localhost:5500/test.html",
|
||||
"redacted": false
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"external_id": "5e68ece4-0ec8-4792-baac-02deba39e7fe"
|
||||
}
|
||||
]
|
||||
},
|
||||
"first_contact_reply": {
|
||||
"created_at": 1768031789,
|
||||
"type": "conversation",
|
||||
"url": "http://localhost:5500/test.html"
|
||||
},
|
||||
"admin_assignee_id": 9608799,
|
||||
"team_assignee_id": null,
|
||||
"open": true,
|
||||
"state": "open",
|
||||
"read": true,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"priority": "not_priority",
|
||||
"sla_applied": null,
|
||||
"statistics": {
|
||||
"type": "conversation_statistics",
|
||||
"time_to_assignment": 211,
|
||||
"time_to_admin_reply": 211,
|
||||
"time_to_first_close": null,
|
||||
"time_to_last_close": null,
|
||||
"median_time_to_reply": 211,
|
||||
"first_contact_reply_at": "2026-01-10T07:56:29.000Z",
|
||||
"first_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"first_close_at": null,
|
||||
"last_assignment_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_assignment_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_contact_reply_at": "2026-01-10T08:07:30.000Z",
|
||||
"last_admin_reply_at": "2026-01-10T08:00:00.000Z",
|
||||
"last_close_at": null,
|
||||
"last_closed_by_id": null,
|
||||
"count_reopens": 0,
|
||||
"count_assignments": 1,
|
||||
"count_conversation_parts": 7,
|
||||
"assigned_team_first_response_time": [],
|
||||
"assigned_team_first_response_time_in_office_hours": [],
|
||||
"handling_time": null
|
||||
},
|
||||
"conversation_rating": null,
|
||||
"teammates": {
|
||||
"type": "admin.list",
|
||||
"admins": [
|
||||
{
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": "",
|
||||
"custom_attributes": {
|
||||
"Has attachments": false,
|
||||
"Imported via standalone": false,
|
||||
"Auto-translated": false,
|
||||
"Fin AI Agent: Preview": false,
|
||||
"Fin AI Agent: Image used in reply": false,
|
||||
"Copilot used": false
|
||||
},
|
||||
"topics": {
|
||||
"type": "topic.list",
|
||||
"topics": [],
|
||||
"total_count": 0
|
||||
},
|
||||
"ticket": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"ai_agent": null,
|
||||
"ai_agent_participated": false,
|
||||
"conversation_parts": {
|
||||
"type": "conversation_part.list",
|
||||
"conversation_parts": [
|
||||
{
|
||||
"type": "conversation_part",
|
||||
"id": "37358396167",
|
||||
"part_type": "comment",
|
||||
"body": "<p>adwsdas</p>",
|
||||
"created_at": 1768032450,
|
||||
"updated_at": 1768032450,
|
||||
"notified_at": 1768032450,
|
||||
"assigned_to": null,
|
||||
"author": {
|
||||
"id": "696205460674dbb9050aa7fd",
|
||||
"type": "user",
|
||||
"name": null,
|
||||
"email": "",
|
||||
"from_ai_agent": false,
|
||||
"is_ai_answer": false
|
||||
},
|
||||
"attachments": [],
|
||||
"external_id": null,
|
||||
"redacted": false,
|
||||
"metadata": {},
|
||||
"email_message_metadata": null,
|
||||
"state": "open",
|
||||
"tags": [],
|
||||
"event_details": {},
|
||||
"app_package_code": null
|
||||
}
|
||||
],
|
||||
"total_count": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_7de9f5f5-27b9-48eb-b4db-0dcfa626f2e2",
|
||||
"topic": "conversation.user.replied",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768032452,
|
||||
"created_at": 1768032452,
|
||||
"self": null
|
||||
}
|
||||
149
zerver/webhooks/intercom/fixtures/granular_subscribe.json
Normal file
149
zerver/webhooks/intercom/fixtures/granular_subscribe.json
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "granular_subscribe",
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": "+1 555-123-4567",
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T05:38:04.931+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"id": "1943066",
|
||||
"type": "subscription",
|
||||
"url": "/subscription_types/1943066"
|
||||
}
|
||||
],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 1,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": true,
|
||||
"enabled_push_messaging": null
|
||||
},
|
||||
"subscription_types": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "subscription",
|
||||
"id": "1943066",
|
||||
"state": "live",
|
||||
"consent_type": "opt_in",
|
||||
"default_translation": {
|
||||
"name": "Announcements",
|
||||
"description": "Offers, product and feature announcements",
|
||||
"locale": "en"
|
||||
},
|
||||
"translations": [
|
||||
{
|
||||
"name": "Announcements",
|
||||
"description": "Offers, product and feature announcements",
|
||||
"locale": "en"
|
||||
}
|
||||
],
|
||||
"content_types": [
|
||||
"email"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"created_at": 1768023485
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_64f6393f-9f58-4129-a38b-e70a08931524",
|
||||
"topic": "granular.subscribe",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768023485,
|
||||
"created_at": 1768023484,
|
||||
"self": null
|
||||
}
|
||||
143
zerver/webhooks/intercom/fixtures/granular_unsubscribe.json
Normal file
143
zerver/webhooks/intercom/fixtures/granular_unsubscribe.json
Normal file
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "granular_unsubscribe",
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961cf78fb9d13be07871c78",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "22",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": "+1 555-123-4567",
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T04:03:04.963+00:00",
|
||||
"updated_at": "2026-01-10T05:38:55.859+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961cf78fb9d13be07871c78/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": true,
|
||||
"enabled_push_messaging": null
|
||||
},
|
||||
"subscription_types": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "subscription",
|
||||
"id": "1943066",
|
||||
"state": "live",
|
||||
"consent_type": "opt_in",
|
||||
"default_translation": {
|
||||
"name": "Announcements",
|
||||
"description": "Offers, product and feature announcements",
|
||||
"locale": "en"
|
||||
},
|
||||
"translations": [
|
||||
{
|
||||
"name": "Announcements",
|
||||
"description": "Offers, product and feature announcements",
|
||||
"locale": "en"
|
||||
}
|
||||
],
|
||||
"content_types": [
|
||||
"email"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"created_at": 1768023535
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_a3a150c7-585b-4141-9674-77331b5e047a",
|
||||
"topic": "granular.unsubscribe",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768023536,
|
||||
"created_at": 1768023535,
|
||||
"self": null
|
||||
}
|
||||
22
zerver/webhooks/intercom/fixtures/ping.json
Normal file
22
zerver/webhooks/intercom/fixtures/ping.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type":"notification_event",
|
||||
"app_id":"i6wc9ipe",
|
||||
"data":{
|
||||
"type":"notification_event_data",
|
||||
"item":{
|
||||
"type":"ping",
|
||||
"message":"This is a ping notification test message."
|
||||
}
|
||||
},
|
||||
"links":{
|
||||
|
||||
},
|
||||
"id":null,
|
||||
"topic":"ping",
|
||||
"delivery_status":null,
|
||||
"delivery_attempts":1,
|
||||
"delivered_at":0,
|
||||
"first_sent_at":1553288147,
|
||||
"created_at":1553288147,
|
||||
"self":null
|
||||
}
|
||||
270
zerver/webhooks/intercom/fixtures/ticket_admin_assigned.json
Normal file
270
zerver/webhooks/intercom/fixtures/ticket_admin_assigned.json
Normal file
@@ -0,0 +1,270 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114389,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 5
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_96c4d0fa-4084-46b0-9a52-bb5565c98060",
|
||||
"topic": "ticket.admin.assigned",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114390,
|
||||
"created_at": 1768114390,
|
||||
"self": null
|
||||
}
|
||||
349
zerver/webhooks/intercom/fixtures/ticket_admin_replied.json
Normal file
349
zerver/webhooks/intercom/fixtures/ticket_admin_replied.json
Normal file
@@ -0,0 +1,349 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114530,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403439476",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114432,
|
||||
"updated_at": 1768114432,
|
||||
"assigned_to": {
|
||||
"type": "team",
|
||||
"id": "9680998"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403461654",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">AD</p>",
|
||||
"created_at": 1768114494,
|
||||
"updated_at": 1768114494,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403467236",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114511,
|
||||
"updated_at": 1768114511,
|
||||
"assigned_to": {
|
||||
"type": "nobody_admin",
|
||||
"id": null
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403474386",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">mathew</p>",
|
||||
"created_at": 1768114530,
|
||||
"updated_at": 1768114530,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 9
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37403474386",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">mathew</p>",
|
||||
"created_at": 1768114530,
|
||||
"updated_at": 1768114530,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_4a953277-d6d9-45e7-ac5c-47bf8e8fe24b",
|
||||
"topic": "ticket.admin.replied",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114531,
|
||||
"created_at": 1768114531,
|
||||
"self": null
|
||||
}
|
||||
400
zerver/webhooks/intercom/fixtures/ticket_attribute_updated.json
Normal file
400
zerver/webhooks/intercom/fixtures/ticket_attribute_updated.json
Normal file
@@ -0,0 +1,400 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": "rewg",
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114679,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403439476",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114432,
|
||||
"updated_at": 1768114432,
|
||||
"assigned_to": {
|
||||
"type": "team",
|
||||
"id": "9680998"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403461654",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">AD</p>",
|
||||
"created_at": 1768114494,
|
||||
"updated_at": 1768114494,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403467236",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114511,
|
||||
"updated_at": 1768114511,
|
||||
"assigned_to": {
|
||||
"type": "nobody_admin",
|
||||
"id": null
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403474386",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">mathew</p>",
|
||||
"created_at": 1768114530,
|
||||
"updated_at": 1768114530,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403497489",
|
||||
"part_type": "title_changed",
|
||||
"created_at": 1768114596,
|
||||
"updated_at": 1768114596,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403526220",
|
||||
"part_type": "ticket_attribute_updated_by_admin",
|
||||
"created_at": 1768114679,
|
||||
"updated_at": 1768114679,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false,
|
||||
"updated_attribute_data": {
|
||||
"attribute": {
|
||||
"type": "attribute",
|
||||
"id": "8514185",
|
||||
"label": "Platforms"
|
||||
},
|
||||
"value": {
|
||||
"type": "value",
|
||||
"id": "rewg",
|
||||
"label": "rewg",
|
||||
"previous": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"total_count": 11
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37403526220",
|
||||
"part_type": "ticket_attribute_updated_by_admin",
|
||||
"created_at": 1768114679,
|
||||
"updated_at": 1768114679,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false,
|
||||
"updated_attribute_data": {
|
||||
"attribute": {
|
||||
"type": "attribute",
|
||||
"id": "8514185",
|
||||
"label": "Platforms"
|
||||
},
|
||||
"value": {
|
||||
"type": "value",
|
||||
"id": "rewg",
|
||||
"label": "rewg",
|
||||
"previous": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_6be9baac-fd68-49c2-8f41-28d7f7deb994",
|
||||
"topic": "ticket.attribute.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114680,
|
||||
"created_at": 1768114679,
|
||||
"self": null
|
||||
}
|
||||
402
zerver/webhooks/intercom/fixtures/ticket_closed.json
Normal file
402
zerver/webhooks/intercom/fixtures/ticket_closed.json
Normal file
@@ -0,0 +1,402 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": "rewg",
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517896",
|
||||
"category": "resolved",
|
||||
"internal_label": "Resolved",
|
||||
"external_label": "Resolved"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"role": "lead"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768117266,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403439476",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114432,
|
||||
"updated_at": 1768114432,
|
||||
"assigned_to": {
|
||||
"type": "team",
|
||||
"id": "9680998"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403461654",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">AD</p>",
|
||||
"created_at": 1768114494,
|
||||
"updated_at": 1768114494,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403467236",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114511,
|
||||
"updated_at": 1768114511,
|
||||
"assigned_to": {
|
||||
"type": "nobody_admin",
|
||||
"id": null
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403474386",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">mathew</p>",
|
||||
"created_at": 1768114530,
|
||||
"updated_at": 1768114530,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403497489",
|
||||
"part_type": "title_changed",
|
||||
"created_at": 1768114596,
|
||||
"updated_at": 1768114596,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403526220",
|
||||
"part_type": "ticket_attribute_updated_by_admin",
|
||||
"created_at": 1768114679,
|
||||
"updated_at": 1768114679,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false,
|
||||
"updated_attribute_data": {
|
||||
"attribute": {
|
||||
"type": "attribute",
|
||||
"id": "8514185",
|
||||
"label": "Platforms"
|
||||
},
|
||||
"value": {
|
||||
"type": "value",
|
||||
"id": "rewg",
|
||||
"label": "rewg",
|
||||
"previous": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404498124",
|
||||
"part_type": "close",
|
||||
"created_at": 1768117266,
|
||||
"updated_at": 1768117266,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404498160",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "resolved",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768117266,
|
||||
"updated_at": 1768117266,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 13
|
||||
},
|
||||
"open": false,
|
||||
"snoozed_until": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"company_id": null,
|
||||
"channel": "messenger"
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_aedb66d9-7147-43ee-8b75-fe3ee2108b11",
|
||||
"topic": "ticket.closed",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768117267,
|
||||
"created_at": 1768117267,
|
||||
"self": null
|
||||
}
|
||||
284
zerver/webhooks/intercom/fixtures/ticket_conatct_replied.json
Normal file
284
zerver/webhooks/intercom/fixtures/ticket_conatct_replied.json
Normal file
@@ -0,0 +1,284 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629548109",
|
||||
"ticket_id": "66044663",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear customer message received",
|
||||
"_default_description_": "Customer sent an unclear message 'wetewt' and was informed that replies will be sent here and via email at admin@example.com.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696354ce6b48146fdc536f97",
|
||||
"external_id": "247c49f1-c79e-452d-8afe-b1d38cc0f38a"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768117469,
|
||||
"updated_at": 1768117506,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404577940",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768117469,
|
||||
"updated_at": 1768117469,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404578339",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768117470,
|
||||
"updated_at": 1768117470,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404579123",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768117473,
|
||||
"updated_at": 1768117473,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404587721",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768117498,
|
||||
"updated_at": 1768117498,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404589020",
|
||||
"part_type": "assignment",
|
||||
"body": "<p class=\"no-margin\">sfwa</p>",
|
||||
"created_at": 1768117501,
|
||||
"updated_at": 1768117501,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404590647",
|
||||
"part_type": "comment",
|
||||
"body": "<p>asfsf</p>",
|
||||
"created_at": 1768117506,
|
||||
"updated_at": 1768117506,
|
||||
"author": {
|
||||
"id": "696354ce6b48146fdc536f97",
|
||||
"type": "user",
|
||||
"name": null,
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 6
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37404590647",
|
||||
"part_type": "comment",
|
||||
"body": "<p>asfsf</p>",
|
||||
"created_at": 1768117506,
|
||||
"updated_at": 1768117506,
|
||||
"author": {
|
||||
"id": "696354ce6b48146fdc536f97",
|
||||
"type": "user",
|
||||
"name": null,
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_9d2bc71d-ac2f-4f2d-9a3c-f4213dd933aa",
|
||||
"topic": "ticket.contact.replied",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768117507,
|
||||
"created_at": 1768117507,
|
||||
"self": null
|
||||
}
|
||||
145
zerver/webhooks/intercom/fixtures/ticket_contact_attached.json
Normal file
145
zerver/webhooks/intercom/fixtures/ticket_contact_attached.json
Normal file
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": 215472629353977,
|
||||
"url": "https://app.intercom.com/a/apps/abc123def/conversations/215472629353977",
|
||||
"custom_attributes": {
|
||||
"_default_title_": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"_default_description_": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"Platforms": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"Root cause": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": "submitted",
|
||||
"ticket_type": "Tickets",
|
||||
"ticket_type_description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"ticket_type_emoji": "🎟",
|
||||
"ticket_custom_state_admin_label": "Submitted",
|
||||
"ticket_custom_state_user_label": "Submitted"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961e7651f6dbc22dfe148cb",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "23",
|
||||
"role": "user",
|
||||
"email": "user@example.com",
|
||||
"phone": null,
|
||||
"formatted_phone": null,
|
||||
"name": "Sample User",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T05:45:09.945+00:00",
|
||||
"updated_at": "2026-01-10T05:45:09.943+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": null,
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e7651f6dbc22dfe148cb/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e7651f6dbc22dfe148cb/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e7651f6dbc22dfe148cb/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e7651f6dbc22dfe148cb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961e7651f6dbc22dfe148cb/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_b7c34885-5797-4468-b8f8-9fff786bbb7e",
|
||||
"topic": "ticket.contact.attached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768117724,
|
||||
"created_at": 1768117724,
|
||||
"self": null
|
||||
}
|
||||
145
zerver/webhooks/intercom/fixtures/ticket_contact_detached.json
Normal file
145
zerver/webhooks/intercom/fixtures/ticket_contact_detached.json
Normal file
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": 215472629353977,
|
||||
"url": "https://app.intercom.com/a/apps/abc123def/conversations/215472629353977",
|
||||
"custom_attributes": {
|
||||
"_default_title_": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"_default_description_": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"Platforms": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
},
|
||||
"Root cause": {
|
||||
"value": null,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": "submitted",
|
||||
"ticket_type": "Tickets",
|
||||
"ticket_type_description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"ticket_type_emoji": "🎟",
|
||||
"ticket_custom_state_admin_label": "Submitted",
|
||||
"ticket_custom_state_user_label": "Submitted"
|
||||
},
|
||||
"contact": {
|
||||
"type": "contact",
|
||||
"id": "6961f75992dc9c41aeee94c6",
|
||||
"workspace_id": "abc123def",
|
||||
"external_id": "100",
|
||||
"role": "user",
|
||||
"email": "lead_signup_fixture_ui@example.com",
|
||||
"phone": null,
|
||||
"formatted_phone": null,
|
||||
"name": "leadu",
|
||||
"avatar": null,
|
||||
"owner_id": null,
|
||||
"social_profiles": {
|
||||
"type": "list",
|
||||
"data": []
|
||||
},
|
||||
"has_hard_bounced": false,
|
||||
"marked_email_as_spam": false,
|
||||
"unsubscribed_from_emails": false,
|
||||
"created_at": "2026-01-10T06:53:13.684+00:00",
|
||||
"updated_at": "2026-01-11T07:48:44.707+00:00",
|
||||
"signed_up_at": null,
|
||||
"last_seen_at": null,
|
||||
"last_replied_at": null,
|
||||
"last_contacted_at": "2026-01-11T07:48:44.000+00:00",
|
||||
"last_email_opened_at": null,
|
||||
"last_email_clicked_at": null,
|
||||
"language_override": null,
|
||||
"browser": null,
|
||||
"browser_version": null,
|
||||
"browser_language": null,
|
||||
"os": null,
|
||||
"location": {
|
||||
"type": "location",
|
||||
"country": null,
|
||||
"region": null,
|
||||
"city": null,
|
||||
"country_code": null,
|
||||
"continent_code": null
|
||||
},
|
||||
"android_app_name": null,
|
||||
"android_app_version": null,
|
||||
"android_device": null,
|
||||
"android_os_version": null,
|
||||
"android_sdk_version": null,
|
||||
"android_last_seen_at": null,
|
||||
"ios_app_name": null,
|
||||
"ios_app_version": null,
|
||||
"ios_device": null,
|
||||
"ios_os_version": null,
|
||||
"ios_sdk_version": null,
|
||||
"ios_last_seen_at": null,
|
||||
"custom_attributes": {},
|
||||
"tags": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f75992dc9c41aeee94c6/tags",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"notes": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f75992dc9c41aeee94c6/notes",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"companies": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f75992dc9c41aeee94c6/companies",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_out_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f75992dc9c41aeee94c6/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"opted_in_subscription_types": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"url": "/contacts/6961f75992dc9c41aeee94c6/subscriptions",
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"referrer": null,
|
||||
"sms_consent": false,
|
||||
"unsubscribed_from_sms": false,
|
||||
"enabled_push_messaging": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_bce453db-05b4-4d76-b58b-a2e72362711f",
|
||||
"topic": "ticket.contact.detached",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768117767,
|
||||
"created_at": 1768117767,
|
||||
"self": null
|
||||
}
|
||||
231
zerver/webhooks/intercom/fixtures/ticket_created.json
Normal file
231
zerver/webhooks/intercom/fixtures/ticket_created.json
Normal file
@@ -0,0 +1,231 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "0",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114250,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 4
|
||||
},
|
||||
"open": true,
|
||||
"snoozed_until": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"company_id": null,
|
||||
"channel": "messenger"
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_381b4609-2b35-4720-8389-605f220e402a",
|
||||
"topic": "ticket.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114251,
|
||||
"created_at": 1768114251,
|
||||
"self": null
|
||||
}
|
||||
253
zerver/webhooks/intercom/fixtures/ticket_note_created.json
Normal file
253
zerver/webhooks/intercom/fixtures/ticket_note_created.json
Normal file
@@ -0,0 +1,253 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629353977",
|
||||
"ticket_id": "66040991",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": null,
|
||||
"_default_description_": null,
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "6961f75992dc9c41aeee94c6",
|
||||
"external_id": "100"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "9608799",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768114809,
|
||||
"updated_at": 1768117318,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403575650",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114810,
|
||||
"updated_at": 1768114810,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403575955",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114810,
|
||||
"updated_at": 1768114810,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403591177",
|
||||
"part_type": "comment",
|
||||
"body": "<p class=\"no-margin\">hgjvjh</p>",
|
||||
"created_at": 1768114835,
|
||||
"updated_at": 1768114835,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37404518759",
|
||||
"part_type": "note",
|
||||
"body": "<p class=\"no-margin\">agd</p>",
|
||||
"created_at": 1768117318,
|
||||
"updated_at": 1768117318,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 4
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37404518759",
|
||||
"part_type": "note",
|
||||
"body": "<p class=\"no-margin\">agd</p>",
|
||||
"created_at": 1768117318,
|
||||
"updated_at": 1768117318,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_83b0ce3c-7c9c-4125-911d-16679ad38f1e",
|
||||
"topic": "ticket.note.created",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768117319,
|
||||
"created_at": 1768117319,
|
||||
"self": null
|
||||
}
|
||||
231
zerver/webhooks/intercom/fixtures/ticket_state_updated.json
Normal file
231
zerver/webhooks/intercom/fixtures/ticket_state_updated.json
Normal file
@@ -0,0 +1,231 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "0",
|
||||
"team_assignee_id": "0",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114250,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 4
|
||||
},
|
||||
"open": true,
|
||||
"snoozed_until": null,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"company_id": null,
|
||||
"channel": "messenger"
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_ee8078c0-9021-4db6-bb63-b883579849ce",
|
||||
"topic": "ticket.state.updated",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114251,
|
||||
"created_at": 1768114250,
|
||||
"self": null
|
||||
}
|
||||
289
zerver/webhooks/intercom/fixtures/ticket_team_assigned.json
Normal file
289
zerver/webhooks/intercom/fixtures/ticket_team_assigned.json
Normal file
@@ -0,0 +1,289 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "ticket_ticket_part",
|
||||
"ticket": {
|
||||
"type": "ticket",
|
||||
"id": "215472629311235",
|
||||
"ticket_id": "66040342",
|
||||
"ticket_attributes": {
|
||||
"_default_title_": "Unclear user message 'erf' with pending email response",
|
||||
"_default_description_": "User sent an unclear message 'erf' and was informed that replies will be sent here and to admin@example.com; awaiting further clarification or response.",
|
||||
"Platforms": null,
|
||||
"Root cause": null
|
||||
},
|
||||
"ticket_state": {
|
||||
"type": "ticket_state",
|
||||
"id": "4517893",
|
||||
"category": "submitted",
|
||||
"internal_label": "Submitted",
|
||||
"external_label": "Submitted"
|
||||
},
|
||||
"ticket_type": {
|
||||
"type": "ticket_type",
|
||||
"id": "2979330",
|
||||
"name": "Tickets",
|
||||
"description": "When a customer query can’t be instantly resolved, convert to support request ticket to ensure the right details are captured and allow customers to keep track of progress.",
|
||||
"icon": "🎟",
|
||||
"workspace_id": "abc123def",
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651,
|
||||
"is_internal": false,
|
||||
"ticket_type_attributes": {
|
||||
"type": "list",
|
||||
"data": [
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514183",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_title_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 0,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514184",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "_default_description_",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": true
|
||||
},
|
||||
"order": 1,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": true,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514185",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Platforms",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 2,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
},
|
||||
{
|
||||
"type": "ticket_type_attribute",
|
||||
"id": "8514186",
|
||||
"workspace_id": "abc123def",
|
||||
"name": "Root cause",
|
||||
"description": "",
|
||||
"data_type": "string",
|
||||
"input_options": {
|
||||
"multiline": false
|
||||
},
|
||||
"order": 3,
|
||||
"required_to_create": false,
|
||||
"required_to_create_for_contacts": false,
|
||||
"visible_on_create": true,
|
||||
"visible_to_contacts": true,
|
||||
"default": false,
|
||||
"ticket_type_id": 2979330,
|
||||
"archived": false,
|
||||
"created_at": 1767066651,
|
||||
"updated_at": 1767066651
|
||||
}
|
||||
]
|
||||
},
|
||||
"category": "Customer"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "contact.list",
|
||||
"contacts": [
|
||||
{
|
||||
"type": "contact",
|
||||
"id": "696346bbaebb5a479d3851a3",
|
||||
"external_id": "f7c0bc1e-5ee2-46a0-b11a-ea473d1101a5"
|
||||
}
|
||||
]
|
||||
},
|
||||
"admin_assignee_id": "0",
|
||||
"team_assignee_id": "9680998",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768114432,
|
||||
"ticket_parts": {
|
||||
"type": "ticket_part.list",
|
||||
"ticket_parts": [
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241257",
|
||||
"part_type": "attribute_collected",
|
||||
"created_at": 1768113868,
|
||||
"updated_at": 1768113868,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403241627",
|
||||
"part_type": "language_detection_details",
|
||||
"created_at": 1768113869,
|
||||
"updated_at": 1768113869,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403242516",
|
||||
"part_type": "channel_and_reply_time_expectation",
|
||||
"body": "<p>You’ll get replies here and in your email:<br>✉️ <b>admin@example.com</b></p>\n<p>The team will reply as soon as they can.</p>",
|
||||
"created_at": 1768113872,
|
||||
"updated_at": 1768113872,
|
||||
"author": {
|
||||
"id": "9608808",
|
||||
"type": "bot",
|
||||
"name": "Fin",
|
||||
"email": "operator+abc123def@intercom.io"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403374462",
|
||||
"part_type": "ticket_state_updated_by_admin",
|
||||
"ticket_state": "submitted",
|
||||
"previous_ticket_state": "submitted",
|
||||
"created_at": 1768114250,
|
||||
"updated_at": 1768114250,
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403424009",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114389,
|
||||
"updated_at": 1768114389,
|
||||
"assigned_to": {
|
||||
"type": "admin",
|
||||
"id": "9608799"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
},
|
||||
{
|
||||
"type": "ticket_part",
|
||||
"id": "37403439476",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114432,
|
||||
"updated_at": 1768114432,
|
||||
"assigned_to": {
|
||||
"type": "team",
|
||||
"id": "9680998"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
],
|
||||
"total_count": 6
|
||||
},
|
||||
"open": true,
|
||||
"linked_objects": {
|
||||
"type": "list",
|
||||
"data": [],
|
||||
"total_count": 0,
|
||||
"has_more": false
|
||||
},
|
||||
"category": "Customer",
|
||||
"is_shared": true,
|
||||
"channel": "messenger"
|
||||
},
|
||||
"ticket_part": {
|
||||
"type": "ticket_part",
|
||||
"id": "37403439476",
|
||||
"part_type": "assignment",
|
||||
"created_at": 1768114432,
|
||||
"updated_at": 1768114432,
|
||||
"assigned_to": {
|
||||
"type": "team",
|
||||
"id": "9680998"
|
||||
},
|
||||
"author": {
|
||||
"id": "9608799",
|
||||
"type": "admin",
|
||||
"name": "John Doe",
|
||||
"email": "admin@example.com"
|
||||
},
|
||||
"attachments": [],
|
||||
"redacted": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_a8efed29-f320-487a-860a-039843aec89e",
|
||||
"topic": "ticket.team.assigned",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768114433,
|
||||
"created_at": 1768114433,
|
||||
"self": null
|
||||
}
|
||||
79
zerver/webhooks/intercom/fixtures/visitor_signed_up.json
Normal file
79
zerver/webhooks/intercom/fixtures/visitor_signed_up.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"type": "notification_event",
|
||||
"app_id": "abc123def",
|
||||
"data": {
|
||||
"type": "notification_event_data",
|
||||
"item": {
|
||||
"type": "user",
|
||||
"id": "6961e6de046e053d93e4da0b",
|
||||
"user_id": "fixture-user-1",
|
||||
"anonymous": false,
|
||||
"email": "fixture_user_1@example.com",
|
||||
"phone": null,
|
||||
"name": "Fixture User 1",
|
||||
"pseudonym": "Pink Lightbulb from Bengaluru",
|
||||
"avatar": {
|
||||
"type": "avatar",
|
||||
"image_url": null
|
||||
},
|
||||
"app_id": "abc123def",
|
||||
"companies": {
|
||||
"type": "company.list",
|
||||
"companies": []
|
||||
},
|
||||
"location_data": {
|
||||
"type": "location_data",
|
||||
"city_name": "Bengaluru",
|
||||
"continent_code": "AS",
|
||||
"country_name": "India",
|
||||
"postal_code": "562130",
|
||||
"region_name": "Karnataka",
|
||||
"timezone": "Asia/Kolkata",
|
||||
"country_code": "IND",
|
||||
"latitude": null,
|
||||
"longitude": null
|
||||
},
|
||||
"last_request_at": "2026-01-10T05:42:57.457+00:00",
|
||||
"created_at": "2026-01-10T05:42:55.079+00:00",
|
||||
"remote_created_at": "2026-01-10T05:42:57.490+00:00",
|
||||
"signed_up_at": "2026-01-10T05:42:57.490+00:00",
|
||||
"updated_at": "2026-01-10T05:42:57.000Z",
|
||||
"session_count": 1,
|
||||
"social_profiles": {
|
||||
"type": "social_profile.list",
|
||||
"social_profiles": []
|
||||
},
|
||||
"owner_id": null,
|
||||
"unsubscribed_from_emails": false,
|
||||
"marked_email_as_spam": false,
|
||||
"has_hard_bounced": false,
|
||||
"tags": {
|
||||
"type": "tag.list",
|
||||
"tags": []
|
||||
},
|
||||
"segments": {
|
||||
"type": "segment.list",
|
||||
"segments": []
|
||||
},
|
||||
"custom_attributes": {},
|
||||
"referrer": "http://localhost:5500/",
|
||||
"utm_campaign": null,
|
||||
"utm_content": null,
|
||||
"utm_medium": null,
|
||||
"utm_source": null,
|
||||
"utm_term": null,
|
||||
"do_not_track": null,
|
||||
"last_seen_ip": null,
|
||||
"user_agent_data": null
|
||||
}
|
||||
},
|
||||
"links": {},
|
||||
"id": "notif_36beafa3-1a76-43cd-a971-0e39c2f487bd",
|
||||
"topic": "visitor.signed_up",
|
||||
"delivery_status": "pending",
|
||||
"delivery_attempts": 1,
|
||||
"delivered_at": 0,
|
||||
"first_sent_at": 1768023785,
|
||||
"created_at": 1768023777,
|
||||
"self": null
|
||||
}
|
||||
74
zerver/webhooks/intercom/tests.py
Normal file
74
zerver/webhooks/intercom/tests.py
Normal file
@@ -0,0 +1,74 @@
|
||||
import orjson
|
||||
|
||||
from zerver.lib.test_classes import WebhookTestCase
|
||||
from zerver.webhooks.fixtureless_integrations import BO_NAME
|
||||
|
||||
|
||||
class IntercomWebHookTests(WebhookTestCase):
|
||||
def test_ping(self) -> None:
|
||||
expected_topic_name = "Intercom"
|
||||
expected_message = "Intercom webhook has been successfully configured."
|
||||
self.check_webhook("ping", expected_topic_name, expected_message)
|
||||
|
||||
def test_admin_activity_log_event_created(self) -> None:
|
||||
expected_topic_name = "Admin activity log"
|
||||
expected_message = f"{BO_NAME} disabled the AI inbox translation settings."
|
||||
self.check_webhook(
|
||||
"admin_activity_log_event_created", expected_topic_name, expected_message
|
||||
)
|
||||
|
||||
def test_admin_added_to_workspace(self) -> None:
|
||||
expected_topic_name = f"Admin: {BO_NAME}"
|
||||
expected_message = f"{BO_NAME} is now an admin."
|
||||
self.check_webhook("admin_added_to_workspace", expected_topic_name, expected_message)
|
||||
|
||||
def test_admin_away_mode_enabled(self) -> None:
|
||||
expected_topic_name = f"Admin: {BO_NAME}"
|
||||
expected_message = f"{BO_NAME} is away."
|
||||
self.check_webhook("admin_away_mode_updated", expected_topic_name, expected_message)
|
||||
|
||||
payload = orjson.loads(self.webhook_fixture_data("intercom", "admin_away_mode_updated"))
|
||||
payload["data"]["item"]["away_status_reason"] = "😜 On a vacation"
|
||||
self.subscribe(self.test_user, self.channel_name)
|
||||
msg = self.send_webhook_payload(
|
||||
self.test_user,
|
||||
self.url,
|
||||
orjson.dumps(payload).decode(),
|
||||
content_type="application/json",
|
||||
)
|
||||
self.assert_channel_message(
|
||||
message=msg,
|
||||
channel_name=self.channel_name,
|
||||
topic_name=expected_topic_name,
|
||||
content=f"{BO_NAME} is away (😜 On a vacation).",
|
||||
)
|
||||
|
||||
def test_admin_away_mode_disabled(self) -> None:
|
||||
self.subscribe(self.test_user, self.channel_name)
|
||||
payload = self.webhook_fixture_data(self.webhook_dir_name, "admin_away_mode_updated")
|
||||
data = orjson.loads(payload)
|
||||
data["data"]["item"]["away_mode_enabled"] = False
|
||||
msg = self.send_webhook_payload(
|
||||
self.test_user, self.url, orjson.dumps(data).decode(), content_type="application/json"
|
||||
)
|
||||
self.assert_channel_message(
|
||||
message=msg,
|
||||
channel_name=self.channel_name,
|
||||
topic_name=f"Admin: {BO_NAME}",
|
||||
content=f"{BO_NAME} is now available.",
|
||||
)
|
||||
|
||||
def test_admin_logged_in(self) -> None:
|
||||
expected_topic_name = f"Admin: {BO_NAME}"
|
||||
expected_message = f"{BO_NAME} logged in."
|
||||
self.check_webhook("admin_logged_in", expected_topic_name, expected_message)
|
||||
|
||||
def test_admin_logged_out(self) -> None:
|
||||
expected_topic_name = f"Admin: {BO_NAME}"
|
||||
expected_message = f"{BO_NAME} logged out."
|
||||
self.check_webhook("admin_logged_out", expected_topic_name, expected_message)
|
||||
|
||||
def test_admin_removed_from_workspace(self) -> None:
|
||||
expected_topic_name = f"Admin: {BO_NAME}"
|
||||
expected_message = f"{BO_NAME} is no longer an admin."
|
||||
self.check_webhook("admin_removed_from_workspace", expected_topic_name, expected_message)
|
||||
132
zerver/webhooks/intercom/view.py
Normal file
132
zerver/webhooks/intercom/view.py
Normal file
@@ -0,0 +1,132 @@
|
||||
from collections.abc import Callable
|
||||
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from zerver.decorator import return_success_on_head_request, webhook_view
|
||||
from zerver.lib.exceptions import UnsupportedWebhookEventTypeError
|
||||
from zerver.lib.partial import partial
|
||||
from zerver.lib.response import json_success
|
||||
from zerver.lib.typed_endpoint import JsonBodyPayload, typed_endpoint
|
||||
from zerver.lib.validator import WildValue, check_bool, check_string
|
||||
from zerver.lib.webhooks.common import check_send_webhook_message, get_setup_webhook_message
|
||||
from zerver.models import UserProfile
|
||||
|
||||
ADMIN_ROLE_UPDATED_TEMPLATE = "{name} is {phrase} an admin."
|
||||
|
||||
ADMIN_AWAY_MODE_UPDATED_TEMPLATE = "{name} is {away_status}{reason}."
|
||||
|
||||
ADMIN_LOGIN_LOGOUT_TEMPLATE = "{name} {phrase}."
|
||||
|
||||
|
||||
def get_admin_name(payload: WildValue) -> str:
|
||||
return payload["data"]["item"]["name"].tame(check_string)
|
||||
|
||||
|
||||
def get_topic_name(event_category: str, payload: WildValue) -> str:
|
||||
match event_category:
|
||||
case "ping":
|
||||
return "Intercom"
|
||||
case "admin":
|
||||
if payload["topic"].tame(check_string) == "admin.activity_log_event.created":
|
||||
return "Admin activity log"
|
||||
return f"Admin: {get_admin_name(payload)}"
|
||||
case _: # nocoverage
|
||||
raise UnsupportedWebhookEventTypeError(payload["topic"].tame(check_string))
|
||||
|
||||
|
||||
def get_ping_message(payload: WildValue) -> str:
|
||||
return get_setup_webhook_message("Intercom")
|
||||
|
||||
|
||||
def get_admin_activity_log_event_created_message(payload: WildValue) -> str:
|
||||
return payload["data"]["item"]["activity_description"].tame(check_string)
|
||||
|
||||
|
||||
def get_admin_role_updated_message(phrase: str, payload: WildValue) -> str:
|
||||
return ADMIN_ROLE_UPDATED_TEMPLATE.format(name=get_admin_name(payload), phrase=phrase)
|
||||
|
||||
|
||||
def get_admin_login_logout_message(phrase: str, payload: WildValue) -> str:
|
||||
return ADMIN_LOGIN_LOGOUT_TEMPLATE.format(name=get_admin_name(payload), phrase=phrase)
|
||||
|
||||
|
||||
def get_admin_away_mode_updated_message(payload: WildValue) -> str:
|
||||
admin_name = get_admin_name(payload)
|
||||
away_mode_enabled = payload["data"]["item"]["away_mode_enabled"].tame(check_bool)
|
||||
|
||||
if away_mode_enabled:
|
||||
away_status = "away"
|
||||
reason_value = payload["data"]["item"]["away_status_reason"].tame(check_string)
|
||||
|
||||
# Strip trailing period if exists,
|
||||
# since reason will be wrapped inside parentheses.
|
||||
reason_value = reason_value.removesuffix(".")
|
||||
reason = f" ({reason_value})" if reason_value else ""
|
||||
else:
|
||||
away_status = "now available"
|
||||
reason = ""
|
||||
|
||||
return ADMIN_AWAY_MODE_UPDATED_TEMPLATE.format(
|
||||
name=admin_name, away_status=away_status, reason=reason
|
||||
)
|
||||
|
||||
|
||||
IGNORED_EVENTS = [
|
||||
# Require purchasing an Intercom number.
|
||||
*["call"],
|
||||
# Might be restricted for trial accounts.
|
||||
# Only content_stat.banners was attempted, and it was restricted.
|
||||
*["content_stat"],
|
||||
# Can only be invoked by SMS from registered US or Canadian numbers.
|
||||
*[
|
||||
"contact.lead.signed_up",
|
||||
"contact.unsubscribed_from_sms",
|
||||
],
|
||||
# Unable to invoke these events, likely restricted for trial accounts.
|
||||
*[
|
||||
"conversation.rating.added",
|
||||
"ticket.rating.provided",
|
||||
"data_connector.execution.completed",
|
||||
"job.completed",
|
||||
"messenger.deployment_completed.event.created",
|
||||
],
|
||||
]
|
||||
|
||||
|
||||
EVENT_TO_FUNCTION_MAPPER: dict[str, Callable[[WildValue], str]] = {
|
||||
"ping": get_ping_message,
|
||||
"admin.activity_log_event.created": get_admin_activity_log_event_created_message,
|
||||
"admin.away_mode_updated": get_admin_away_mode_updated_message,
|
||||
"admin.added_to_workspace": partial(get_admin_role_updated_message, "now"),
|
||||
"admin.removed_from_workspace": partial(get_admin_role_updated_message, "no longer"),
|
||||
"admin.logged_in": partial(get_admin_login_logout_message, "logged in"),
|
||||
"admin.logged_out": partial(get_admin_login_logout_message, "logged out"),
|
||||
}
|
||||
|
||||
ALL_EVENT_TYPES = list(EVENT_TO_FUNCTION_MAPPER.keys())
|
||||
|
||||
|
||||
@webhook_view("Intercom", all_event_types=ALL_EVENT_TYPES)
|
||||
# Intercom sends a HEAD request to validate the webhook URL. In this case, we just assume success.
|
||||
@return_success_on_head_request
|
||||
@typed_endpoint
|
||||
def api_intercom_webhook(
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
*,
|
||||
payload: JsonBodyPayload[WildValue],
|
||||
) -> HttpResponse:
|
||||
event_type = payload["topic"].tame(check_string)
|
||||
# event_type is of the form "{event_category}.{event}".
|
||||
event_category = event_type.split(".", 1)[0]
|
||||
if event_type in IGNORED_EVENTS or event_category in IGNORED_EVENTS:
|
||||
return json_success(request) # nocoverage
|
||||
|
||||
handler = EVENT_TO_FUNCTION_MAPPER.get(event_type)
|
||||
if handler is None:
|
||||
raise UnsupportedWebhookEventTypeError(event_type)
|
||||
body = handler(payload)
|
||||
topic_name = get_topic_name(event_category, payload)
|
||||
|
||||
check_send_webhook_message(request, user_profile, topic_name, body, event_type)
|
||||
return json_success(request)
|
||||
Reference in New Issue
Block a user