Giter Site home page Giter Site logo

fullstory-intercom's Introduction

Intercom chat webhook integration with FullStory

A demonstration of how FullStory sessions can be linked to customer support events via Intercom's webhook API and FullStory's server events API.

Intercom_flow

Scenario

  1. A customer reaches out to a support agent via the Intercom chat widget.
  2. Once the customer's issue has been resolved, the support agent closes out the conversation.
  3. Depending on how much back and forth there is between the customer and support agent, the customer may see a rating widget in the chat.
  4. Web hook events are triggered from Intercom both when the chat is closed by the agent and when the customer rates the conversation.
  5. An AWS Lambda function + API gateway endpoint is subscribed to these two web hook events in Intercom.
  6. The AWS Lambda function creates custom events via the FullStory API that links the chat events to the session replay where the chat occurred.

Using Intercom Conversation Data in FullStory

Capturing Intercom conversation events

Once everything is configured, the following events can be sent to FullStory using this demo app:

  • Intercom Conversation Opened
  • Intercom Conversation Closed
  • Intercom Conversation Rated

You'll need to play the part of both the customer and the Customer Support agent. You'll receive messages from yourself in your Intercom Inbox. When you open the chat widget (playing the part of the user) a Intercom Conversation Opened event is attached to the session. When you close the conversation in Intercom (playing the part of the agent) a Intercom Conversation Closed event is attached to the session. If a follow-up rating request is sent to the user via chat, a Intercom Conversation Rated event is attached to the session once the user rates the conversation. Head's up that the rating request is only triggered under certain conditions. Those conditions can be found here.

Anaylizing Intercom conversation data

Funnels

fs_funnel
Funnels can track drop off in customer service conversations

Segments

fs_segment
You can find sessions for users who completed a chat or users who rated a chat poorly (or well!)

Alerts

fs_segment_alert
Alerts can be configured to fire based off of the rate that users are providing negative survey feedback

Demo Setup

Prerequisites

There are a few things you'll need to do before running this example yourself:

FullStory Configuration

The browser and server APIs used for this demo are pre-realease APIs, currently deployed to FullStory's staging environment. At this point in time, only FullStorians can access these APIs.

  • Use the v2 snippet to get access the pre-release v2beta browser API.
  • An example of the v2 snippet, as well as a placeholder for your staging window['_fs_org'] value can be found in the <head> of the homepage.

AWS Configuration

  • Once you've run the cdk bootstrap command to get the AWS CDK setup for use on your workstation, run npm i in the middleware directory.
  • To deploy the AWS Lambda function + API Gateway that will be used to receive Intercom webhooks, run npm run deploy in the middleware directory.
  • Take note of the "Outputs" section in the terminal once the deploy command has finished running. This will be used for your web hook configruation in Intercom:
✨  Deployment time: 1.61s

Outputs:
IntercomLambdaMiddlewareStack.{long resource id omitted} = https://{the API URL generated for you}/prod/

Intercom Configuration

Intercom Messenger (browser chat widget)

  • Go through the motions of installing the Intercom JavaScript code per this article.
  • You'll see an app_id value that you can put into the placeholder found in the <head> of the homepage.

Web hook subscriptions

  • Supscribe to two topics using the web hook URL created during AWS Configuration:
    • conversation.admin.closed
    • conversation.rating.added
  • Make sure to add "intercom" to the URL path output from the AWS CDK when configuring your web hook endpoint URL:
https://{the API URL generated for you}/prod/intercom
  • Details about configuring web hooks and subscribing to topics can be found here.

fullstory-intercom's People

Contributors

patrick-fs avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.