<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cathal Horan on Medium]]></title>
        <description><![CDATA[Stories by Cathal Horan on Medium]]></description>
        <link>https://medium.com/@cathal.horan?source=rss-54487668927------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*r7_yi2kmkOuFT8Br_70WIw.png</url>
            <title>Stories by Cathal Horan on Medium</title>
            <link>https://medium.com/@cathal.horan?source=rss-54487668927------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:36:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cathal.horan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A beginners guide to exporting Intercom conversations with the Conversations API]]></title>
            <link>https://medium.com/@cathal.horan/a-beginners-guide-to-exporting-intercom-conversations-with-the-conversations-api-d7bb1c24983c?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7bb1c24983c</guid>
            <category><![CDATA[intercom]]></category>
            <category><![CDATA[intercomtips]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Thu, 08 Feb 2018 12:08:45 GMT</pubDate>
            <atom:updated>2018-02-08T12:08:45.462Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to list, retrieve and store your Intercom conversations via the Intercom API</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yqp6bV41zYAkmMhJ9UTqA.png" /></figure><p>Conversations are at the core of <a href="https://www.intercom.com/">Intercom</a> and of course are a valuable source of information for your business. Our <a href="https://developers.intercom.com/v2.0/reference#conversations">Conversations API</a> can be used to analyze, understand and share conversations in more detail, in order to create more value for you and your customers.</p><p>Here’s a quick “How-to” guide to help you get started with the Conversations API. We’ll show you how to list and store all your conversations and their content, whilst ensuring you don’t hit any rate limits while doing so in a few simple steps:</p><ol><li>List all your conversations</li><li>Get each conversation on your list so you have access to the conversation ‘parts’ (content)</li><li>Store the conversation parts in a file for future reference</li><li>Use pagination to go through all your conversations</li><li>Add a simple check to make sure you are not hitting any rate limits</li></ol><p>Read on for a detailed step-by-step guide. 👌</p><h4>What you will need to get started</h4><ul><li>An Intercom app with some conversations 😃</li><li>Your access token setup as an environment variable — see <a href="https://www.thoughtco.com/using-environment-variables-2908194">here</a> for how to do this. You can hard code your token if you prefer, but this is not recommended best practice 🤫</li><li>The Intercom <a href="https://github.com/intercom/intercom-ruby">Ruby SDK</a> (you can use <a href="https://developers.intercom.com/v2.0/reference#sdks-client-libraries">any SDK</a> but in this example we’re using the Ruby SDK)</li><li>An Access Token with <a href="https://developers.intercom.com/docs/personal-access-tokens">extended scope</a> to be able to list your conversations</li></ul><h4>1. List your conversations 📜</h4><p>Firstly, we want to list all of the conversations in our Intercom app. You can do this using the <a href="https://developers.intercom.com/reference#list-conversations">conversations endpoint.</a></p><p>The listing functionality returns all the metadata associated with your conversations — things like the conversation ID, the timestamps associated with it, the people involved in the conversation and other data that is helpful for reporting purposes.</p><p>It does not return the payload associated with your conversations, which in this case is the body/content of your conversations. Intercom conversations are broken into conversation ‘parts’ (i.e. each individual message or action in a conversation), which you can think of as the building blocks of your conversation. We’ll retrieve these later, but for now we’re just getting a list of conversations.</p><p>Note that in the code below we setup our access token as an environment variable called “AT”. This is good practice, so you’re not putting you actual access token in all your code and accidentally pushing it to a public repo (as noted earlier, if you are not familiar with how to do this, you can find a good guide <a href="https://www.thoughtco.com/using-environment-variables-2908194">here</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51f00fa08aef09dc4e302ac434ab779e/href">https://medium.com/media/51f00fa08aef09dc4e302ac434ab779e/href</a></iframe><p>You might be wondering why we’ve used ‘intercom.get(<strong>“/conversations”</strong>, <strong>“”</strong>)’ in this example. In most cases there is a nice Ruby method that you can use to perform actions such as “conversations.find_all”. For our use case we want to list <strong>all</strong> our conversations without any filtering like you can with the <a href="https://developers.intercom.com/reference#section-all-conversations">API</a> to list <strong>all</strong> conversations without any arguments.</p><p>The Ruby methods here do require a filter argument, but we allow for this in the Ruby SDK by providing you with access to the raw REST methods such as ‘get’ and ‘post’. We can use the raw ‘get’ method here to construct our own request without needing to create the full Ruby HTTP request from scratch. This is a convenient workaround if something you need is not covered in the SDK.</p><h3>2. Get your individual conversations and conversation parts 💬</h3><p>Remember the list only provides the metadata for your conversations but does not provide the ‘parts’ of the conversation (each individual message or action). In most cases this may be all you need, but here we’ll show you how to retrieve the content of your messages too.</p><p>We’re expanding the example in step 1 with some some methods to:</p><ol><li>Retrieve the full conversation</li><li>Get all the conversations parts associated with that conversation</li></ol><p>In the code below we go through each conversation on our list and make another call to the API to get the individual conversation. Then we parse through the response and pull out the conversation parts and output some of that info to the terminal:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2b98177c34bcfa7cef086c270c24674/href">https://medium.com/media/b2b98177c34bcfa7cef086c270c24674/href</a></iframe><p>Notice that we are only doing this for the first page of results. If you have a high volume of conversations you will likely have multiple pages. We do not return them all in one go, instead we use pagination to allow you to sort through your conversations and retrieve what you need. We use this on a number of our endpoints, you can find more info on this in our <a href="https://developers.intercom.com/reference#pagination">API reference</a> but we’ll talk about that some more in step 4 of this guide. For now, just be aware that this may not retrieve <strong>all</strong> of your conversations</p><h3>3. Store the conversation parts in a text file 📁</h3><p>Since there may be lots of information showing on your terminal now, it can be easiest to write this to a file so you can more easily look through it and better understand the layout of conversations and the conversation parts. You can also play around with this to get more information if you need it for your particular use case. The following example will store the output in a file called <strong>“convo_output.txt”</strong></p><p>You just need to make the following changes to the code to write it to a file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f25b32b326920549cab4bbfc33f92728/href">https://medium.com/media/f25b32b326920549cab4bbfc33f92728/href</a></iframe><p>With these changes your code should now look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83b8acf5bac4701ed8495eaf48faea2f/href">https://medium.com/media/83b8acf5bac4701ed8495eaf48faea2f/href</a></iframe><p>Note that you could also create this as a CSV file rather than a plain text file, the choice is up to you. You can see an example of how to write this to a CSV in Ruby <a href="https://gist.github.com/choran/728915a3c5a7f7af5e104ca726258ed5">here</a>.</p><h3>4. Use Pagination to go through conversations 📄</h3><p>So far we have made one call to the API to list your conversations, then made a call for each conversation in that original list and stored some of that data in a text file. Next, if you have a high volume of conversations, you’ll need to make more calls to list conversations until you have retreived <strong>all</strong> your conversations.</p><p>The code below will check the ‘pages’ object returned with the conversation list response. This shows what pages you are currently accessing and how many are left. You can use the “next” part of this object to get a URL that you can then use to get the next page of conversation results.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92ce67dd0118c1a3c99aa4aede8bf90c/href">https://medium.com/media/92ce67dd0118c1a3c99aa4aede8bf90c/href</a></iframe><p>The full pagination-enabled code then looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/817a8ceeff738f4057eee2d79bd247ba/href">https://medium.com/media/817a8ceeff738f4057eee2d79bd247ba/href</a></iframe><h3>5. Finally, check your rate limits ✋</h3><p>If you have a large number of conversations, there is a risk that you may encounter rate limits when retrieving them from the Conversations API.</p><p>We provide information on the rate limit in each response which you can use to monitor the situation. Below is a simple example of how to check the remaining number of calls for your rate limit and then sleep for 10 seconds if you are getting close to it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2af1397e8170de650bffa1657e3e6802/href">https://medium.com/media/2af1397e8170de650bffa1657e3e6802/href</a></iframe><p>You can just call this method for each call you make to the API. With this, your full code should look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0634f6e2136a3d5cd5f5987175d1a169/href">https://medium.com/media/0634f6e2136a3d5cd5f5987175d1a169/href</a></iframe><p>This code should enable you to list and store all your conversations and their related conversation parts, and ensure you are not hitting any rate limits while doing so. You can tailor it to the information you need depending on what you’re trying to do with your conversations.</p><p>We hope this guide is useful and helps you get started with the Conversations API. If you have any questions, leave us a comment here or chat to us via the messenger on our <a href="https://developers.intercom.com/">Developer Hub</a> and we’ll be happy to help. Happy exporting! 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7bb1c24983c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to: Send HTML emails with the Intercom Conversations API ]]></title>
            <link>https://medium.com/@cathal.horan/how-to-send-html-emails-with-the-intercom-conversations-api-748eb2784b1?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/748eb2784b1</guid>
            <category><![CDATA[email]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[intercomtips]]></category>
            <category><![CDATA[intercom]]></category>
            <category><![CDATA[conversations]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Fri, 20 Oct 2017 13:37:13 GMT</pubDate>
            <atom:updated>2017-10-20T13:37:13.165Z</atom:updated>
            <content:encoded><![CDATA[<h4>A short tutorial</h4><p>A common use case for our Conversations API is to send emails — often with HTML formatting — via the API. In this quick tutorial we’ll show you how to send a message using the Conversations API, and which HTML formats can be used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDdB3arMwsXKX0bCVoR3og.png" /></figure><p>We’re using the <a href="https://github.com/intercom/intercom-node">Node SDK</a> for our examples, but you can use <a href="https://developers.intercom.com/v2.0/reference">any of our SDKs </a>in the same way 👌</p><h4>First: Messages vs. Conversations endpoints</h4><p>You might notice that there are two endpoints that you can use to talk to customers: <a href="https://api.intercom.io/messages">https://api.intercom.io/messages</a> and <a href="https://api.intercom.io/conversations.">https://api.intercom.io/conversations</a></p><p>Let’s quickly cover the differences:</p><ul><li>If you’re initiating contact with a <strong>new</strong> message — for example, sending out an announcement email — then you’ll use the ‘messages’ endpoint.</li><li>Once the initial message is sent and you want to send a reply or take an action on the conversation (like closing it), you’ll use the ‘conversations’ endpoint.</li></ul><p>Each part or reply within a conversation is a message, so essentially messages make up conversations.</p><p>So, now that we’ve got that covered, let’s get on with sending an email message to a lead.</p><h4>Sending a message</h4><p>We’re starting a new conversation, so we need to use the <a href="https://developers.intercom.com/reference#admin-initiated-conversation">‘messages’ endpoint</a>. In most cases, you will send messages to customers as an admin.</p><p>Here’s the Node code for sending an HTML email message to a lead via the API:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae282a50b70b9058858f355a04a51bb5/href">https://medium.com/media/ae282a50b70b9058858f355a04a51bb5/href</a></iframe><p>Alternatively, we could have chosen to send this as an in-app message. Which you choose will depend on your own use case, but just be aware of some differences in the POST body for each type — for example, you don’t need a ‘subject’ attribute when sending an in-app message.</p><h4>What HTML can be used?</h4><p>We’ve included some basic HTML formats in the example above. Whilst we don’t support the HTML Style attribute, you can include some basic HTML as we’ve shown.</p><p>Those include:</p><ul><li>Headers and paragraphs</li><li>Ordered and unordered Lists</li><li>Bold/italics/highlighted/underscored</li><li>Tables</li><li>Images</li></ul><p>Here’s what the message example above looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOj7ITZDTrNOk7ZGCu4hbQ.png" /><figcaption>An example of supported HTML</figcaption></figure><h4>Next time: Retrieving conversations</h4><p>This should give you a good idea of how to send HTML emails.</p><p>Next, you may want to retrieve the messages you’ve sent, for example to see who you sent them to or who’s responded. We’ll cover how to do that in our next post, coming soon!</p><p>If there’s anything else you’d like to see or you have any question,s let us know in the comments or tweet us at <a href="https://twitter.com/intercomdevs">@intercomdevs</a> 👍</p><p>And in the meantime, you can check out <a href="https://developers.intercom.com/">our docs</a> to discover many more features of the Conversations API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=748eb2784b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shiny new things in the Intercom Conversations API ]]></title>
            <link>https://medium.com/@cathal.horan/shiny-new-things-in-the-intercom-conversations-api-92cc585c1d02?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/92cc585c1d02</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[intercom-updates]]></category>
            <category><![CDATA[conversations]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Fri, 04 Aug 2017 09:30:32 GMT</pubDate>
            <atom:updated>2017-08-04T13:22:23.207Z</atom:updated>
            <content:encoded><![CDATA[<h4>Group conversations, snooze and ‘waiting longest’ now available</h4><p>We’ve recently added a bunch of new features to our Team Inbox, and we’re excited to share that these are now also available in our Conversations API:</p><ul><li><strong>Group conversations</strong> — add and remove people from conversations to make resolving issues quicker</li><li><strong>Snooze</strong> —keep your inbox tidy by snoozing conversations you’re not ready to close just yet</li><li><strong>Sort by ‘waiting longest’ </strong>— prioritize who to respond to first by seeing which customers have waited longest for a response</li></ul><p>Read on for more details about using these new features in our Conversations API.</p><h3>Group conversations 👨‍👩‍👧‍👦</h3><p>You can now add and remove people from conversations to make issues involving you and multiple stakeholders easier to manage and quicker to resolve.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ffast.wistia.net%2Fembed%2Fiframe%2Ftgat3v1jev%3Ftwitter%3Dtrue&amp;src_secure=1&amp;url=https%3A%2F%2Fintercom.wistia.com%2Fmedias%2Ftgat3v1jev&amp;image=https%3A%2F%2Fembed-ssl.wistia.com%2Fdeliveries%2Faf5910f8d3180e79616bd008c3ab3ecec85bc63b.jpg%3Fimage_crop_resized%3D400x224&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=wistia" width="400" height="224" frameborder="0" scrolling="no"><a href="https://medium.com/media/c9151e26336deb7854041d0bd1fb50f4/href">https://medium.com/media/c9151e26336deb7854041d0bd1fb50f4/href</a></iframe><p>Below are the highlights — <strong>you can also check out </strong><a href="https://developers.intercom.com/v2.0/reference#adding-to-group-conversations"><strong>the full API guide</strong></a> or <a href="https://docs.intercom.com/responding-to-users-and-visitors/work-as-a-team/manage-group-conversations">fiind out more about using this feature in the app</a>.</p><h4><strong>Add a customer to a conversation</strong></h4><p>You can add users or leads to a conversation by identifying the conversation you want to add them to and providing an admin ID and the relevant user or lead ID as shown here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25575d9d17b429ef00e247a697da5ccf/href">https://medium.com/media/25575d9d17b429ef00e247a697da5ccf/href</a></iframe><p>You will have to have valid admin ID to be able to add a customer to a conversation and if it works correctly you will receive a list of the customers currently involved in that conversation.</p><p>So if you added a lead to an existing conversation with a user your response would look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cda1065b4e2a1414130d15450d56980b/href">https://medium.com/media/cda1065b4e2a1414130d15450d56980b/href</a></iframe><h4><strong>Remove a customer from a conversation</strong></h4><p>If things start to get too crowded or someone no longer needs to be looped in, you can simply remove customers from the conversation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d028d85f6351315c07b2ed56a1f4c6e3/href">https://medium.com/media/d028d85f6351315c07b2ed56a1f4c6e3/href</a></iframe><p>Don’t try and remove everyone though … you need at least one person in the conversation, so you will get an error if you try and remove the only person in the conversation.</p><h3>Snoozing conversations 😴</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ffast.wistia.net%2Fembed%2Fiframe%2F9u4tbn5ygs%3Ftwitter%3Dtrue&amp;src_secure=1&amp;url=https%3A%2F%2Fintercom.wistia.com%2Fmedias%2F9u4tbn5ygs&amp;image=https%3A%2F%2Fembed-ssl.wistia.com%2Fdeliveries%2F14a52bfd657b9be1e67e8e0fea54c23710e98dd2.jpg%3Fimage_crop_resized%3D400x224&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=wistia" width="400" height="224" frameborder="0" scrolling="no"><a href="https://medium.com/media/9052bfc27eb9389b632f6cd167619ebd/href">https://medium.com/media/9052bfc27eb9389b632f6cd167619ebd/href</a></iframe><p>You can now snooze a conversation for any chosen period, for those times when a conversation isn’t ready to be closed, such as when:</p><ul><li>You are waiting on a lead to reply, but want to set a reminder to follow up if you haven’t heard from them</li><li>You’re having conversation with a customer, but their question requires more investigation and you want to follow up when you have an answer</li></ul><p>Here’s how to snooze (an un-snooze!) a conversation — you can also <strong>check out the </strong><a href="https://developers.intercom.com/reference#snoozing-a-conversation"><strong>full API guide</strong></a> or read <a href="https://docs.intercom.com/responding-to-users-and-visitors/respond-to-issues-quicker/snooze-conversations-that-are-on-hold">more on using this feature in the app</a>.</p><h4><strong>Snooze a conversation</strong></h4><p>To snooze a conversation you just need to use the reply endpoint in the same way you would to close or reply to a conversation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2417eae64ff95567076dc3d2d102f75a/href">https://medium.com/media/2417eae64ff95567076dc3d2d102f75a/href</a></iframe><p>The time you provide in the POST body (which is in Unix Epoch time) will be the time you want the snooze to end, i.e. the time you want to conversation to re-open and re-appear in the open inbox.</p><p>When you snooze a conversation you will be returned the full conversation in the response. The key parts in terms of the snooze action are shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5ecfb4ab0ab382b288ae389cd0a7caf/href">https://medium.com/media/f5ecfb4ab0ab382b288ae389cd0a7caf/href</a></iframe><h4><strong>Un-snooze a conversation</strong></h4><p>If at any time you want to unsnooze a conversation before its ‘snoozed_until” end time then you can simply re-open the conversation:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f26ae7b375852180b271652a6b514d66/href">https://medium.com/media/f26ae7b375852180b271652a6b514d66/href</a></iframe><h3>Sorting conversations by ‘waiting longest’ ⏱</h3><p>We recently added a new filter to the team inbox called ‘waiting longest’ that lets you sort your open conversations from longest to shortest wait time, so you can better prioritize who to speak to next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2LocpKMoTGYLr3NVJNmghw.png" /></figure><p>Here’s how to return a list of conversations sorted by customers who’ve been waiting longest:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b9cb61b3778ccc04014575f854666ac/href">https://medium.com/media/4b9cb61b3778ccc04014575f854666ac/href</a></iframe><p><strong>Read more in the API guide </strong><a href="https://developers.intercom.com/reference#sorting-by-customer-waiting-time"><strong>here</strong></a> or find out more about using this in the app <a href="https://docs.intercom.com/responding-to-users-and-visitors/respond-to-issues-quicker/prioritize-responding-to-customers-whove-been-waiting-longest">here</a>.</p><p>We hope you enjoy these updates — if you have any feedback, let us know in the comments or on Twitter <a href="https://twitter.com/intercomdevs">@intercomdevs</a> 👍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92cc585c1d02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making it easier to integrate with Intercom]]></title>
            <link>https://medium.com/@cathal.horan/making-it-easier-to-integrate-with-intercom-f69d51028fb4?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/f69d51028fb4</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[intercom-updates]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[intercom]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Tue, 11 Jul 2017 09:56:33 GMT</pubDate>
            <atom:updated>2017-07-11T09:56:58.455Z</atom:updated>
            <content:encoded><![CDATA[<h4>Get building and testing right away with instant OAuth approval</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeLioR4LulndDOF7Mt37Rw.png" /></figure><p>Since launching the Intercom platform in 2015, we’ve continued to work with developers to iterate on our processes and make it quicker and easier to build with Intercom.</p><p>In that spirit, we’ve made an update to our OAuth application process so that you can now get instant, automatic approval to start building and testing your integration without having to wait for us to review. Read on for more detail 🎉</p><h4>A bit of background on OAuth</h4><p>All integrations with Intercom need to use <a href="https://en.wikipedia.org/wiki/OAuth"><strong>OAuth</strong></a> to let people use the integration or app. This makes the integration process easy and transparent for users, means they can be confident their data is secure and can know how it will be used.</p><p>Previously, this required approval for OAuth by us before you could get started building. We wanted to change this to avoid the frustration of waiting for approval when you just want to get on and start developing 😁</p><h4>Introducing instant OAuth TEST approval</h4><p>Now, you can get OAuth approval for your TEST app instantly so you can start building and testing without needing to wait 👏</p><p>Your TEST app is easy to set up from within Intercom and allows you to work on your integration without impacting your main production app (you can find out more about setting one up <a href="https://docs.intercom.com/configure-intercom-for-your-product-or-site/create-a-test-version-of-intercom/create-a-test-version-of-intercom">here</a>). And with instant approval for OAuth, you can get started developing immediately 🎉</p><p>Some key points to note about the TEST app:</p><ol><li><strong>Same Environment:</strong> Your TEST app inherits all the products you have on your main production app, so you can recreate and test any scenario or feature that is possible on your production app</li><li><strong>Separate Data: </strong>Your TEST Intercom version has completely different data to your main production account, so you can develop without the risk of deleting or updating data on your production app.</li><li><strong>Teammates only:</strong> OAuth access on your TEST app is restricted to your teammates, so you won’t be able to signup any users outside your app — to do that, you’ll need to apply for OAuth on your production app when you’re ready (read on for more info on that!)</li></ol><h4>The full (new and improved!) OAuth process</h4><p>So, how does this TEST app OAuth fit in to the process of building and publishing your integration?</p><p>There’s a full run down of the whole process <a href="https://developers.intercom.com/docs/applying-for-oauth">here</a>, but in short it now looks like this:</p><ol><li>Create a TEST Intercom app</li><li>Get OAuth for your TEST app instantly</li><li>Build your integration in your TEST app</li><li>When you’re ready to make your integration live, apply for OAuth approval for your main Intercom app with a short demo video (there are some tips <a href="https://developers.intercom.com/docs/applying-for-oauth#section-4-apply-for-oauth-approval-for-your-main-intercom-app">here</a> on creating a great demo vid 📽)</li><li>We’ll review your application, and let you know if OAuth has been approved. This is usually within 5–10 working days.</li></ol><p>⚠️ Note that you can’t skip ahead to get OAuth on your production app without getting OAuth and building on your test app first. ⚠️</p><p>We hope that this process makes it easier and quicker to get started with building your integration.</p><h4>Always be …. iterating</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fd2ZeJSRDqd8P4RIQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fglengarry-glen-ross-always-be-closing-brass-balls-d2ZeJSRDqd8P4RIQ&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fd2ZeJSRDqd8P4RIQ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="241" frameborder="0" scrolling="no"><a href="https://medium.com/media/95e89d17e4f75bc83bdad45e2f28afb2/href">https://medium.com/media/95e89d17e4f75bc83bdad45e2f28afb2/href</a></iframe><p>…Ok, not quite the same as Alex Baldwins character in the film <a href="https://en.wikipedia.org/wiki/Glengarry_Glen_Ross_(film)">Glengarry Glen Ross</a> (incidentally, Baldwins’ character in the film was not in the original <a href="https://en.wikipedia.org/wiki/David_Mamet">David Mamet</a> stage play, but I digress 🤓), but we <em>are</em> always iterating to improve your experience developing with Intercom.</p><p>So, as always, feel free to let us know you feedback if you think there are other improvements we can make — whether it’s to OAuth, the integration process or any other part of the developer journey. You can comment here, send us a message on our website, or even tweet us <a href="https://twitter.com/intercomdevs">@intercomdevs</a> 📣</p><p>Happy developing 👍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f69d51028fb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Using Intercom with AWS Lambda]]></title>
            <link>https://medium.com/@cathal.horan/tutorial-using-intercom-with-aws-lambda-af31f2d252d5?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/af31f2d252d5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[messenger]]></category>
            <category><![CDATA[intercomtips]]></category>
            <category><![CDATA[intercom]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Wed, 03 May 2017 13:53:29 GMT</pubDate>
            <atom:updated>2017-05-03T13:53:29.397Z</atom:updated>
            <content:encoded><![CDATA[<h4>A simple setup to message users based on custom events</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u1gOU0XzQjUlTrwP0K4i2w.png" /></figure><p>It’s tough trying to keep up with what’s cool in tech these days, but at the moment it seems the words “serverless event-driven microservices” will get you entrance into the all-exclusive underground tech clubs.</p><p>Trends aside, microservices do offer a powerful alternative to some everyday technical jobs. For example, rather than having a web server active 24/7 just to receive some webhook notifications, microservices such as AWS Lambda are uniquely suited to the job.</p><p>To demonstrate this in action, here’s a tutorial for implementing a simple microservice that responds to an <a href="https://developers.intercom.com/v2.0/reference#webhooks-and-notifications">Intercom webhook</a>.</p><p>At the end, you’ll have your own microservice that can send a message to your customers based on a custom event in Intercom.</p><h3>Unleash your creativity</h3><p>The broader goal of this tutorial is to show you how to integrate AWS Lambda with Intercom. The specific implementation here is not as important as understanding the general potential offered by something like Lambda.</p><p>The first time you use a new service, it can be tedious and frustrating to get started. There are new, service-specific steps and processes, which may be enough of a deterrent to prevent you from getting something working. By eliminating these initial roadblocks, we hope to free you up to customize things to suit your specific business — we’d love to hear about what you build!</p><h3>What we’re building in this example</h3><p>For our example we’re going to create a microservice for ‘TadQ Cabs’, our awesome (fictional) taxi service that’s going to beat Uber to be the next big thing 📈 <em>(Gold star if you can recognize how we came up with the name 🏆 Hint: Its related to the rumour about how they got the name for HAL 9000 in “2001: A Space Odyssey”?)</em></p><p>So, our competitive edge is going to be to using <a href="https://www.intercom.com/">Intercom</a> to message customers when they ‘TadQ’ a cab. Once a cab is TadQ’d (rolls off the tongue, doesn’t it?) you want to message the passenger to confirm their car and pickup point, and let them know who their driver is 🚕.</p><p>We’re just starting out, so we want to do this in as lightweight as possible. So, when a person TadQs a car, we trigger an <a href="https://developers.intercom.com/v2.0/reference#events">Intercom event</a> that then sends a webhook notification. As opposed to having a web server listening for this notification, you can instead send it to Lambda, which will then send a message to that Intercom customer to let them know their TadQ is on the way.</p><p><em>Genius! We already have a company slogan by the way: “A Tad Quicker than the competition” </em>😂 <em>I’ll be here all week, try the veal!</em></p><p>Before we start, there are a few things you need to know — bear with me, I’ll try to keep it quick:</p><h3>A 30 second overview of AWS Lambda</h3><p>I won’t go over Lambda in detail here, but if you want an in-depth explanation, try this <a href="https://blog.codeship.com/aws-lambda-introduction/">general overview</a>, this <a href="https://blogs.dxc.technology/2016/08/02/creating-your-own-lambda-function-using-node-js/">simple Lambda example</a> and this overview of <a href="https://cloudncode.blog/2017/03/02/best-practices-aws-lambda-function/">best practices</a>.</p><p>In short, Lambda is an event-driven service, meaning it responds to certain event triggers. There are many different triggers — they can be other services or external custom-defined events, for example. In this example, the trigger will be an Intercom <a href="https://developers.intercom.com/v2.0/reference#webhooks-and-notifications">webhook notification</a>.</p><p>Lambda only runs when it is triggered by one of these events — if there’s no event, Lambda isn’t active so isn’t costing you any money or maintenance issues.</p><p>By default, Lambda comes with some bare dependencies installed. But for custom dependencies such as Intercom, you’ll need to create these dependencies and upload them. This will allow you to create your own Lambda function to use.</p><p>If you’re just using other AWS services, you can just use Lambda without creating your own function. There’s a simple example <a href="https://medium.com/@tombray/getting-started-with-aws-lambda-node-js-904bc0bfb83">here</a> that’s worth looking at to better understand how Lambda works.</p><h3>What you need to get started</h3><p>To start this tutorial ,you need an <a href="https://aws.amazon.com/">AWS account</a> , <a href="https://developers.intercom.com/docs/docker-sdk-environments">docker installed</a> and an <a href="https://www.intercom.com/">Intercom</a> account (you can use a <a href="https://www.intercom.com/customer-intelligence">free Platform account</a> if you don’t already have an Intercom subscription). You’ll also need an<a href="https://app.intercom.com/developers/_/access-token"> Intercom access token</a> with extended scopes.</p><p>Once you have those we‘re going to go through the following steps:</p><ol><li><strong>Create the code for a Lambda function</strong></li><li><strong>Upload the example code and dependencies to create the new Lambda function</strong></li><li><strong>Use AWS API Gateway to create an API endpoint to accent a webhook POST notification</strong></li><li><strong>Create an Intercom event and webhook subscription</strong></li><li><strong>Test it and get it running</strong></li></ol><p>Remember, this is a test setup so should not be used in production. To allow you to get through this tutorial quickly, I’ve included example code you can use — you can later tweak and test this code to start implementing your own use cases.</p><p>Remember: AWS is not free, so anything you setup could cost you money — just be aware that this is an example setup, so treat it as such.</p><p>Right, let’s get into it!</p><h4>1. Create the code for a Lambda function</h4><p>To get started, run the Intercom Node Docker using the command on <a href="https://hub.docker.com/r/intercom/sdk-images/">Docker hub</a>. You can run the command to mount it to a local directory if you would like to store your code locally or use your own IDE. Otherwise, you need to use something like vim in the container itself.</p><p>Once you have the Docker container, you can run the following commands to download the example Lambda function code from the Intercom blog repo. An example of all the steps can be seen here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c0614a718d32f102f8f2f48189d97d4/href">https://medium.com/media/2c0614a718d32f102f8f2f48189d97d4/href</a></iframe><p>You need to install zip since it is not installed by default on the Docker container.</p><p><em>Technically, you don’t need to install the node Intercom client since it’s already installed in the Docker container, but I wanted to show the minimum amount of dependencies you actually need for the Lambda function, so figured it was easier than taking all of the dependencies from /node_modules.</em></p><h4>2. Create a Lambda function</h4><p>Now that you have your zipfile, you can upload this to create your Lambda function. Go to the Lambda service on your AWS console and click on “Create a Lambda function”, select the “Blank function” and don’t bother setting up any triggers for now.</p><p>You should now be on a page that looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_uvjGICofdv7ZUDU4EaZg.png" /><figcaption>Setting up your Lambda function</figcaption></figure><p>Fill in the information as outlined above, but remember to input put your own access token and admin ID for the environment variables:</p><ul><li><strong>admin_id:</strong> the Intercom teammate who the message will come from. You can get this ID by going to the <a href="https://app.intercom.io/a/apps/_/settings/teammates">teammates section</a> of your Intercom app settings and clicking on the teammate — their admin ID will be the number at the end of the URL</li><li><strong>intercom_at:</strong> Your Intercom access token, which you can get from your <a href="https://app.intercom.com/developers/_/access-token">Intercom developer dashboard</a> (you’ll need an extended token)</li></ul><p><strong>For the Lambda function handler and role section:<br></strong>This is where you choose the permissions for your Lambda function. The only service we really need access to is CloudWatch so that we can view the output logs for debugging, so we only need basic permissions.</p><p>If you don’t already have an existing role, simply create a custom role with basic Lambda permissions. See the Lambda permissions model <a href="http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html"><strong>page</strong></a> for more information. That page has info on the <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html">IAM</a> (the AWS service that allows you to specify permissions and roles) roles you can create to allow your Lambda function to read/write other AWS services. For now you should be fine with permissions to simply write the output to CloudWatch (i.e. ‘AWSLambdaBasicExecutionRole’<strong>)</strong> so you perform basic troubleshooting if needed.</p><p><strong>Timeout value:</strong><br>The last thing you need to set is the timeout value. It’s automatically set to 3 seconds, so you may want to increase this to 10 seconds for this example.</p><p>You can now create your function, and should see a page that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QMQ-Omv0-0gT97oho9ZCQ.png" /><figcaption>Your Lambda function</figcaption></figure><p>You can test the function now if you like, but it will fail because the Lambda function uses the event parameter to receive the data from the connecting service. We are expecting a webhook notification, so the current data passed through will not match that data structure.</p><p>However if you configure your test data (Actions-&gt;Configure test event) similar to the JSON described below, you should be able to send a message to your test user (if you don’t have a test user set up, you can create one using the interactive example at the bottom of <a href="https://developers.intercom.com/docs/interact-with-your-users">this guide</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8925f605df0df0c0fffbca37f3c1a3f3/href">https://medium.com/media/8925f605df0df0c0fffbca37f3c1a3f3/href</a></iframe><p>Once you input the user_id of your own test user (you can get a user’s ID from their <a href="https://docs.intercom.com/responding-to-users-and-visitors/respond-to-issues-quicker/get-context-fast-with-user-and-company-profiles">Intercom profile page</a>, in the left hand bar)<strong> </strong>you should be able to get your function working correctly — you can see the output in the Lambda console or you can click through to the relevant CloudWatch logs from the console.</p><p>This is a good time to check if you have the correct permissions to access these logs. If not, revisit the <a href="http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html">IAM permission settings</a> (see above) and see if you can add some more policy examples for CloudWatch to get access<strong>.</strong></p><p>Once you have it working, you’re almost there. We just need to make an API available and then we can test it for real.</p><p><em>Watch out uber …. TadQ is coming </em>🏎</p><h4>3. Let’s make an API</h4><p>Now that we have a Lambda function, we need to get our webhook to send data to it when we get a new TadQ request. The easiest way to do this is with <a href="https://aws.amazon.com/api-gateway/">AWS API Gateway</a>. With the AWS Gateway you can create a publicly-available API that Intercom can post to.</p><p>Start by navigating to the Gateway service and click on the ‘create a new API’ option. Next, you need to create a resource – this will be the name of your endpoint. I used ‘events’.</p><p>Then you need to tell the service what methods to associate with this resource. We just need a POST for now, so create a resource, select POST and select Lambda as an integration service. You can select your region and then you should be able to select the Lambda function you just created.</p><p>Don’t tick anything else – you want the Gateway to just send everything to Lambda.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*IZLGcce6RpESWD7y5TZWNA.png" /><figcaption>Setting up your API method</figcaption></figure><p>Click save and you should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGQOgLu-fSdCJ8ZBdd4OWQ.png" /><figcaption>Your API integrated with Lambda</figcaption></figure><p>To test the API you can click on “TEST” on the left side of the page above. then simply pop in the JSON we used to test the Lambda function earlier in the body. This should deliver a message to your user.</p><p><em>If you have any issues, try and follow the error messages in the console and make sure you didn’t miss any steps. Hopefully, since we have tried to keep it simple, it should work without much troubleshooting.</em></p><p>Once it’s working, click on“Actions &gt;Deploy API”. Choose a new stage, call it ‘test’ and then hit deploy. You should then see your stage with a link you can use to access your new microservice:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OB-lWwXKrLfN80rRLM3EtA.png" /><figcaption>TadQs new API</figcaption></figure><h4>4. Generate an Intercom event and webhook</h4><p>Now all that’s left is to create a webhook subscription for your TadQ event so that you can trigger a message when this event occurs.</p><p>First, lets’ test that the URL you got from your API works and that it can receive a POST. Your URL will be different depending on the region but it should mostly look like the following curl POST request (the api_test.json is just the example JSON used earlier):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96f4bbdbf0ec9bc0f4ddb3e3cc8da79f/href">https://medium.com/media/96f4bbdbf0ec9bc0f4ddb3e3cc8da79f/href</a></iframe><p>You should see the message being sent to your user. If not, you can check the API Gateway metric to see if it received an API request. You can also check the Lambda CloudWatch logs for output from your specific function. These will allow you to see where it failed if it did not work (note that a mistake I made initially was not adding the resource to the URL I copied from Gateway. In this case it is the ‘/events’ part of the URL. That took me some time to figure out, so hopefully I’ve saved you that pain 😠)</p><p>We are now ready to setup an event-based webhook notification. First, we need to create the event itself, as without this we have nothing to subscribe to. Simply submit a <a href="https://developers.intercom.com/v2.0/reference#event-metadata-types">new event</a> to Intercom. An example event body would look something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0aff4ef27d2baa81dbce6262c9fcac3c/href">https://medium.com/media/0aff4ef27d2baa81dbce6262c9fcac3c/href</a></iframe><p>The above event has metadata in it, which is optional but is convenient when you want to pass in extra custom data to use in something like a follow up message to the customer. To create this event simply submit it to the events endpoint:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2214a8c93dd82958f13850e70670f9b3/href">https://medium.com/media/2214a8c93dd82958f13850e70670f9b3/href</a></iframe><p>Now that the event is created, you can verify by checking the user to which the event belongs. You should see it in the right hand side of their Intercom profile (search and click on their name from <a href="https://app.intercom.io/a/apps/_/users/segments/active">the users section</a>).</p><p>Once it has been created, go to the <a href="https://app.intercom.com/developers/g1zkvebs/webhooks">webhooks section</a> of your Intercom developer dashboard. Create a new webhook, copy the URL you used in the curl test (the full URL including the resource endpoint), click on new events and select your new tadq_pick_up event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2WIW08_iISKm8GBhyNQAlg.png" /><figcaption>Create a webhook</figcaption></figure><p>One you have created the webhook, you can click the ping button to test that the URL is available. If this is successful then we are ready to get started with our brand new TadQ feature.</p><h4>5. Final step — get it running!</h4><p>Just run the same command that you did when you created the event. However, remember to change the “created_at” epoch timestamp. If you don’t,it will be viewed as the same event and no new notification will be created. You can simply increment it by one or check out this <a href="https://www.epochconverter.com/">timestamp generator</a> to ensure you are generating it in the correct format.</p><p>Hopefully, you will see the message delivered to your Intercom customer. Success 🎉</p><p>Once you get it working, you can start changing the code to test out different things with Lambda. We have used a basic setup here so there are plenty of things to mess around with. For example, we hardcoded the Lambda response to be HTTP 200 for now but you can obviously improve this by doing more work to check the response.</p><p>But the main goal here was to get you setup with Lambda using Intercom, which hopefully we’ve done! And to get TadQ up and running, of course.</p><p>Any problems, questions, or thoughts on the TadQ name😁 let us know in the comments or on Twitter <a href="https://twitter.com/intercomdevs">@intercomdevs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af31f2d252d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Translating your Intercom inbox with Stamplay and Google Translate]]></title>
            <link>https://medium.com/@cathal.horan/tutorial-translating-your-intercom-inbox-with-stamplay-and-google-translate-754dc585f4dc?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/754dc585f4dc</guid>
            <category><![CDATA[intercom]]></category>
            <category><![CDATA[google-translate]]></category>
            <category><![CDATA[intercomtips]]></category>
            <category><![CDATA[stamplay]]></category>
            <category><![CDATA[support]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 12:28:36 GMT</pubDate>
            <atom:updated>2017-03-23T13:18:55.553Z</atom:updated>
            <content:encoded><![CDATA[<h4>Provide support to your customers, whatever language they speak</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DaYSVfAcTRys-4QU6GV38g.png" /></figure><p>As your business grows, you may start to get enquiries about your product in languages that aren’t your native tongue. You might consider this a ‘champagne problem’ since it means your business is expanding into new territories 🍾 but it is a problem nonetheless.</p><p>You can of course default to a “Sorry, we don’t provide multi language support” response, but if you do want to try and provide support for these customers or prospects, you can use this tutorial to set up a translation integration inside Intercom using Stamplay and Google Translate, with minimal code required.</p><h4>What it does</h4><p>The integration we’ll be setting up in this tutorial recognises which language an incoming message or reply is in, and adds a translation as an internal note within the conversation so you can understand what the original message said.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*yJWf2JeCTT873qrOhXnS5w.gif" /></figure><p>You can then use Google Translate to craft a response, or at least have the context of what the customer was saying to give a helpful response in your own language.</p><h4>Let’s get started</h4><p>To use this tutorial, you’ll need to make sure you have the following:</p><ul><li>A <a href="https://editor.stamplay.com/register">Stamplay account </a>— a free account will let you implement this example</li><li>A free <a href="https://cloud.google.com/free/">Google Cloud Platform account</a> that will let you use the Google <a href="https://cloud.google.com/translate/docs/">Cloud Translate API</a> for free. You’ll need your Google API Key, which you can retrieve from the API Manager section after setting up your account</li></ul><h4>Some key concepts</h4><p>This tutorial involves using <a href="https://stamplay.com/">Stamplay</a>, a development platform that makes it easy to build with different APIs with very little code (and an Intercom <a href="https://developers.intercom.com/page/the-developer-program">Platform Partner</a>!)</p><p>Here are a few key Stamplay concepts we’ll refer to during the tutorial:</p><ul><li><strong>Workflows:</strong> A workflow is your chosen trigger and then a resultant action or series of actions. For example, in our case the Workflow is to translate a message. The trigger would be whenever a user starts or replies to a conversation. This triggers an action to translate a message and another action to update the Intercom conversation.</li><li><strong>Connectors:</strong> Stamplay has a host of APIs available, including <a href="https://developers.intercom.com/">Intercom’s</a>, called Connectors. This means you can just point and click on the relevant Connector to use it as an action or trigger. For our translation example, Intercom will be used as both a trigger (e.g. user replied) and an action (e.g. post translation as note in conversation).</li><li><strong>Code Blocks:</strong> For any APIs that are not already included as connectors, you can use Code Blocks. These are a really cool feature that allow you to execute more complicated actions. When I wrote up this example, Google Translate was not available as a connector so we’re using a Code Block for this tutorial. Stamplay have since added Google translate as a <a href="https://stamplay.com/integrations/google%20translate">Connector</a>🤘</li></ul><h4>Step 1: Create your Code Block</h4><p>We’re first going to call the Google Translate API so we can create our Code Block to include in the Workflow later.</p><p>Remember, you can use Stamplay’s Google Translate Connector now, but its handy to see how Code Blocks work. My favourite things about them are that they come with a lot of node <a href="https://canirequire.stamplayapp.com/">packages</a> already included and have an interactive test feature so you can test it before you include it in your Workflow.</p><p>You can use the code below in your Code Block — you can test and tweak it in the block until you’re happy 👍</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6df59e145a177de3d7cae11ab2bea6b0/href">https://medium.com/media/6df59e145a177de3d7cae11ab2bea6b0/href</a></iframe><h4>Step 2: Setup your trigger</h4><p>We need to create a new Workflow that is triggered when we get a new message or reply from a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWKaOV15slOSUiISrJrpjQ.png" /></figure><p>To do this simply go through the “Flows” section. Select Intercom as the connector, ‘User Replied’ as the action, authorize your account and then just save your flow. When you have this completed it should provide you with a callback URL .</p><p>You can then use this URL to configure an <a href="https://docs.intercom.com/integrations/webhooks">Intercom webhook</a>. Go to the webhooks section in your Intercom <a href="https://app.intercom.com/developers/_">developer dashboard</a> to set this up, adding the URL as the callback and select the relevant notifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nj8bJQz-ZThryN_pOQ9yQA.png" /></figure><h4>Step 3: Add in your Code Block</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgKGljiRwNuluAibOowE9A.png" /></figure><p>Now you can add in the Code Block that you created earlier. Simply add another action in your Workflow and this time search for “code block” when looking for a Connector.</p><p>Your ‘action’ should be to run it via a post and then you can configure your Code bBlock step with the message part parameter to translate.</p><h4>Step 4: Add a conditional check</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*weO-7Xxtd6l8tHft4PaF9Q.png" /></figure><p>You may not want to receive a translation step for all languages. For example, we will add a step here to check for conversations that are not in English (but you can input any language here). Only when that is true will we get a translation.</p><p>Select the condition option to add this part of the flow (you could also perform an extra check in the Code Block to not send the text to Google translate if it’s in English but for now we’ll keep it simple).</p><h4>Step 5: Add your translated note to the conversation</h4><p>Nearly there … just one final step to add the translated text to the conversation as a note.</p><p>Select an “IF TRUE” option as your next action. This will mean than the translated text will be added if our condition is true, i.e. not in English in this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6UasqxMIIRntxyGcaUrpSg.png" /></figure><h4>Finally, test it’s all working</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUTSsgRh_Lni-E3ghJeesQ.png" /></figure><p>All that’s left now is to test your new translation integration, making sure it adds the note with translation for your chosen conversations. If you see any errors, you can use the Stamplay dashboard to see where it failed. If you follow the above steps it should work as expected.</p><h4>Want more?</h4><p>Tools like Stamplay are powerful as they allow you to implement so many possible solutions with Intercom.</p><p>If you have ideas for more examples that would be useful — or you have one of your own — we’d love to hear them. Feel free to comment, message us at developers.intercom.com or tweet us <a href="https://twitter.com/intercomdevs">@intercomdevs</a>.</p><p><em>Find out more about Intercom’s API in </em><a href="https://developers.intercom.com/"><em>our Developer Hub</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=754dc585f4dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The future is algorithms, not code]]></title>
            <link>https://medium.com/hackernoon/the-future-is-algorithms-not-code-64cacca3b908?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/64cacca3b908</guid>
            <category><![CDATA[future-is-algorithmns]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[speaking-of-big-data]]></category>
            <category><![CDATA[algorithms-not-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Sun, 19 Mar 2017 20:38:48 GMT</pubDate>
            <atom:updated>2019-05-16T06:28:49.894Z</atom:updated>
            <content:encoded><![CDATA[<p>The current ‘big data’ era is not new. There have been other periods in human <a href="https://hackernoon.com/tagged/civilisation">civilisation</a> where we have been overwhelmed by data. By looking at these periods we can understand how a shift from <em>discrete</em> to <em>abstract</em> methods demonstrate why the emphasis should be on algorithms not code.</p><h3>Speaking of big data …</h3><p>If the entire span of human history was a day then we would only have started talking after 11:07PM. It would have been a quiet day 😁 But in the short time frame that followed we quickly amassed a wealth of knowledge and stories that we needed to pass on to other people. You can imagine a time, initially, when it was possible to pass on all knowledge through the form of dialogue from generation to generation, parent to child, teacher to student. The volume of knowledge we produced as a society, however, quickly increased to a point at which there was too much knowledge to pass on in the form of dialogue.</p><p>We needed to codify this information in another form to save and distribute it. Codifying this knowledge in the form of writing would have represented a significant technological shift for those societies. Indeed, the character of Socrates in Plato’s “Phaedrus” worried that this technological shift to writing and books was a much poorer medium than dialogue and would diminish our ability to develop true wisdom and knowledge. Needless to say that I don’t think Socrates would have been a fan of TV 📺🤔</p><p>The point is that a dialogue represents a discrete means to communicate information. You know the person you are talking to and there is a direct interaction between the people involved in the dialogue through argument and counter argument. A book, on the other hand, is an abstract means of communication in that there is no direct interaction between writer and reader. The writer cannot know who, how many, when or where their book will be read. We can have some idea of our audience and tailor the content to that but in most cases it would represent an abstract way to pass on knowledge or to learn new skills.</p><h3>The big data of isosceles triangles</h3><p>Another era of big data occurred when we moved from a simple form of calculations to the abstract form of theorems, symbols and algorithms we consider as mathematics today. The first recorded calculations took place in Mesopotamia around 2500 BC. The Mesopotamians needed to work out how many people a barn full of grain could feed.</p><p>The Mesopotamians were concerned with specifics. They had very clear instances of problems then needed to solve. These were discrete calculations since each one applied to one problem at one time. This is why many commentators do not consider this as an example of mathematics. This did not develop until much later, around 500BC in Ancient Greece, when the Pythagoreans (think early Gogglers 😉) started asking strange questions about things like triangles. For example, they wanted to know whether it was possible that the sides of a right angled isosceles triangle could all be whole numbers. (See, it sounds like a Google type interview questions doesn’t it?)</p><p>If you wanted to work this out in a discrete way you would, like the Mesopotamians, go through some specific examples to see if it was the case. However, this quickly gets cumbersome as the numbers start to increase. How many calculations would you need to go through to see whether this was true or false? (It’s false by the way, all the sides can’t be whole numbers). The difference with the isosceles triangle problem is that there are no specifics. We don’t know the size of the triangle or any of its sides. The size is potentially infinite. Once you start to apply reason to numbers you get mathematics. And once that happens you get big data. The Pythagorean way of thinking led to the more abstract nature of mathematics we see today where we use symbols and rules combined with reason to answer abstract questions of this sort.</p><p>You might be able to think of other examples of big data periods in human history, but for our purposes we can jump forward to the 20th century and look at how coding has risen to be seen as such an important part of the modern tech world. (If you do have other examples of periods of big data feel free let me know via @cathalhoran, it would be an interesting list).</p><h3>The rise of coding</h3><p>Coding or programming (let’s not split hairs about the difference here, thats a whole other post 👍) first came to prominence when people such as Grace Hopper worked on the Harvard Mark I computer in 1945. Before this, computers, if you could call them that, were simply calculating machines. During World War II for example, artillery guns required tables to be aimed properly. The tables were the results of differential equations which took into consideration hundreds of different factors such as distance, elevation, wind speeds, temperature, humidity and so on. Incidentally, the name computer comes from the term user to describe the woman who operated these machines during the war. They were know as “computers”. The operators would have to use punch cards and crank handles to solve the equations. It could take 170 people a month to create just one card.</p><p>Coding arose out of the need to find an easier way to carry out these calculations. If a way could be found to codify the instructions to tell the hardware what operations it need to perform then the manual operations could be eliminated. This would also allow for different instructions to be coded so that one piece of hardware could perform multiple different operations.</p><p>Does this seem similar to anything we discussed before? Whereas in Mesopotamia clay tables were used to perform calculations, coding was the new medium used in the mid 20th century. While it seems more advanced, this is still a discrete operation since it is working on specific calculations. It is just a more efficient way to perform these specific calculations. Coding was a way to eliminate the need for manual operators and enabled people to process and calculate even more data.</p><h3>Algorithms v code</h3><blockquote>Algorithms: A sequence of steps that describes an idea for solving a problem meeting the criteria of correctness and terminability. An abstract recipe for the calculation independent of implementation.</blockquote><blockquote>Code: A set of instructions for a computer. A concrete implementation of the calculation on a specific platform in a specific programming language.</blockquote><p>This new ability to codify instructions directly to computers enabled people to implement more complex sets of instructions in the form of algorithms. Algorithms have been around for much longer than the invention of coding. The Muslim mathematician Al-Khawarizm described algorithms for solving linear and quadratic equations around 820AD. The word algorithm comes from the Latinization of his name to “Algoritmi”, and the term “algebra” comes from “al-jabr”, a name for one of the operations Al-Khawarizm used to solve quadratic equations. Algorithms are a finite number of calculations or instructions that, when implemented, will yield a result. As we have seen, code is a way to provide instructions directly to a computer. It is this aspect which means it is well suited to implementing algorithms, which are, in essence, just a series of different operations to be performed in a certain order.</p><p>As with earlier periods of big data, the amount of information we were working with increased. Advances in coding, in terms of design and usage, when combined with Moore’s law resulted in performance improvements that enabled us to deal with the increasing digitisation of our world. You could still write code to query a database in order to find a list of related resources. The discrete nature of the operation was maintained since humans were still writing the code to tell the hardware what operations to perform. While the operations became more and more complex it was still the human codifying instructions. But algorithms had already started to show their potential to create a new era of abstraction.</p><h3>The rise of the algorithm</h3><p>In this way we can see that algorithms are very different from code. You can implement algorithms via code. And, it is true, that the way an algorithm is implemented in code can impact its performance. Using a binary heap, for example, as opposed to sorting a different data structure, is more efficient when you want to find the smallest or largest element in a sequence. But you do not need to be able to code to create an algorithm any more than you need to know how to read music to write a song.</p><p>And while everyone knows about the magic of Moore’s law to engender the performance improvements we need to drive our digital economy, few know that in many areas algorithms generate more performance improvements than any hardware gains. Indeed, a 2010 Federal report noted that algorithmic improvements have resulted in significant gains in areas such as speech recognition, natural language processing and logistics.</p><blockquote>“Even more remarkable — and even less widely understood — is that in many areas, performance gains due to improvements in algorithms have vastly exceeded even the dramatic performance gains due to increased processor speed.” — Report to the President and Congress: Designing a digital future</blockquote><h3>Abstract algorithms</h3><p>The amount of data we have available to us now means that we can no longer think in discrete terms. This is what big data forces us to do. It forces us to take a step back, an abstract step back to find a way to cope with the tidal wave of data flooding our systems. Traditionally you would write code to search your data given a certain pattern or set of parameter. For example, you may want to search your database of customer for any customers who purchased more than 2 items and spent over €30 in the last two weeks. You might want to reach out to these people with certain offers. You are looking for the data that matches this pattern. With big data it’s the opposite, you have so much data you are looking for patterns that match the data.</p><p>Think about that. There is so much data humans cannot find the patterns. You have to take another step back. This is the abstract step where algorithms enable to us to find patterns via clustering, classification, machine <a href="https://hackernoon.com/tagged/learning">learning</a> and any other number of new techniques underpinned, not by code, but by algorithms. This new step is needed to find the patterns you or I cannot see. Like the spectrum of light where there are wavelengths which the human eye cannot see, there are patterns we cannot see beyond certain volumes of data. The volume over which we cannot see patterns is big data.</p><p>This abstract algorithmic step goes even further. Not only will it search for a patterns but it will also create the code we need to do this. In his book “The Master Algorithm” Pedro Domingos describes how “learner algorithms” can be used to create new algorithms which in turn can write the code we need, “with machine learning, computers write their own programs, so we don’t have to”. To achieve this we need to better understand how these algorithms work and how to tailor them to suit our needs. Otherwise we will be unable to fully unlock the potential of this abstract transition</p><blockquote>“The Industrial Revolution automated manual work and the Information Revolution did the same for mental work, but machine learning automates automation itself. Without it, programmers become the bottleneck holding up progress. With it the pace of progress picks up” — Pedro Domingos, The Master Algorithm</blockquote><h3>Thinking in algorithms</h3><p>We will still need programmers no matter what form the discrete to abstract transition may take. That is not the point. It is not to imply that coding is not important or that there are no improvements that better coding can realise. Instead the point is that we need to start thinking about algorithms. They are not just for mathematicians or academics. There are algorithms all around us and you don’t need to know how to code to use them or understand them. Right now there are people coming up with new algorithms by applying evolutionary techniques to the vast amounts of big data via <a href="https://en.wikipedia.org/wiki/Genetic_programming">genetic programming</a> to find optimisations and improvement in different fields. People have even created better optimisation techniques by looking at how metal cools and creating an algorithm to model that (it is called <a href="https://en.wikipedia.org/wiki/Simulated_annealing">simulated annealing</a> and its a great example of the different ways we can start thinking about algorithms, check it out 👍).</p><p>The current rise of coding as a key skill of the new digital economy, akin to learning to read, has obscured our view of algorithms. Algorithms are increasingly part of our everyday lives, from recommending our films to filtering our news and finding our partners. We need to better understand them to better understand, and control, our own futures.</p><blockquote><a href="http://bit.ly/Hackernoon">Hacker Noon</a> is how hackers start their afternoons. We’re a part of the <a href="http://bit.ly/atAMIatAMI">@AMI</a>family. We are now <a href="http://bit.ly/hackernoonsubmission">accepting submissions</a> and happy to <a href="/service/mailto:partners@amipublications.com">discuss advertising &amp; sponsorship</a> opportunities.</blockquote><blockquote>To learn more, <a href="https://goo.gl/4ofytp">read our about page</a>, <a href="http://bit.ly/HackernoonFB">like/message us on Facebook</a>, or simply, <a href="https://goo.gl/k7XYbx">tweet/DM @HackerNoon.</a></blockquote><blockquote>If you enjoyed this story, we recommend reading our <a href="http://bit.ly/hackernoonlatestt">latest tech stories</a> and <a href="https://hackernoon.com/trending">trending tech stories</a>. Until next time, don’t take the realities of the world for granted!</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64cacca3b908" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/the-future-is-algorithms-not-code-64cacca3b908">The future is algorithms, not code</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘More’ isn’t always better]]></title>
            <link>https://medium.com/@cathal.horan/more-isn-t-always-better-49357b74be54?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/49357b74be54</guid>
            <category><![CDATA[intercom-updates]]></category>
            <category><![CDATA[developer-support]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[intercomtips]]></category>
            <category><![CDATA[content-developers]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Thu, 02 Mar 2017 12:16:10 GMT</pubDate>
            <atom:updated>2017-03-02T12:16:43.951Z</atom:updated>
            <content:encoded><![CDATA[<h4>And other lessons from a year of creating developer content</h4><p>The developer support team here at Intercom is nearly a year old now, but in many ways we’re just getting started.</p><p>When the team was setup nearly a year ago, the main content on the developer hub was a basic API reference. It seemed a little lonely 😢</p><p>Over the past year we’ve focused on expanding the content in our <a href="https://developers.intercom.com/docs/welcome">Developer Hub</a> to make it easier to integrate with and develop on Intercom. Through this process we’ve learned a thing or two about writing developer content that we wanted to share, to help others creating this kind of content.</p><h4>☝️ Lesson 1: More is not always better</h4><p>At first, when we just had the API reference and our SDKs, creating more content clearly had benefits for developers. While what we had was useful, it provided little context; the reference was a definition of the API endpoint models and the SDKs had examples of basic code usage in the GitHub repos, but there was little else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6TAToj67s8FGj5SUMHb34Q.png" /><figcaption>Our first API reference, back in 2015</figcaption></figure><p>This usually meant that our support team had to provide the extra context that a developer needed. So, our first job was to try and provide context to these existing sources.</p><p>We started by creating a <a href="https://developers.intercom.com/docs/onboarding-data-series">tutorial series</a> that went through some of the key parts of the API and enabled developers to create a customised CSV importer script. Over time we built on this by adding a new <a href="https://developers.intercom.com/docs/switching-from-api-keys-1">authorization</a> section, <a href="https://developers.intercom.com/docs/js-installation">content</a> on how to install and use our JavaScript API and Messenger, and guides <a href="https://developers.intercom.com/docs/integration-setup-guide">on integrating</a> with Intercom.</p><p>As well as creating new content, we also migrated and updated existing content from our <a href="https://developers.intercom.com/docs/intercom-sdks">SDKs</a>, including mobile SDKs, from GitHub to the Developer Hub so it all lived in one place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oh6A8jkUkoUmlGjGWBM4kA.png" /><figcaption>developers.intercom.com as it is now</figcaption></figure><p>This new variety and growing quantity of content is clearly useful for developers, but after a certain point we’ve found there are diminishing returns. More is not always better; you can only read through so many examples or descriptions of a topic. Adding more and more makes the content ultimately more overwhelming and less likely to be read.</p><p>That leads us on to lesson number two: developer content doesn’t necessarily mean more documentation.</p><h4>☝️Lesson 2: Content does not have to be docs</h4><p>“Let’s update the docs!” “We have great docs.” “We need a doc for that!” …. When you’re working with developer content, it’s hard not to become ‘the docs person’. No engineer wants to be just ‘the docs person’.</p><p>It’s easy to think of docs as the answer to many issues, but docs are just one part of the whole picture — maybe we don’t need a doc, maybe we need something else.</p><p>When thinking about how we could make installing the Messenger easier, we didn’t just create more docs for people to read. Instead, we built a whole suite of <a href="https://developers.intercom.com/docs/javascript-interactive-example">interactive tools</a> for our Messenger and JavaScript API to let developers learn by doing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1brYSBFN500Ms2MhPPEXg.png" /><figcaption>An interactive <a href="http://codepen.io/intercom/pen/BQjNmx">example app</a> in CodePen</figcaption></figure><p>Similarly, in place of more docs about how to use our SDKs, we created <a href="https://developers.intercom.com/docs/docker-sdk-environments">Docker</a> containers that setup the environment for you and let you get coding more quickly. We’ve also started writing <a href="https://medium.com/intercom-developers/how-to-run-pain-free-bulk-updates-bafda3ba4392#.nuk200eta">blog posts</a> with fully-worked practical examples instead of static docs.</p><p>When you’re creating different types of content like this, it’s essential to have a clear understanding of what job each type of content is fulfilling, so you can decide what type to use each time.</p><h4>☝️Lesson 3: One content type does not fit all</h4><p>Initially, we were focused on just getting more — and more types — of content out there and experimenting to see what worked. We learnt from this that each content type served a different purpose or audience. For example, we found that the API reference was the first point of call for developers familiar with Intercom who already know exactly what they want and don’t need additional context or intros (“Just the facts ma’am!”).</p><p>Others want more context or worked examples, and some want tutorials and interactive tools so they can learn by doing rather than reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*NgldrLDEZO8OCanHa7pBhA.png" /></figure><p>These aren’t distinct groups of people; developers switch between these different needs at different times. It’s natural to have more need for context and examples to help define a use case when you first start with an API. If your content is doing it’s job, though, you should find that over time developers need less and less context and examples, eventually just being able to use the API reference when trying something new. Your aim should be to make it as quick and easy as possible for them to get to what they need.</p><p>Once we began to understand these patterns, we realised the most valuable lesson of all: whilst we’ve made great progress, we’re just getting started.</p><h4>☝️Lesson 4: We’re just getting started</h4><p>After growing the amount and types of content in the Developer hub so quickly over the last year, our plan now is to focus on structure.</p><p>We want to make it easier to find what you’re looking for, and to make the separation between the different types of content clearer.</p><p>Whilst we’re proud of what we’ve created over the past year, we know there is plenty more to do. We’re currently working on a project to restructure our content and make it easier to navigate, so you can find what you need quickly. We’ll share more on that soon!</p><p>In the meantime, if you have any thoughts, feedback, criticisms, praise or just want to say hi, let us know your thoughts below or tweet us <a href="https://twitter.com/intercomdevs">@intercomdevs</a> 👋</p><p><em>Visit </em><a href="https://developers.intercom.com/"><em>developers.intercom.com</em></a><em> to learn more about the Intercom API</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DytPB-q1vl9tuPIkP9C7kg.gif" /><figcaption>If you liked this post, please give it a recommend by clicking the heart 😀</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49357b74be54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Improvements to our SDK Docker images]]></title>
            <link>https://medium.com/@cathal.horan/improvements-to-our-sdk-docker-images-def236257ee1?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/def236257ee1</guid>
            <category><![CDATA[intercom-updates]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Tue, 14 Feb 2017 16:01:58 GMT</pubDate>
            <atom:updated>2017-02-14T16:06:47.492Z</atom:updated>
            <content:encoded><![CDATA[<h4>Making it easier to interact with the Intercom API</h4><p>Back in December, we released our <a href="https://medium.com/intercom-developers/new-docker-images-for-intercom-sdks-835810cc4ba1#.e57682lxx">Intercom SDK Docker</a> images to make it easier to interact with our APIs and improve the overall experience of developing with Intercom. We released them in beta as we wanted to see how useful they’d be for making tasks such as setting up environments or debugging issues easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*ZTkj8Y_cTT9J-v8EYxZXOw.png" /></figure><h3>Your time, your business</h3><p>We released these Docker images to help eliminate some of the steps you need to take to work with our SDKs. We’re always looking for ways to make it as quick and easy as possible to integrate with and use Intercom, so that you can focus more of your time on other tasks. Your time, your code, your business.</p><p>(That’s also why we recently made it easier to find and use our developer tools by <a href="https://medium.com/intercom-developers/introducing-the-new-developer-tools-dashboard-f79aec0656ba#.gu3pgdpyy">launching a new developer hub</a>, and why we designed new interactive tools to help you <a href="https://developers.intercom.com/docs/basic-javascript#section-interactive-install-example">install</a>, <a href="https://developers.intercom.com/docs/configuration#section-interactive-configuration-example">configure</a> and <a href="https://developers.intercom.com/docs/configuration#section-interactive-configuration-example">use</a> the Intercom messenger!)</p><p>However, it can be difficult to know in advance which tools will be most helpful so we’ve been excited to see the images being used and to get your feedback on what more we can do to improve them. Like launching a new product, it is ultimately up to your users and consumers to decide whether or not is is a success 👌</p><h3>Two new updates</h3><p>When we <a href="https://medium.com/intercom-developers/new-docker-images-for-intercom-sdks-835810cc4ba1#.7rfdpvpuz">initially released</a> the Docker images we suggested some ways in which they could be used — primarily getting set up and troubleshooting.</p><p>We’ve been pleased to see many of you using them in different ways and have taken on your feedback about how they can be improved to more easily allow for these use cases.</p><p>We’ve made two updates based on that feedback:</p><h4>1. Our Dockerfiles are now public for you to use</h4><p>We’ve made the Intercom Dockerfiles for the SDKs <a href="https://github.com/intercom/docker-sdk">publicly available</a>, so you can easily suggest changes via GitHub pull requests or just use it locally if you want to customize your own Docker image.</p><p>Our aim is to keep the Dockerfiles as simple as possible, but please do keep the suggestions coming so we can continue improving them for you.</p><h4>2. You can now use your own IDE and push to GitHub easily</h4><p>The main feedback we received, from both internal and external developers, is that you’d like to use your own IDEs (integrated development environments), be able to manage your code locally and push to GitHub easily. While most of this could be accomplished via the original Docker setup, it wasn’t particularly easy so we’ve worked on that.</p><p>First we streamlined our Dockerfiles s0 they all follow a similar layout to make it easier to make updates. Then we made changes so that you can optionally mount a local drive to be used with the Docker container. This would, for example, allow you to mount your local code into a clean environment within the container and do all your development within that environment.</p><p>After you’re finished, all that would remain is your code. No new libraries and installations needed on your local environment. No extra setup steps 🎉</p><p>We’ve walked through an example of setting this up below so you can try it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*sz5X5wL7sqaewg1cs0_QuA.png" /></figure><h4>Let’s try it</h4><p>You’ll need to have Docker installed to walk through this example — if you haven’t already, please follow the steps <a href="https://developers.intercom.com/docs/installing-docker">here</a>.</p><p>This example uses the <a href="https://developers.intercom.com/docs/intercom-ruby-sdk">Intercom Ruby SDK</a> — you’ll want to download it in case you want to suggest a change to the SDK.</p><p>Previously, you’d need to ensure you have the correct Ruby version and set up your environment to use RSpec and other requirements. Now, you just need to mount your local directory when you run the Docker command.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c99beafad0eb970365d3ad2332a47c8/href">https://medium.com/media/9c99beafad0eb970365d3ad2332a47c8/href</a></iframe><p>Then, in your container you’ll see the file in the ‘mount_dir’.</p><p>Note that you need to mount it in the ‘mount_dir’ directory, since, if you use another directory your local directory will override the container directory if it exists. The ‘mount_dir’ location is empty and was created to allow you to mount your local directory to this location.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e409e0dff2b197358b363a7e1d2c9a9/href">https://medium.com/media/4e409e0dff2b197358b363a7e1d2c9a9/href</a></iframe><p>You can then use your local IDE for your development and push to GitHub as normal.</p><p>When you remove your container, you’ll still keep all your local code. Any changes made to your local dir will be synced to your container and vice versa.</p><p>Also, remember that it does not have to be the SDK that you work on locally — it can be any code that you want to use with Intercom.</p><h3>Let us know your thoughts</h3><p>As always, we’ll continue to make improvements based on your feedback and we’d love to hear how you’re using the Docker images — especially if it’s a use case we haven’t covered here.</p><p>Plus, now that the Dockerfiles are public, feel free to use that repo to suggest changes as you would with our SDKs. We’ll keep you updated here whenever we make improvements.</p><p>Have fun 😀</p><p><em>Take a look at our </em><a href="https://developers.intercom.com/"><em>Developer Hub</em></a><em> if you want to learn more about what you can do with the Intercom API.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=def236257ee1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 handy updates to our Bulk APIs]]></title>
            <link>https://medium.com/@cathal.horan/3-handy-updates-to-our-bulk-apis-5606768848e0?source=rss-54487668927------2</link>
            <guid isPermaLink="false">https://medium.com/p/5606768848e0</guid>
            <category><![CDATA[intercom]]></category>
            <category><![CDATA[intercom-updates]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[bulk-apis]]></category>
            <dc:creator><![CDATA[Cathal Horan]]></dc:creator>
            <pubDate>Thu, 22 Dec 2016 11:20:53 GMT</pubDate>
            <atom:updated>2016-12-22T11:29:07.353Z</atom:updated>
            <content:encoded><![CDATA[<h4>You asked, we listened👂</h4><p>Earlier this week we posted <a href="https://medium.com/intercom-developers/what-we-shipped-for-you-in-2016-29f70dcfb2ba#.bcw4xnkph">a round up of all the updates</a> we’ve made this year, one of which was improvements to our Bulk API.</p><p>This post goes into a bit more detail about 3 recent updates we’ve made:</p><ol><li>Significant improvements to processing times</li><li>You can now add and update Leads in bulk</li><li>We’ve removed the need to worry about the processing order for Events and Users</li></ol><h4>1. Bulk jobs are now faster 🏃🏻</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OolHe1pFbt5-8PDR15axHA.png" /></figure><p>We’ve spent much time over the past few months improving the speed of our bulk processing, so we hope that you’re finding your jobs being completed much faster overall.</p><p>If you’re interested in knowing more about how the process works, you can check out our updated <a href="https://developers.intercom.com/reference">Bulk docs</a> and our new <a href="https://developers.intercom.com/page/bulk-api-overview">overview/FAQ page</a> which includes a flow diagram illustrating the process. We’ll continue adding to this over time, so do let us know if you have any questions not covered here.</p><h4>2. You can now add and update Leads in bulk</h4><p>Previously, you could only perform bulk operations for Users and Events, but we listened to your feedback and have made it possible to <a href="https://developers.intercom.com/reference#bulk-lead-ops">add and update Leads</a> in bulk.</p><p>This isn’t yet supported in our SDKs (watch this space!) but you can use it in its <a href="https://developers.intercom.com/reference#bulk-lead-ops">raw</a> form with you favourite SDK. Below is an example of how to do that, using the Ruby SDK to demonstrate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9T0Xn5S0kir-MiHum5uE-g.png" /><figcaption>Take a look at our docs at developers.intercom.com for more info on our Bulk APIs</figcaption></figure><h4>Example: Updating Leads in bulk with the Ruby SDK</h4><p>This example reuses most of the code from a <a href="https://medium.com/intercom-developers/how-to-run-pain-free-bulk-updates-bafda3ba4392#.b0jbodwgv">previous post</a> where we bulk updated users. The only difference now is that we will create the bulk data object and then pass that with a POST request:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86e1140b34c10c2d1b835252fa623934/href">https://medium.com/media/86e1140b34c10c2d1b835252fa623934/href</a></iframe><p>Let’s say you want to check which of your leads has contact information. You can create a custom attribute called “contact info” which will be ‘true’ when a lead has either an email or phone number associated with it. You can check out the full code <a href="https://github.com/choran/intercom-dev-blog/blob/master/bulk_leads/bulk_leads.rb">here</a>.</p><p>As always, if you have any issues getting this setup with the SDKs let us know, we’re always happy to help 😀</p><h3>3. Improvements to ordering of bulk operations</h3><p>And the final little treat for you before the holidays…</p><p>We heard your concerns about the order of bulk jobs — namely that they aren’t necessarily processed in the order you submit them, so an event operation could fail because it was processed before a user is created by a separate operation.</p><p>Now, if no user exists when a bulk event operation is processed we create a user template. If a user create operation is received after the event operation, it will simply update this ‘template’ user with all the relevant details and still associate the events with that user.</p><p>This means you don’t have to worry about the ordering of these type of bulk jobs anymore 🎉</p><p>Thanks to everyone who gave us feedback that led to these changes — we always love hearing from you and hope these updates make your work easier.</p><p><em>If you’re interested in building on the Intercom platform, take a look at our </em><a href="https://developers.intercom.com/"><em>Developer Hub</em></a><em> to get started.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DytPB-q1vl9tuPIkP9C7kg.gif" /><figcaption>If you enjoyed this post, please hit the ‘Like’ button below 😀</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5606768848e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>