> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/integration/intercom.md).

# Intercom

## Overview

The following steps will help you integrate Zipy session url with Intercom. This will help your support teams to understand user problems within tickets with Zipy session url so they can see what the users were doing when they reported a given issue in Intercom. This will speed up time to resolution by your support team significantly without doing multiple back and forth with the customer. The same Zipy session url can be shared with development teams to report issues. &#x20;

### Step &#x31;**:** Adding Zipy Session URL to Intercom User Profile.&#x20;

To begin, follow the steps below:

1. Open your Intercom-enabled application.
2. Add the following code snippet to your application:

```javascript
const zipySessionUrl = window.zipy.getCurrentSessionURL();

Intercom('update', {
  zipy_session_url: zipySessionUrl,
});
```

By executing this code, the Zipy session URL will be associated with the corresponding user/lead profile in Intercom.

### Step 2: Displaying Zipy Session URL in Intercom Conversations&#x20;

Once the Zipy session URL is added to the user profile, it will appear in the 'USER DATA' or 'LEAD DATA' (if it's a lead) section during a conversation within Intercom.

<figure><img src="/files/ifZEFvNyV9HWHIkkP0hL" alt=""><figcaption></figcaption></figure>

By following these steps, you will successfully integrate Zipy with Intercom, providing you with valuable session information to enhance customer support and improve user experience.

### Example Use Case&#x20;

**Sending Zipy Session URL to Intercom during a Chat Interaction.**&#x20;

1. Ensure that both Intercom and Zipy are installed in your application.
2. Implement the following code in your frontend application where Intercom Chat is enabled.

```javascript
Intercom('onShow', async function() {
  const zipySessionUrl = await getCurrentZipySessionURL();

  Intercom('update', {
    zipy_session_url: zipySessionUrl,
  });
});
```

In this scenario, when the user/lead  opens the Intercom Chat, the Zipy session URL will be retrieved and sent to Intercom as one of the parameters. This session url can be accessed within Intercom visitor chat information as part of user/lead data.&#x20;

For more information on `Intercom('onShow')`, please refer to this [link](https://developers.intercom.com/installing-intercom/docs/intercom-javascript#intercomonshow).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zipy.ai/integration/intercom.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
