#+BEGIN_COMMENT .. title: Extending Zulip to provide Chat-With-Us - Helpdesk interface. .. slug: extending-zulip-to-provide-chat-with-us-helpdesk-interface .. date: 2015-12-20 12:03:40 UTC .. tags: zulip, python, chat .. category: .. link: .. description: .. type: text #+END_COMMENT #+OPTIONS: ^:nil Here is the github repo: https://github.com/baali/chat-with-us We at [[https://www.taxspanner.com/][TaxSpanner]] had been using [[https://www.olark.com/][olark]] to help out our customers over chat interface. While there interface is very mature and gives all the features they mention, we were not able to manage things in terms of how customer was reaching out us via different mediums(email, chat, phone). As [[https://github.com/zulip/zulip][zulip]] got released and we were giving it a try for our internal team communication(both tech+sales team) idea was floated that ~could we extend the same interface to our customers too?~ We set the target to get a prototype in place which could replace olark and if during trails feature requests are reasonable and manageable we would take a call. So idea was to expose a limited view to customers while having full feature interface for our Support Team. We created two stripped down and simple html templates which would be exposed to customers. Got a view in place in lines of home view of zulip with additional logic to route customers to sales team. Notifications for offline and online sales team, additional small checks in main zulip views to make sure basic views are exposed just to internal team. Like function ~get_status_dict~ in ~zerver/libs/actions.py~ there is a hook for MIT users, #+BEGIN_SRC python # Return no status info for regular users if requesting_user_profile.realm.domain != settings.ADMIN_DOMAIN: return defaultdict(dict) #+END_SRC and additional check to home in views: #+BEGIN_SRC python from zerver.forms import has_valid_realm if not has_valid_realm(request.user.email): from django.contrib.auth import logout # making sure user is logged out from session. logout(request) return redirect('/support') #+END_SRC For adding this interface on landing page we added following HTML #+BEGIN_SRC html