Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/intercom: Add webhook fixtures for company events.
sathwikshetty3317b6298da373
diff --git a/zerver/webhooks/intercom/fixtures/company_contact_attached.json b/zerver/webhooks/intercom/fixtures/company_contact_attached.jsonnew file mode 100644index 00000000000..af8e506bbc1--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/company_contact_attached.json@@ -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": "[email protected]",+ "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+}diff --git a/zerver/webhooks/intercom/fixtures/company_contact_detached.json b/zerver/webhooks/intercom/fixtures/company_contact_detached.jsonnew file mode 100644index 00000000000..daba00f0d34--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/company_contact_detached.json@@ -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": "[email protected]",+ "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+}diff --git a/zerver/webhooks/intercom/fixtures/company_created.json b/zerver/webhooks/intercom/fixtures/company_created.jsonnew file mode 100644index 00000000000..5765df66912--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/company_created.json@@ -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+}diff --git a/zerver/webhooks/intercom/fixtures/company_deleted.json b/zerver/webhooks/intercom/fixtures/company_deleted.jsonnew file mode 100644index 00000000000..4c3c11b71bb--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/company_deleted.json@@ -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+}diff --git a/zerver/webhooks/intercom/fixtures/company_updated.json b/zerver/webhooks/intercom/fixtures/company_updated.jsonnew file mode 100644index 00000000000..2aeb1149c96--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/company_updated.json@@ -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+}