Loading...
You can integrate co-browsing into any product in minutes with our powerful API

Our Intercom API Integration using Ruby as an Example

I asked our CTO, Joe d'Elia, to cover how the Intercom API integration with our app is done using Ruby. Below we cover the Rails job that syncs data between our app and Intercom including code and comments.
Related: See Intercom Related Hacks and Lessons Learned Here
Upscope is a co-browsing (one click to see the customer's screen) service and we use Intercom for live chat support.
While supporting customers we need to have Intercom synced with our app so we so we can quickly help customers.
Why?
We need to sync up custom attributes so we can add a link in Intercom directly to the admin page for that customer, see their monthly app usage figures, see when they subscribed and more.
While the Intercom widget integration is a simple copy and paste, it's the database sync between Intercom and our database that requires some work.
We want Intercom to be up to date with the latest data from our database that has changed during their interactions with Upscope.

Below you'll see the Rails job that:

  1. Creates a new user or updates an existing user in Intercom. 2. Updates which teams they belong to as one user can be part of several teams. 3. Updates their timezone as sometimes Intercom has better information on that. 4. Updates their name when Intercom has it but we don't as it's manually inputted. 5. Updates their phone number, which again might be manually inputted. 6. Updates Intercom attributes using data from our database. 7. Merges a lead into a user.

Which attributes do we sync up that you might find useful?

Admin link from Intercom to your own website's admin section.
We use this every day, many times a day. When an existing customer asks a question, we need to see their account to understand their context in full. We do this by clicking the Admin link in the Intercom custom attributes list.

Upscope's own instant no-download interactive screen sharing link
When a non-tech customer needs help it's difficult so Upscope built one click no-download interactive screensharing.
You can see what they see instantly AND scroll and click for them on their screen.
Add this using our own Upscope, which is an official app on the intercom app store.

Annual savings attribute so you can remind them to switch
This custom attribute might for example say: Annual saving $316
If they’ve been on a monthly plan for a while, use this during a chat to remind them of savings they'll make by switching to an annual plan.
Other attributes?
You can see the above and other ideas for Intercom attributes listed here.

Add our JS snippet and see the customer's screen from Intercom

Here's a little bit more info on Upscope which not only uses Intercom but also integrates with it.
While chatting, you can click on a link to instantly, without downloads, see what the customer sees and click for them.
We've been tracking feedback and it cuts resolution time by 43% on average though we tend to quote 30% as a good minimum.
To add Upscope to Intercom you add the Upscope javascript snippet on the same page as the Intercom snippet and you have ready to go instant screen sharing.
Start a trial here and if you have questions or need advice, you can ask us on our Intercom live chat. If it's Ruby / API related, Joe's happy to respond.
If you want to see a set of Intercom hacks and lessons learned then see our experience in these articles."

Sunglasses emoji. Continue reading the blog