{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9261","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9261/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9261/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9261/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9261","id":188403196,"number":9261,"title":"Add precancellation chat","user":{"login":"omarjackman","id":1854440,"avatar_url":"https://avatars.githubusercontent.com/u/1854440?v=3","gravatar_id":"","url":"https://api.github.com/users/omarjackman","html_url":"https://github.com/omarjackman","followers_url":"https://api.github.com/users/omarjackman/followers","following_url":"https://api.github.com/users/omarjackman/following{/other_user}","gists_url":"https://api.github.com/users/omarjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/omarjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarjackman/subscriptions","organizations_url":"https://api.github.com/users/omarjackman/orgs","repos_url":"https://api.github.com/users/omarjackman/repos","events_url":"https://api.github.com/users/omarjackman/events{/privacy}","received_events_url":"https://api.github.com/users/omarjackman/received_events","type":"User","site_admin":false},"labels":[{"id":285010082,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Support","name":"Support","color":"006b75","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"omarjackman","id":1854440,"avatar_url":"https://avatars.githubusercontent.com/u/1854440?v=3","gravatar_id":"","url":"https://api.github.com/users/omarjackman","html_url":"https://github.com/omarjackman","followers_url":"https://api.github.com/users/omarjackman/followers","following_url":"https://api.github.com/users/omarjackman/following{/other_user}","gists_url":"https://api.github.com/users/omarjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/omarjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarjackman/subscriptions","organizations_url":"https://api.github.com/users/omarjackman/orgs","repos_url":"https://api.github.com/users/omarjackman/repos","events_url":"https://api.github.com/users/omarjackman/events{/privacy}","received_events_url":"https://api.github.com/users/omarjackman/received_events","type":"User","site_admin":false},"assignees":[{"login":"omarjackman","id":1854440,"avatar_url":"https://avatars.githubusercontent.com/u/1854440?v=3","gravatar_id":"","url":"https://api.github.com/users/omarjackman","html_url":"https://github.com/omarjackman","followers_url":"https://api.github.com/users/omarjackman/followers","following_url":"https://api.github.com/users/omarjackman/following{/other_user}","gists_url":"https://api.github.com/users/omarjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/omarjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarjackman/subscriptions","organizations_url":"https://api.github.com/users/omarjackman/orgs","repos_url":"https://api.github.com/users/omarjackman/repos","events_url":"https://api.github.com/users/omarjackman/events{/privacy}","received_events_url":"https://api.github.com/users/omarjackman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-11-10T02:13:13Z","updated_at":"2016-11-11T04:24:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9261","html_url":"https://github.com/Automattic/wp-calypso/pull/9261","diff_url":"https://github.com/Automattic/wp-calypso/pull/9261.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9261.patch"},"body":"# Add a precancellation chat link\r\n\r\nThis pull request adds a \"chat with us\" link to the purchase cancellation survey. We also add olark operator status to the redux store so that we can show and hide the chat link when operators go away/come back.\r\n\r\n### How to test\r\n\r\n#### Test the redux store\r\nrun `npm run test-client client/state/ui/olark`\r\n\r\n#### Cancellation survey\r\n1. Navigate to http://calypso.localhost:3000/me/purchases/\r\n2. Select a product to cancel\r\n3. Click the \"Remove WordPress.com Business\" (or whatever the product is)\r\n4. If operators are available you should see the chat with us link\r\n5. Click the chat with us link\r\n6. Notice that the olark chatbox appears in the lower right corner\r\n\r\n### What to expect\r\n![screen shot 2016-11-09 at 9 22 18 pm](https://cloud.githubusercontent.com/assets/1854440/20162392/b90ee682-a6c2-11e6-984c-01f708ab078b.png)\r\n\r\n![screen shot 2016-11-09 at 9 24 45 pm](https://cloud.githubusercontent.com/assets/1854440/20162429/02b291f8-a6c3-11e6-8c0d-29c34f0617ec.png)\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/259878229","html_url":"https://github.com/Automattic/wp-calypso/pull/9261#issuecomment-259878229","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9261","id":259878229,"user":{"login":"omarjackman","id":1854440,"avatar_url":"https://avatars.githubusercontent.com/u/1854440?v=3","gravatar_id":"","url":"https://api.github.com/users/omarjackman","html_url":"https://github.com/omarjackman","followers_url":"https://api.github.com/users/omarjackman/followers","following_url":"https://api.github.com/users/omarjackman/following{/other_user}","gists_url":"https://api.github.com/users/omarjackman/gists{/gist_id}","starred_url":"https://api.github.com/users/omarjackman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarjackman/subscriptions","organizations_url":"https://api.github.com/users/omarjackman/orgs","repos_url":"https://api.github.com/users/omarjackman/repos","events_url":"https://api.github.com/users/omarjackman/events{/privacy}","received_events_url":"https://api.github.com/users/omarjackman/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T04:24:58Z","updated_at":"2016-11-11T04:24:58Z","body":"@dllh \r\n\r\n> one thing we'd like to be able to do is display this for a small portion of users at a time if possible.\r\n\r\nThe simplest way to do this is with a modulo of user id which you suggested in slack. I feel like we'll get some pushback on that but its definitely the easiest route. We could also add something to the API which would require a bit of wiring up to make it possible. What do you suggest given our time constraints?\r\n \r\n> I was planning on putting opers in a group for this purpose (but not removing them from their usual groups), and maybe enabling this chat for a small portion of users at a time, to ramp up slowly.\r\n\r\nThis can be done but the solution I have in mind requires:\r\n * return a new value in the olark campaigns api endpoint that looks something like:\r\n```js\r\ngroups: {\r\n    default: \"THE_DEFAULT_GROUP_ID\",\r\n    precancellation: \"SPECIAL_GROUP_ID_FOR_PRECANCELATION_CHATS\",\r\n}\r\n```\r\n * Store the groups in the olark redux store\r\n * Add actions creators that switches and keeps track of the current group before starting a chat \r\n\r\nThis isn't very difficult but it will make this PR much larger. It might be a good candidate for v2"}}
{"actor":{"display_login":"omarjackman"}}