> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 6sense

> Use 6sense company data, predictive scores, and segments as targeting conditions in Kameleoon experiments and personalizations.

With the 6sense integrations, you can deliver personalized experiences based on 6Sense data, including company information, user scoring, or any segment.

**Key benefits:**

* Utilize any 6Sense data, including predictive scores, in Kameleoon to target your visitors.
* Filter and breakdown any Kameleoon reports by using 6sense data.

[Learn more about 6sense](https://6sense.com/)

## Use 6sense data attributes as targeting condition in a Kameleoon segment

To use any 6sense attribute in a campaign (experiment or personalization) as a targeting condition, follow these steps.

### Fetching and using 6Sense segment data in Kameleoon

1. Create a custom data and name it **"6sense Segment ID"**.
2. Choose type **ListOf**, scope **Visit**, and acquisition method **Custom JavaScript code**.
3. Paste this code:

```javascript theme={null}
const sixSenseData = window.localStorage.getItem('_6senseCompanyDetails');
if(!sixSenseData) return;
return {value: JSON.parse(sixSenseData).segments.ids, overwrite: true};
```

<Frame>
  ![](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/integrations/as-a-source/automation/6sense/Capture-décran-2022-12-22-à-11.40.01.png)
</Frame>

**IF** you prefer to use segment names in the Kameleoon Segment builder to target your visitors with a Kameleoon campaign, you can use this code instead:

```javascript theme={null}
const sixSenseData = window.localStorage.getItem('_6senseCompanyDetails');  
if(!sixSenseData) return;  
return {value: JSON.parse(sixSenseData).segments.ids, overwrite: true};
```

4. Click **Validate**.

Once you set up the custom data for the 6sense segments, you can build segments within the Kameleoon segment builder. Choose the custom data and the values you want to target. For instance, if you want to target visitors with the segment IDs `144075` and `206863`, drag and drop the custom data "6sense Segment ID" and use the operator **matches the regular expression** with the value `144075`|`206863`.

### Fetching and using 6Sense company attributes in Kameleoon

Create a custom data for each attribute you would like to use in Kameleoon. Let's say you want to target visitors by industry. You can create a custom data called "6sense Company Industry".

1. Choose type **Single**, scope **Visit**, and acquisition method **Custom JavaScript code**.
2. Paste this code:

```javascript theme={null}
const sixSenseData = window.localStorage.getItem('_6senseCompanyDetails');  
if(!sixSenseData) return;  
return {value: JSON.parse(sixSenseData).company.industry, overwrite: true};
```

3. Click **Validate**.

Once you set up the custom data for the 6Sense company industry, you can build segments within the Kameleoon segment builder by choosing the custom data and the name of the industry you want to target. For instance, if you want to target visitors in the **Software and Technology** industry, drag and drop the custom data "6sense Company Industry" and use the operator **contains** with the value **Software and Technology**. Please note that values are case-sensitive.

You can create as many custom data as you want depending on your use cases. To know more about all available data, get in touch with the 6sense support team.

### Fetching and using 6Sense confidence attribute in Kameleoon

The value of this attribute indicates how confident 6sense is that the data is accurate for the current visitor, and may be either **Low**, **Moderate**, **High** or **Very High**.

1. Create a custom data called **"6sense confidence**.
2. Choose type **Single**, scope **Visit**, and acquisition method **Custom Javascript code**.
3. Paste this code:

```javascript theme={null}
const sixSenseData = window.localStorage.getItem('_6senseCompanyDetails');  
if(!sixSenseData) return;  
return {value: JSON.parse(sixSenseData).confidence, overwrite: true};
```

4. Click **Validate**.

Once you've set up the custom data for the 6sense confidence, you can build segments in the Kameleoon segment builder by choosing the custom data and the confidence level you want to target. For instance, if you want to target visitors with a 6sense confidence **Very High**, drag and drop the custom data "6sense confidence" and use the operator **equal to** with the value **Very High**. Please note that values are case-sensitive.

<Frame>
  ![](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/integrations/as-a-source/automation/6sense/Capture-décran-2022-12-22-à-11.42.12-1920x1284.png)
</Frame>

### Fetching and using 6sense scores attribute in Kameleoon for predictive targeting around buying stages and ICP fit

6sense's Intent Score is a 1-100 measure of a user's readiness to buy. The intent score maps directly with the 6sense platform's pre-defined buying stages for each of your product:

* **Target Stage**: For scores less than 20
* **Awareness Stage**: For scores between 20 and 49
* **Consideration Stage**: For scores between 50 and 69
* **Decision Stage**: For scores between 70 and 84
* **Purchase Stage**: For scores 85 and greater

Create a custom data for each product you would like to use a score with in Kameleoon. For example, let's say you have a product called "myProduct." You can then create a custom data called "6sense myProduct Score"

Choose type **Single**, scope **Visit**, and acquisition method **Custom JavaScript code**.

Paste this code:

```javascript theme={null}
const sixSenseData = window.localStorage.getItem('_6senseCompanyDetails');
if(!sixSenseData) return;
const scores = JSON.parse(sixsensedata).scores;
if(!scores) return;
scores.forEach(function(item){
  if(item.product == "myProduct"){ // Replace with your product's name
  	return {value: item.buying_stage, overwrite: true};
  }
});
```

Click **Validate**.

The custom data's value may be either **Target**, **Awareness**, **Consideration**, **Decision**, or **Purchase**.

Once you've set up the custom data for the 6sense score, you can build segments in the Kameleoon segment builder by choosing the custom data and the score level you want to target. For instance, if you want to target visitors with a 6sense score at the **Decision** stage, drag and drop the custom data "6sense myProduct Score" and use the operator **equal to** with the value **Decision**. Please note that values are case-sensitive.
