# Microsoft Bing CAPI Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Ms Bing Capi**, **Microsoft Bing CAPI** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

[Microsoft Bing Conversions API (CAPI)](https://ui.ads.microsoft.com//?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) lets you send offline conversion data from Segment to Microsoft Advertising. This enables enhanced customer attribution data and supports cross-device and cross-platform conversion attribution. You can use this destination to track offline actions, such as in-store purchases driven by ad clicks, and attribute them to your Microsoft Ads campaigns.

## Getting started

1. From your workspace's [destination catalog page](https://app.segment.com/goto-my-workspace/destinations/catalog), search for "Microsoft Bing CAPI".
2. Select Microsoft Bing CAPI and click **Add destination**.
3. Select an existing source to connect to the destination.
4. Give the destination a name and click **Create destination**.
5. In **Basic Settings**, enter the Bing **UetTag** and **ApiToken**.
   * To find the UET tag, refer to Microsoft's steps on [how to create a UET tag](https://help.ads.microsoft.com/#apex/3/en/56682/2-500).
   * To generate the API token, contact [Microsoft support](https://about.ads.microsoft.com/en/support) or fill out a [request form](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRwMZAe0PcMxHmZ0AjDaNRmxUM0o5UURRVktCRkxHNEFLTVNYQjI3NDNBUS4u).
6. Toggle **Enable Destination** on to start sending data to Microsoft Bing CAPI from Segment.

## Destination Settings

| Field              | Description                                                                                                                                                                                                                                                                                                                              | Required | Type     |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Ad Storage Consent | Ad Storage Consent for GDPR compliance                                                                                                                                                                                                                                                                                                   | No       | select   |
| Bing ApiToken      | Your Bing API Token. API token generation is not generally available. To obtain one, you’ll need to contact Microsoft Support, or alternatively, you can \[fill out this form]\(https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRwMZAe0PcMxHmZ0AjDaNRmxUM0o5UURRVktCRkxHNEFLTVNYQjI3NDNBUS4u) to request access. | Yes      | password |
| Bing UetTag        | Your Bing UetTag.                                                                                                                                                                                                                                                                                                                        | Yes      | string   |

## Available Presets

Microsoft Bing CAPI has the following presets

| Preset Name                        | Trigger                                                                                                            | Default Action                        |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------- |
| Send Custom Event                  | Event type = "track" and event != "Order Completed" and event != "Add to Cart" and event != "Products Searched"    | Send CAPI Event                       |
| Send Pageload                      | Event type = "page"                                                                                                | Send CAPI Event                       |
| Send Search Results                | Event type = "track" and event = "Products Searched"                                                               | Send CAPI Event                       |
| Send Purchase Event                | Event type = "track" and event = "Order Completed"                                                                 | Send CAPI Event                       |
| Send Cart Event                    | Event type = "track" and event = "Add to Cart"                                                                     | Send CAPI Event                       |
| Microsoft Bing CAPI msclkid Plugin | Event type = "track", Event  type = "identify", Event  type = "group", Event  type = "page", Event  type = "alias" | Microsoft Bing msclkid Browser Plugin |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Microsoft Bing CAPI-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Send CAPI Event](#send-capi-event)
* [Page Load](#page-load)
* [Msclick Id](#msclick-id)
* [Microsoft Bing msclkid Browser Plugin](#microsoft-bing-msclkid-browser-plugin)

### Send CAPI Event

Send a track or page event to Microsoft Bing CAPI.

Send CAPI Event is a **Cloud** action. The default Trigger is `type = "track" or type = "page"`

| Field           | Description                                                                                                                 | Required | Type    |
| --------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Data            | TODO - description for this field                                                                                           | No       | OBJECT  |
| User Data       | A list of user identifiers associated with the event.                                                                       | Yes      | OBJECT  |
| Custom Data     | Custom data to be sent to the Bing API. This can include additional properties that are not covered by the standard fields. | No       | OBJECT  |
| Items           | The list of items associated with the event. Must contain at least one item.                                                | No       | OBJECT  |
| Hotel Data      | Data specific to hotel events.                                                                                              | No       | OBJECT  |
| Enable Batching | Enable batching for this action.                                                                                            | No       | BOOLEAN |

### Page Load

Send a page load event to Microsoft Bing CAPI.

Page Load is a **Cloud** action. The default Trigger is `type = "page"`

| Field       | Description                                                                                                                 | Required | Type   |
| ----------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| Data        | TODO - description for this field                                                                                           | Yes      | OBJECT |
| User Data   | A list of user identifiers associated with the event.                                                                       | Yes      | OBJECT |
| Custom Data | Custom data to be sent to the Bing API. This can include additional properties that are not covered by the standard fields. | No       | OBJECT |

### Msclick Id

Generates a MSCLK ID and attaches it to every Amplitude browser based event.

Msclick Id is a **Web** action.

| Field          | Description                        | Required | Type   |
| -------------- | ---------------------------------- | -------- | ------ |
| Session Length | The length of the session in days. | No       | NUMBER |

### Microsoft Bing msclkid Browser Plugin

Enriches all Segment payloads with the Microsoft Bing msclkid Querystring value

Microsoft Bing msclkid Browser Plugin is a **Web** action. The default Trigger is `type = "track" or type = "identify" or type = "page" or type = "group" or type = "alias"`

This action does not have any fields.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Microsoft Bing CAPI  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.
