Dynamic Search Ad Record - Bulk

Defines a dynamic search ad that can be downloaded and uploaded in a bulk file.

With a dynamic search ads campaign, the ad title and display URL are generated automatically based on the website domain and language that you want to target.

Note

This feature is currently available in Canada, France, Germany, the United Kingdom, and the United States.

You can download all Dynamic Search Ad records in the account by including the DownloadEntity value of DynamicSearchAds in the DownloadCampaignsByAccountIds or DownloadCampaignsByCampaignIds service request. Additionally the download request must include the EntityData scope. For more details about the Bulk service including best practices, see Bulk Download and Upload.

The following Bulk CSV example would add a new dynamic search ad if a valid Parent Id value is provided.

Type,Status,Id,Parent Id,Campaign,Ad Group,Client Id,Modified Time,Title,Text,Display Url,Destination Url,Promotion,Device Preference,Name,App Platform,App Id,Final Url,Mobile Final Url,Tracking Template,Final Url Suffix,Custom Parameter,Title Part 1,Title Part 2,Path 1,Path 2
Format Version,,,,,,,,,,,,,,6.0,,,,,,,,,,,
Dynamic Search Ad,Active,,-1113,ParentCampaignNameGoesHere,AdGroupNameGoesHere,ClientIdGoesHere,,,Find New Customers & Increase Sales! Start Advertising on Contoso Today.,,,,,,,,,,,,{_promoCode}=PROMO1; {_season}=summer,,,seattle,shoe sale

If you are using the Bing Ads SDKs for .NET, Java, or Python, you can save time using the BulkServiceManager to upload and download the BulkDynamicSearchAd object, instead of calling the service operations directly and writing custom code to parse each field in the bulk file.

var uploadEntities = new List<BulkEntity>();

// Map properties in the Bulk file to the BulkDynamicSearchAd
var bulkDynamicSearchAd = new BulkDynamicSearchAd
{
    // 'Parent Id' column header in the Bulk file
    AdGroupId = adGroupIdKey,
    // 'Ad Group' column header in the Bulk file
    AdGroupName = "AdGroupNameGoesHere",
    // 'Campaign' column header in the Bulk file
    CampaignName = "ParentCampaignNameGoesHere",
    // 'Client Id' column header in the Bulk file
    ClientId = "ClientIdGoesHere",

    // Map properties in the Bulk file to the 
    // DynamicSearchAd object of the Campaign Management service.
    DynamicSearchAd = new DynamicSearchAd
    {
        // 'Id' column header in the Bulk file
        Id = null,
        // 'Path 1' column header in the Bulk file
        Path1 = "seattle",
        // 'Path 2' column header in the Bulk file
        Path2 = "shoe sale",
        // 'Status' column header in the Bulk file
        Status = AdStatus.Active,
        // 'Text' column header in the Bulk file
        Text = "Find New Customers & Increase Sales! Start Advertising on Contoso Today.",
        // 'Tracking Template' column header in the Bulk file
        TrackingUrlTemplate = null,
        // 'Custom Parameter' column header in the Bulk file
        UrlCustomParameters = new CustomParameters
        {
            // Each custom parameter is delimited by a semicolon (;) in the Bulk file
            Parameters = new[] {
                new CustomParameter(){
                    Key = "promoCode",
                    Value = "PROMO1"
                },
                new CustomParameter(){
                    Key = "season",
                    Value = "summer"
                },
            }
        },
    },
};

uploadEntities.Add(bulkDynamicSearchAd);

var entityUploadParameters = new EntityUploadParameters
{
    Entities = uploadEntities,
    ResponseMode = ResponseMode.ErrorsAndResults,
    ResultFileDirectory = FileDirectory,
    ResultFileName = DownloadFileName,
    OverwriteResultFile = true,
};

var uploadResultEntities = (await BulkServiceManager.UploadEntitiesAsync(entityUploadParameters)).ToList();

For a Dynamic Search Ad record, the following attribute fields are available in the Bulk File Schema. The combination of the Path 1, Path 2, and Text fields make the dynamic search ad unique.

Ad Group

The name of the ad group that contains the ad.

Add: Read-only and Required
Update: Read-only and Required
Delete: Read-only and Required

Note

For add, update, and delete, you must specify either the Parent Id or Ad Group field.

Campaign

The name of the campaign that contains the ad group and ad.

Add: Read-only
Update: Read-only
Delete: Read-only

Client Id

Used to associate records in the bulk upload file with records in the results file. The value of this field is not used or stored by the server; it is simply copied from the uploaded record to the corresponding result record. It may be any valid string to up 100 in length.

