> For the complete documentation index, see [llms.txt](https://help.leadboxer.com/leadboxer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.leadboxer.com/leadboxer/integrations/other/how-to-get-leadboxer-data-into-intercom.md).

# How to get LeadBoxer data into Intercom

### LeadBoxer and Intercom

If you are using Intercom, and you want to have some of the data from a LeadBoxer profile added to your intercom leads or users, you can do this by using some javascript to send any LeadBoxer property to Intercom as 'custom data'.

For example, you might want to add the Company name or a tag that that you have set using LeadBoxer, or even a the link to the full LeadBoxer profile, aka the LeadCard.

### How to do it?

Assuming you have both the LeadBoxer and Intercom javascript /pixel installed:

1. Read the LeadBoxer lead ID from the cookie with `ot_uid()`. (The cookie is set on the first view, so this will fail on the first pageview.)
2. Build the link to the LeadCard from the lead ID and your dataset ID. This needs no API call.
3. Send the data to Intercom using their [update](https://developers.intercom.com/installing-intercom/web/methods#intercomupdate) function.

```html
<!-- Load Intercom -->
<script>
  var APP_ID = "YOUR APP ID";    // <-- make sure you update this
  window.intercomSettings = {
    app_id: APP_ID
  };
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/APP_ID';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>

<!-- Load LeadBoxer -->
<script src="//script.leadboxer.com/?dataset=yourDatasetId"></script>

<script type="text/javascript">
setTimeout(function () {
  var leadId = ot_uid();         // LeadBoxer lead ID of the current visitor
  var site = "yourDatasetId";    // your dataset ID

  // Link to the LeadCard in LeadBoxer
  var leadcard_url = "https://app.leadboxer.com?q=" + leadId + "&site=" + site;

  // Send data to Intercom
  Intercom('update', {"leadcard": leadcard_url});
}, 3000);
</script>
```

### Other LeadBoxer properties

To send other LeadBoxer data to Intercom, such as the company name or lead tags, get it from the LeadBoxer API with [Retrieve Lead Details](https://developers.leadboxer.com/reference) (`GET /v1/leads/{leadId}`). The API needs your API key, so make this call from your server and never from your website's JavaScript. See [How to get (raw) lead data](/leadboxer/capture-website-and-email/website/how-to-get-raw-lead-data.md) for a complete example.

Still need help? [Contact us](mailto:hello@leadboxer.com)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.leadboxer.com/leadboxer/integrations/other/how-to-get-leadboxer-data-into-intercom.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
