Skip to content

Commit

Permalink
🎉 Source Zendesk Chat: update SAT to high strictness (#21011)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov authored Jan 4, 2023
1 parent 966c13f commit e42ac74
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
connector_image: airbyte/source-zendesk-chat:dev
tests:
test_strictness_level: high
acceptance_tests:
spec:
- spec_path: "source_zendesk_chat/spec.json"
tests:
- spec_path: "source_zendesk_chat/spec.json"
connection:
- config_path: "secrets/config_old.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "secrets/config_oauth.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config_old.json"
status: "succeed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "secrets/config_oauth.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config_old.json"
- config_path: "secrets/config.json"
- config_path: "secrets/config_oauth.json"
tests:
- config_path: "secrets/config_old.json"
- config_path: "secrets/config.json"
- config_path: "secrets/config_oauth.json"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
- config_path: "secrets/config_oauth.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config.json"
expect_records:
path: "integration_tests/expected_records.txt"
- config_path: "secrets/config_oauth.json"
expect_records:
path: "integration_tests/expected_records.txt"
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
# Unable to use 'future_state_path' because Zendesk Chat API returns an error when specifying a date in the future.
# future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
agents: [ "id" ]
bans: [ "id" ]
agent_timeline: [ "start_time" ]
chats: [ "update_timestamp" ]
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state:
bypass_reason: "Unable to use 'future_state_path' because Zendesk Chat API returns an error when specifying a date in the future."
cursor_paths:
agents: [ "id" ]
bans: [ "id" ]
agent_timeline: [ "start_time" ]
chats: [ "update_timestamp" ]
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{"stream": "accounts", "data": {"create_date": "2020-12-11T18:33:40Z", "status": "active", "account_key": "svBRNv6HoJnSZRgpf6yMmBZaFMY6s2hP", "plan": {"goals": 5, "long_desc": "Best for Organizations to manage Large Support Teams", "price": 70.0, "short_desc": "Ideal for Large Support Teams", "widget_customization": "full", "max_agents": 5, "sla": true, "monitoring": true, "rest_api": true, "email_reports": true, "daily_reports": true, "chat_reports": true, "agent_reports": true, "agent_leaderboard": true, "unbranding": true, "high_load": true, "ip_restriction": true, "support": true, "name": "enterprise", "max_basic_triggers": "unlimited", "max_advanced_triggers": "unlimited", "max_departments": "unlimited", "max_concurrent_chats": "unlimited", "max_history_search_days": "unlimited", "operating_hours": true, "file_upload": true, "analytics": true, "integrations": true}}, "emitted_at": 1672828432816}
{"stream": "agent_timeline", "data": {"agent_id": 360786799676, "engagement_count": 0, "start_time": "2022-01-17T13:20:50Z", "status": "invisible", "duration": 789.733983, "id": "360786799676|2022-01-17T13:20:50Z"}, "emitted_at": 1672828433249}
{"stream": "agent_timeline", "data": {"agent_id": 360786799676, "engagement_count": 0, "start_time": "2022-06-30T17:16:55Z", "status": "invisible", "duration": 61.089883, "id": "360786799676|2022-06-30T17:16:55Z"}, "emitted_at": 1672828433249}
{"stream": "agent_timeline", "data": {"agent_id": 360786799676, "engagement_count": 0, "start_time": "2022-10-28T12:43:05Z", "status": "invisible", "duration": 370.793077, "id": "360786799676|2022-10-28T12:43:05Z"}, "emitted_at": 1672828433249}
{"stream": "agents", "data": {"first_name": "Fake User number - 1", "create_date": "2021-04-23T14:33:11Z", "enabled_departments": [2148322881], "last_name": "", "role_id": 360002848976, "id": 361084605116, "departments": [2148322881], "display_name": "Fake User number - 1", "enabled": true, "skills": [1300601], "email": "fake.user-1@email.com", "last_login": null, "login_count": 0, "roles": {"administrator": false, "owner": false}}, "emitted_at": 1672828433502}
{"stream": "agents", "data": {"first_name": "Fake Agent number - 1", "create_date": "2021-04-23T14:34:20Z", "enabled_departments": [2148322881], "last_name": "", "role_id": 360002848976, "id": 361089721035, "departments": [2148322881, 2148322921], "display_name": "Fake Agent number - 1", "enabled": true, "skills": [1296081, 1300641], "email": "fake.agent-1@email.com", "last_login": null, "login_count": 0, "roles": {"administrator": false, "owner": false}}, "emitted_at": 1672828433502}
{"stream": "bans", "data": {"type": "visitor", "id": 75411361, "reason": "Spammer", "created_at": "2021-04-27T15:52:32Z", "visitor_name": "Visitor 47225177", "visitor_id": "10414779.13ojzHu7ISdt0SM"}, "emitted_at": 1672828433831}
{"stream": "bans", "data": {"type": "visitor", "id": 75411401, "reason": "Spammer", "created_at": "2021-04-27T15:52:32Z", "visitor_name": "Visitor 62959049", "visitor_id": "10414779.13ojzHu7at4VKcG"}, "emitted_at": 1672828433831}
{"stream": "bans", "data": {"created_at": "2021-04-27T15:52:32Z", "visitor_id": "10414779.13ojzHu7at4VKcG", "id": 75411401, "reason": "Spammer", "visitor_name": "Visitor 62959049", "type": "visitor"}, "emitted_at": 1672828434000}
{"stream": "bans", "data": {"created_at": "2021-04-27T15:52:33Z", "visitor_id": "10414779.13ojzHu7s9YwIjz", "id": 75411441, "reason": "Spammer", "visitor_name": "Visitor 97350211", "type": "visitor"}, "emitted_at": 1672828434001}
{"stream": "chats", "data": {"visitor": {"phone": "", "notes": "", "id": "0.83900", "name": "Fake user - chat 116", "email": "fake_user_chat_116@doe.com"}, "type": "offline_msg", "webpath": [], "session": {"browser": "Safari", "city": "Orlando", "country_code": "US", "country_name": "United States", "end_date": "2022-10-09T05:46:47Z", "id": "141109.654464.1KhqS0Nw", "ip": "67.32.299.96", "platform": "Mac OS", "region": "Florida", "start_date": "2014-10-09T05:28:31Z", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25"}, "timestamp": "2021-04-30T13:36:28Z", "deleted": false, "tags": [], "department_name": null, "update_timestamp": "2021-04-30T13:36:28Z", "unread": true, "department_id": null, "message": "Hi there!", "id": "2104.10414779.SW4WsV9Tu0Ynj", "zendesk_ticket_id": null}, "emitted_at": 1672828434384}
{"stream": "chats", "data": {"visitor": {"phone": "", "notes": "", "id": "6.42465", "name": "Fake user - chat 117", "email": "fake_user_chat_117@doe.com"}, "type": "offline_msg", "webpath": [], "session": {"browser": "Safari", "city": "Orlando", "country_code": "US", "country_name": "United States", "end_date": "2022-10-09T05:46:47Z", "id": "141109.654464.1KhqS0Nw", "ip": "67.32.299.96", "platform": "Mac OS", "region": "Florida", "start_date": "2014-10-09T05:28:31Z", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25"}, "timestamp": "2021-04-30T13:36:29Z", "deleted": false, "tags": [], "department_name": null, "update_timestamp": "2021-04-30T13:36:29Z", "unread": true, "department_id": null, "message": "Hi there!", "id": "2104.10414779.SW4WsbJTqVJsF", "zendesk_ticket_id": null}, "emitted_at": 1672828434384}
{"stream": "chats", "data": {"visitor": {"phone": "", "notes": "", "id": "8.89712", "name": "Fake user - chat 118", "email": "fake_user_chat_118@doe.com"}, "type": "offline_msg", "webpath": [], "session": {"browser": "Safari", "city": "Orlando", "country_code": "US", "country_name": "United States", "end_date": "2022-10-09T05:46:47Z", "id": "141109.654464.1KhqS0Nw", "ip": "67.32.299.96", "platform": "Mac OS", "region": "Florida", "start_date": "2014-10-09T05:28:31Z", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25"}, "timestamp": "2021-04-30T13:36:29Z", "deleted": false, "tags": [], "department_name": null, "update_timestamp": "2021-04-30T13:36:29Z", "unread": true, "department_id": null, "message": "Hi there!", "id": "2104.10414779.SW4WsgcJUJbVN", "zendesk_ticket_id": null}, "emitted_at": 1672828434384}
{"stream": "chats", "data": {"visitor": {"phone": "", "notes": "", "id": "9.61246", "name": "Fake user - chat 119", "email": "fake_user_chat_119@doe.com"}, "type": "offline_msg", "webpath": [], "session": {"browser": "Safari", "city": "Orlando", "country_code": "US", "country_name": "United States", "end_date": "2022-10-09T05:46:47Z", "id": "141109.654464.1KhqS0Nw", "ip": "67.32.299.96", "platform": "Mac OS", "region": "Florida", "start_date": "2014-10-09T05:28:31Z", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25"}, "timestamp": "2021-04-30T13:36:29Z", "deleted": false, "tags": [], "department_name": null, "update_timestamp": "2021-04-30T13:36:29Z", "unread": true, "department_id": null, "message": "Hi there!", "id": "2104.10414779.SW4WslzhLr3zm", "zendesk_ticket_id": null}, "emitted_at": 1672828434385}
{"stream": "departments", "data": {"description": "A sample department", "members": [360786799676], "settings": {}, "enabled": true, "id": 2148316401, "name": "Department 1"}, "emitted_at": 1672828434639}
{"stream": "departments", "data": {"description": "A sample department 2", "members": [361089721035, 361084605116], "settings": {}, "enabled": true, "id": 2148322881, "name": "Department 2"}, "emitted_at": 1672828434640}
{"stream": "departments", "data": {"description": "A sample department 3", "members": [361089721035], "settings": {}, "enabled": false, "id": 2148322921, "name": "Department 3"}, "emitted_at": 1672828434640}
{"stream": "goals", "data": {"description": "A new goal", "id": 513481, "attribution_model": "first_touch", "attribution_period": 15, "name": "Goal 3", "enabled": true, "settings": {"conditions": [{"operator": "equals", "type": "url", "value": "http://mysite.com/"}]}}, "emitted_at": 1672828434873}
{"stream": "goals", "data": {"description": "A new goal - 1", "id": 529641, "attribution_model": "first_touch", "attribution_period": 15, "name": "Goal one", "enabled": false, "settings": {"conditions": [{"operator": "equals", "type": "url", "value": "http://mysite.com/"}]}}, "emitted_at": 1672828434874}
{"stream": "goals", "data": {"description": "A new goal - 2", "id": 529681, "attribution_model": "first_touch", "attribution_period": 15, "name": "Goal two", "enabled": false, "settings": {"conditions": [{"operator": "equals", "type": "url", "value": "http://mysite.com/"}]}}, "emitted_at": 1672828434874}
{"stream": "goals", "data": {"description": "Test goal", "id": 537121, "attribution_model": "last_touch", "attribution_period": 30, "name": "Test goal", "enabled": true, "settings": {"conditions": [{"operator": "equals", "type": "url", "value": "http://zendesk.com/thanks"}]}}, "emitted_at": 1672828434874}
{"stream": "roles", "data": {"permissions": {"visitors_seen": "account", "proactive_chatting": "listen-join", "edit_visitor_information": true, "edit_visitor_notes": true, "view_past_chats": "account", "edit_chat_tags": true, "manage_bans": "account", "access_analytics": "account", "view_monitor": "account", "edit_department_agents": "account", "set_agent_chat_limit": "account", "manage_shortcuts": "account"}, "enabled": true, "description": "In addition to regular agent privileges, administrators can edit widget and accounts settings, manage agents, roles and permissions, and more. Permissions for the administrator role cannot be modified.", "id": 360002848996, "name": "Administrator", "members_count": 1}, "emitted_at": 1672828435141}
{"stream": "roles", "data": {"permissions": {"visitors_seen": "account", "proactive_chatting": "listen-join", "edit_visitor_information": true, "edit_visitor_notes": true, "view_past_chats": "account", "edit_chat_tags": false, "manage_bans": "account", "access_analytics": "none", "view_monitor": "account", "edit_department_agents": "none", "set_agent_chat_limit": "none", "manage_shortcuts": "account"}, "enabled": true, "description": "Agent is the most basic role in an account, and their primary responsibility is to serve chats. Permissions for the agent role can be modified.", "id": 360002848976, "name": "Agent", "members_count": 2}, "emitted_at": 1672828435142}
{"stream": "shortcuts", "data": {"name": "goodbye", "id": "goodbye", "options": "Yes/No", "tags": ["goodbye_survey"], "scope": "all", "message": "Thanks for chatting with us. Have we resolved your question(s)?"}, "emitted_at": 1672828435386}
{"stream": "shortcuts", "data": {"name": "help", "id": "help", "options": "Yes/No", "tags": ["help_survey"], "scope": "all", "message": "Do you need any help?"}, "emitted_at": 1672828435386}
{"stream": "shortcuts", "data": {"name": "hi", "id": "hi", "options": "", "tags": [], "scope": "all", "message": "Hi, how can we help you today? =)"}, "emitted_at": 1672828435386}
{"stream": "shortcuts", "data": {"name": "returning", "id": "returning", "options": "", "tags": ["returning_visitor"], "scope": "all", "message": "Welcome back. How can we help you today"}, "emitted_at": 1672828435387}
{"stream": "skills", "data": {"id": 1300601, "name": "english", "enabled": true, "description": "English language", "members": [361084605116]}, "emitted_at": 1672828435627}
{"stream": "skills", "data": {"id": 1300641, "name": "france", "enabled": true, "description": "France language", "members": [361089721035]}, "emitted_at": 1672828435628}
{"stream": "skills", "data": {"id": 1296081, "name": "mandarin", "enabled": true, "description": "Chinese language", "members": [361089721035]}, "emitted_at": 1672828435628}
{"stream": "triggers", "data": {"definition": {"actions": [["sendMessageToVisitor", "Customer Service", "Hi, are you interested in [insert product name]? We're offering a one-time 20% discount. Chat with me to find out more."]], "version": 1, "event": "chat_requested", "condition": ["and", ["icontains", "@visitor_page_url", "[product name]"], ["stillOnPage", 30], ["eq", "@visitor_requesting_chat", false], ["eq", "@visitor_served", false], ["not", ["firedBefore"]]]}, "enabled": false, "id": 66052801, "name": "Product Discounts", "description": "Offer your returning customers a discount on one of your products or services. This Trigger will need to be customized based on the page."}, "emitted_at": 1672828435882}
{"stream": "triggers", "data": {"definition": {"actions": [["addTag", "Away_request"], ["sendMessageToVisitor", "Customer Service", "Hi, sorry we are away at the moment. Please leave your email address and we will get back to you as soon as possible."]], "version": 1, "event": "chat_requested", "condition": ["and", ["eq", "@account_status", "away"], ["not", ["firedBefore"]]]}, "enabled": false, "id": 66052841, "name": "Request Contact Details", "description": "When your account is set to away, ask customer's requesting a chat to leave their email address."}, "emitted_at": 1672828435882}
{"stream": "triggers", "data": {"definition": {"actions": [["addTag", "5times"]], "version": 1, "event": "page_enter", "condition": ["and", ["gte", "@visitor_previous_visits", 5]]}, "enabled": false, "id": 66052881, "name": "Tag Repeat Visitors", "description": "Add a tag to a visitor that has visited your site 5 or more times. This helps you identify potential customers who are very interested in your brand."}, "emitted_at": 1672828435883}
{"stream": "routing_settings", "data": {"routing_mode": "broadcast", "chat_limit": {"enabled": false, "limit": 3, "limit_type": "account", "allow_agent_override": false}, "skill_routing": {"enabled": false, "max_wait_time": 30}, "reassignment": {"enabled": false, "timeout": 30}, "auto_idle": {"enabled": false, "reassignments_before_idle": 3, "new_status": "away"}}, "emitted_at": 1672828436146}
6 changes: 1 addition & 5 deletions airbyte-integrations/connectors/source-zendesk-chat/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@

from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk~=0.1",
"pendulum >= 2,<3",
"requests==2.25.1",
]
MAIN_REQUIREMENTS = ["airbyte-cdk", "pendulum"]

TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock", "requests_mock"]

Expand Down

0 comments on commit e42ac74

Please sign in to comment.