Add: Optional
Update: Optional
Delete: Read-only

Custom Parameter

Your custom collection of key and value parameters for URL tracking.

In a bulk file, the list of custom parameters are formatted as follows.

  • Format each custom parameter pair as Key=Value, for example {_promoCode}=PROMO1.

  • Microsoft Advertising will accept the first 3 custom parameter key and value pairs that you include, and any additional custom parameters will be ignored. For customers in the Custom Parameters Limit Increase Phase 2 pilot (GetCustomerPilotFeatures returns 565), Microsoft Advertising will accept the first 8 custom parameter key and value pairs that you include, and if you include more than 8 custom parameters an error will be returned. During calendar year 2019 the limit will be increased from 3 to 8 for all customers. Each key and value pair are delimited by a semicolon and space ("; "), for example {_promoCode}=PROMO1; {_season}=summer.

  • A Key cannot contain a semicolon. If a Value contains a semicolon it must be escaped as ';'. Additionally if the Value contains a backslash it must also be escaped as '\'.

  • The Key cannot exceed 16 UTF-8 bytes, and the Value cannot exceed 200 UTF-8 bytes. The Key is required and the Value is optional. The maximum size of the Key does not include the braces and underscore i.e., '{', '_', and '}'.

    Note

    With the Bulk service the Key must be formatted with surrounding braces and a leading underscore, for example if the Key is promoCode, it must be formatted as {_promoCode}. With the Campaign Management service you cannot specify the surrounding braces and underscore.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed. To remove all custom parameters, set this field to delete_value. The delete_value keyword removes the previous setting. To remove a subset of custom parameters, specify the custom parameters that you want to keep and omit any that you do not want to keep. The new set of custom parameters will replace any previous custom parameter set.
Delete: Read-only

Editorial Appeal Status

Determines whether you can appeal the issues found by the editorial review.

Possible values are described in the table below.

Value Description
Appealable The editorial issue is appealable.
AppealPending The editorial issue is appealable and an appeal has been submitted.
NotAppealable The editorial issue is not appealable.

Add: Read-only
Update: Read-only
Delete: Read-only

Editorial Location

The component or property of the ad that failed editorial review.

Add: Read-only
Update: Read-only
Delete: Read-only

Editorial Reason Code

A code that identifies the reason for the failure. For a list of possible reason codes, see Editorial Reason Codes.

Add: Read-only
Update: Read-only
Delete: Read-only

Editorial Status

The editorial status of the ad.

Possible values are described in the table below.

Value Description
Active The ad passed editorial review.
ActiveLimited The ad passed editorial review in one or more markets, and one or more elements of the ad is undergoing editorial review in another market. For example the ad passed editorial review for Canada and is still pending review in the United States.
Disapproved The ad failed editorial review.
Inactive One or more elements of the ad is undergoing editorial review.

Add: Read-only
Update: Read-only
Delete: Read-only

Editorial Term

The term that failed editorial review.

This field will not be set if a combination of terms caused the failure or if the failure was based on a policy violation.

Add: Read-only
Update: Read-only
Delete: Read-only

Final Url Suffix

The final URL suffix can include tracking parameters that will be appended to the end of your landing page URL. We recommend placing tracking parameters that your landing page requires in a final URL suffix so that your customers are always sent to your landing page. For more details and validation rules see Final URL Suffix in the technical guides.

Note

This feature is only available for customers in the Final URL Suffix Phase 2 pilot (GetCustomerPilotFeatures returns 566). If you are not in the pilot this property will be ignored and no error will be returned. During calendar year 2019 this feature will be enabled for all customers.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed. If you set this field to the delete_value string, the prior setting is removed.
Delete: Read-only

Id

The system generated identifier of the ad.

Add: Read-only
Update: Read-only and Required
Delete: Read-only and Required

Modified Time

The date and time that the entity was last updated. The value is in Coordinated Universal Time (UTC).

Note

The date and time value reflects the date and time at the server, not the client. For information about the format of the date and time, see the dateTime entry in Primitive XML Data Types.

Add: Read-only
Update: Read-only
Delete: Read-only

Parent Id

The system generated identifier of the ad group that contains the ad.

This bulk field maps to the Id field of the Ad Group record.

Add: Read-only and Required. You must either specify an existing ad group identifier, or specify a negative identifier that is equal to the Id field of the parent Ad Group record. This is recommended if you are adding new ads to a new ad group in the same Bulk file. For more information, see Bulk File Schema Reference Keys.
Update: Read-only
Delete: Read-only

Note

For add, update, and delete, you must specify either the Parent Id or Ad Group field.

