# Integration Specifications

## Integration Overview

Bing is a place people go to search for information, places, products, and more, so this is where brands want to make sure they have a presence. Show up when users search in text, product listing, video ads, and more with Ads.

The Daasity Bing Ads integration extracts key advertising information from the Microsoft Ads platform, like spend, clicks, and impressions.

## Integration Availability

This integration is available for:

* Enterprise
* Growth

## API Endpoints

This extractor is based on this [Microsoft Ads Reporting API documentation](https://learn.microsoft.com/en-us/advertising/reporting-service/reporting-service-reference). The following endpoints are used to replicate data into Daasity:

* [AdGroupPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/adgroupperformancereportrequest?view=bingads-13)
* [AdPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/adperformancereportrequest?view=bingads-13)
* [CampaignPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/campaignperformancereportrequest?view=bingads-13)

## Entity Relationship Diagram (ERD)

{% @lucid/lucid-component url="<https://lucid.app/lucidchart/d4ce3c8a-c314-4c43-a970-52ebaad9c692/view>" fullWidth="true" %}

## Bing Ads Schema

The Bing Ads extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.

* [Ad Groups](#a-d-groups)
* [Ads](#a-ds)
* [Ads Performance](#a-ds-performance)
* [Campaigns](#campaigns)

### Ad Groups

* Endpoint: [AdGroupPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/adgroupperformancereportrequest?view=bingads-13)
* Update Method: UPSERT
* Table Name: \[`bing_ads.ad_groups`]

| CSV Header                    | Database Column    |
| ----------------------------- | ------------------ |
| AdGroupId                     | ad\_group\_id      |
| CampaignId                    | campaign\_id       |
| AdGroupLabels                 | ad\_group\_labels  |
| AdGroupName                   | ad\_group\_name    |
| AdGroupType                   | ad\_group\_type    |
| CustomParameters              | custom\_parameters |
| FinalUrlSuffix                | final\_url\_suffix |
| Status                        | status             |
| TrackingTemplate              | tracking\_template |
| Spend                         | spend              |
| Daasity Merchant Account ID   | \_account\_id      |
| Bing Ads Account ID           | \_\_source\_id     |
| MD5(ad\_id + \_\_source\_id)  | \_\_sync\_key      |
| Timestamp when loaded into DB | \_\_synced\_at     |

### Ads

* Endpoint: [AdPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/adperformancereportrequest?view=bingads-13)
* Update Method: UPSERT
* Table Name: \[`bing_ads.ads`]

| CSV Header                    | Database Column    |
| ----------------------------- | ------------------ |
| AdDescription                 | ad\_description    |
| AdDescription2                | ad\_description2   |
| AdGroupId                     | ad\_group\_id      |
| AdId                          | ad\_id             |
| AdLabels                      | ad\_labels         |
| AdStatus                      | ad\_status         |
| AdTitle                       | ad\_title          |
| AdType                        | ad\_type           |
| DestinationUrl                | destination\_url   |
| FinalMobileUrl                | final\_mobile\_url |
| FinalUrl                      | final\_url         |
| FinalUrlSuffix                | final\_url\_suffix |
| Headline                      | headline           |
| LongHeadline                  | long\_headline     |
| Path1                         | path1              |
| Path2                         | path2              |
| Spend                         | spend              |
| TitlePart1                    | title\_part1       |
| TitlePart2                    | title\_part2       |
| TitlePart3                    | title\_part3       |
| Daasity Merchant Account ID   | \_account\_id      |
| Bing Ads Account ID           | \_\_source\_id     |
| MD5(ad\_id + \_\_source\_id)  | \_\_sync\_key      |
| Timestamp when loaded into DB | \_\_synced\_at     |

### Ads Performance

* Endpoint: [AdPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/adperformancereportrequest?view=bingads-13)
* Update Method: UPSERT
* Table Name: \[`bing_ads.ads_performance_report`]

| CSV Header                      | Database Column                       |
| ------------------------------- | ------------------------------------- |
| AdId                            | ad\_id                                |
| AdDistribution                  | ad\_distribution                      |
| BidMatchType                    | bid\_match\_type                      |
| CurrencyCode                    | currency\_code                        |
| DeliveredMatchType              | delivered\_match\_type                |
| DeviceType                      | device\_type                          |
| TimePeriod                      | time\_period                          |
| TopVsOther                      | top\_vs\_other                        |
| AccountId                       | account\_id                           |
| AdGroupId                       | ad\_group\_id                         |
| BaseCampaignId                  | base\_campaign\_id                    |
| CampaignId                      | campaign\_id                          |
| AllConversions                  | all\_conversions                      |
| AllConversionsQualified         | all\_conversions\_qualified           |
| AllRevenue                      | all\_revenue                          |
| Assists                         | assists                               |
| Clicks                          | clicks                                |
| CompletedVideoViews             | completed\_video\_views               |
| Conversions                     | conversions                           |
| ConversionsQualified            | conversions\_qualified                |
| Impressions                     | impressions                           |
| Revenue                         | revenue                               |
| Spend                           | spend                                 |
| TotalWatchTimeInMS              | total\_watch\_time\_in\_ms            |
| VideoViews                      | video\_views                          |
| VideoViewsAt25Percent           | video\_views\_at25\_percent           |
| VideoViewsAt50Percent           | video\_views\_at50\_percent           |
| VideoViewsAt75Percent           | video\_views\_at75\_percent           |
| ViewThroughConversions          | view\_through\_conversions            |
| ViewThroughConversionsQualified | view\_through\_conversions\_qualified |
| ViewThroughRevenue              | view\_through\_revenue                |
| FinalUrl                        | final\_url                            |
| Daasity Merchant Account ID     | \_account\_id                         |
| Bing Ads Account ID             | \_\_source\_id                        |
| MD5(ad\_id + \_\_source\_id)    | \_\_sync\_key                         |
| Timestamp when loaded into DB   | \_\_synced\_at                        |

### Campaigns

* Endpoint: [CampaignPerformanceReportRequest](https://learn.microsoft.com/en-us/advertising/reporting-service/campaignperformancereportrequest?view=bingads-13)
* Update Method: UPSERT
* Table Name: \[`bing_ads.campaigns`]

| CSV Header                    | Database Column    |
| ----------------------------- | ------------------ |
| CampaignId                    | campaign\_id       |
| AccountId                     | account\_id        |
| CampaignLabels                | campaign\_labels   |
| CampaignName                  | campaign\_name     |
| CampaignStatus                | campaign\_status   |
| CampaignType                  | campaign\_type     |
| CustomParameters              | custom\_parameters |
| FinalUrlSuffix                | final\_url\_suffix |
| TrackingTemplate              | tracking\_template |
| Spend                         | spend              |
| Daasity Merchant Account ID   | \_account\_id      |
| Bing Ads Account ID           | \_\_source\_id     |
| MD5(ad\_id + \_\_source\_id)  | \_\_sync\_key      |
| Timestamp when loaded into DB | \_\_synced\_at     |


---

# Agent Instructions: 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:

```
GET https://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/bing-ads/integration-specifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
