While we always have an open ear for all of our customers' feature requests, not all of these features make their way into Cobot. We want to stay true to our promise to add features in a meaningful way and not make it and overwhelming experience to use Cobot.. It's possible though to add functionality or customize the way things work without having to rely on us. This post explores what's possible and how to do it.
Our growing list of add-ons might already cover what you are looking for. We also integrate with Zapier, which can be used for simple use cases and does not require any programming.
In general, extending Cobot is possible by writing software that talks to our API. That software can be:
- Another web server: this can either be a separate website or you can add your own web pages to your Cobot space.
- A script that runs in the background to do some sort of data processing.
- Or a (phone) app that delivers a customized experience to your space's members.
While most of Cobot is written in the Ruby programming language, it doesn't matter what languages or tools you use to write your software.
Use Cases
Here are a few examples of common use cases:
Adding Reports
Cobot offers a number of tabular views as well as CSV downloads that lets you download things like a list of members or invoices. You might need data in a different format or combined in a different way though. Adding reports would fall under the other web server running inside your Cobot space category of software.
Basically, you need a server side web application that:
One way would be to write your own PHP/Ruby on Rails/Django etc. app, implement OAuth2 to get API access and then do the processing server side.
A much simpler approach is to use our bots – they are client side HTML/JavaScript apps that can be developed and will also run in the browser. Authentication and Cobot UI integration are already taken care of. Here’s an example of a bot listing all members.
Adding new interactive features to a Cobot space
This would be very similar to adding a report. Say you want to show all your members' photos, along with some profile data, in the member section of your space.
What you would need is a web server that is able to generate an HTML page with all the data. The photos could be coming from Cobot, the profile data would be stored in your own database.
Again, the first step would be to add a page to Cobot – this would show an iFrame that points to your web server. When you receive a request, you run the user through our OAuth flow to obtain API credentials. After that you can query the API for a list of all members and their photos and generate an HTML page from that. To add profile data, you would provide a form for users to fill out and store that data in your own database, combining it with the member data from Cobot when generating the HTML for a combined photos/profile data page.
Integrating with other services
Integrating with other services is mostly about synchronizing data using the Cobot and the other service's API. For example, our own KISI integration (used for giving members access to a space's smart locks) synchronizes all Cobot memberships with a KISI account.
This integration consists of two parts: a web interface to set up the synchronization, and background processes to do the actual work.
The web interface authenticates the user against the Cobot API and the other service's API in order to obtain API credentials that the background processes can use later on. These would usually be stored in a database. In addition, it sets up any necessary webhooks, in order to be notified when any relevant data on Cobot changes. Our KISI integration for example gets notified when a new member signs up, an existing member changes their plan or cancels.
The setup process can of course be done manually as well, if your integration is only used for one account.
After the webhooks are set up, Cobot sends a notification every time some piece of data changes. This triggers a background process to fetch any additional data and send it to the other service. Again, with KISI, we for example add a key to KISI when a new member signs up, and we remove it when they cancel.
This can of course work both ways. An event from the external service might for example trigger a charge to be added to a member on Cobot.
Giving members/admins access to another service
This scenario usually requires some synchronization data, as well as adding pages to Cobot. Say you've found a chat service that you would like to add to Cobot.
You would have to set up webhooks with Cobot as in the previous section in order to synchronize your Cobot members to the chat service (adding new members, removing the ones that have canceled).
In addition, you would need to add the chat to Cobot, using iFrames as before. To make the experience seamless for members, you would also need some sort of single sign-on process, so that members don't have to log in to the chat service in addition to logging in to Cobot.
In general, adding other services as iFrames requires some level of control over the other service, i.e. allowing iFrames, single sign on, and also making changes to the UI so that it makes sense when being displayed within Cobot.
Custom experience for your members
As we have seen before, it's possible to add any number of features/integrations to Cobot and its user interface. What you can't do though is completely change the look&feel or the way the built-in pages work. If you want to completely customize your members' experience, you can implement your own user interface on top of Cobot. This can be done either by integrating Cobot features into your own website, or by developing a custom mobile (phone) app.
In both cases, you would develop your own user interface (HTML or native). All data that fits into Cobot (user accounts members, everything related to billing etc.) would be stored and accessed using our API. Additional data could come from your own database/API or other services.
A phone app could use our OAuth app flow to obtain API credentials and directly use our API, or you could build your own API layer on top of ours, where the app would only communicate with your API, and it would in turn talk to Cobot.
Discussion
This post is a work in progress. Please post any questions/comments below.