Path 1

The first part of the optional path that will be appended to the domain portion of your display URL. The display URL e.g. www.contoso.com will be generated from the domain of your display URL. Then if you have specified a value for Path 1 it will be appended to the display URL. If you have also specified a value for Path 2, then it will also be appended to the display URL after Path 1. For example if your domain is contoso.com, Path 1 is set to subdirectory1, and Path 2 is set to subdirectory2, then the URL displayed will be www.contoso.com/subdirectory1/subdirectory2.

The maximum input length of the path is 15 characters. Note that for languages with double-width characters e.g. Traditional Chinese the maximum input length of the path is 7 characters. Although dynamic text substitution is supported for other ad types like Expanded Text ads, it is not supported for dynamic search ads.

The path cannot contain the forward slash (/) or newline (\n) characters.

If the path includes a space, it will be replaced with an underscore (_) when the ad is shown.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed. If you set this field to the delete_value string, the prior setting is removed.
Delete: Read-only

Path 2

The second part of the optional path that will be appended to the domain portion of your display URL. The display URL e.g. www.contoso.com will be generated from the domain of your dynamic search ads campaign level settings. Then if you have specified a value for Path 1 it will be appended to the display URL. If you have also specified a value for Path 2, then it will also be appended to the display URL after Path 1. For example if your domain is contoso.com, Path 1 is set to subdirectory1, and Path 2 is set to subdirectory2, then the URL displayed will be www.contoso.com/subdirectory1/subdirectory2.

You can only specify Path 2 if Path 1 is also set.

The maximum input length of the path is 15 characters. Note that for languages with double-width characters e.g. Traditional Chinese the maximum input length of the path is 7 characters. Although dynamic text substitution is supported for other ad types like Expanded Text ads, it is not supported for dynamic search ads.

The path cannot contain the forward slash (/) or newline (\n) characters. If the path includes a space, it will be replaced with an underscore (_) when the ad is shown.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed. If you set this field to the delete_value string, the prior setting is removed.
Delete: Read-only

Publisher Countries

The list of publisher countries whose editorial guidelines do not allow the specified term.

In a bulk file, the list of publisher countries are delimited with a semicolon (;).

Add: Read-only
Update: Read-only
Delete: Read-only

Status

The status of the ad.

Possible values are Active, Paused, or Deleted.

Add: Optional. The default value is Active.
Update: Optional. If no value is set for the update, this setting is not changed.
Delete: Required. The Status must be set to Deleted.

Text

The first part of the ad description.

The text must contain at least one word.

The maximum input length of the copy is 90 characters. Note that for ad groups that use Traditional Chinese the maximum input length of the copy is 45 characters. Although dynamic text substitution is supported for other ad types like expanded text ads, it is not supported for dynamic search ads.

The text cannot contain the newline (\n) character.

Add: Required
Update: Optional. If no value is set for the update, this setting is not changed.
Delete: Read-only

Text Part 2

The second part of the ad description.

The text must contain at least one word.

The maximum input length of the copy is 90 characters. Note that for ad groups that use Traditional Chinese the maximum input length of the copy is 45 characters. Although dynamic text substitution is supported for other ad types like expanded text ads, it is not supported for dynamic search ads.

The text cannot contain the newline (\n) character.

Note

This feature is only available for customers in the Dynamic Search Ads Text Part 2 pilot (GetCustomerPilotFeatures returns 600). If you are not in the pilot and you try to set this field an error will be returned. During calendar year 2019 this feature will be enabled for all customers.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed.
Delete: Read-only

Tracking Template

The tracking template to use as a default for the URL specified with FinalUrls.

The following validation rules apply to tracking templates. For more details about supported templates and parameters, see the Microsoft Advertising help article What tracking or URL parameters can I use?

  • Tracking templates defined for lower level entities e.g. ads override those set for higher level entities e.g. campaign. For more information, see Entity Limits.

  • The length of the tracking template is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.

  • The tracking template must be a well-formed URL beginning with one of the following: http://, https://, {lpurl}, or {unescapedlpurl}.

  • Microsoft Advertising does not validate whether custom parameters exist. If you use custom parameters in your tracking template and they do not exist, then the landing page URL will include the key and value placeholders of your custom parameters without substitution. For example, if your tracking template is http://tracker.example.com/?season={_season}&promocode={_promocode}&u={lpurl}, and neither {_season} or {_promocode} are defined at the campaign, ad group, criterion, keyword, or ad level, then the landing page URL will be the same.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed. If you set this field to the delete_value string, the prior setting is removed.
Delete: Read-only