편집

다음을 통해 공유


Hotel Ad Record - Bulk

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

A hotel ad is not used directly for delivered ad copy. Instead, the delivery engine generates hotel ads from the hotel details that it finds in the customer's Microsoft Merchant Center store catalog.

You can download all Hotel Ad records in the account by including the DownloadEntity value of HotelAds 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 hotel 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,Ad Format Preference,Name,App Platform,App Id,Final Url,Mobile Final Url,Tracking Template,Custom Parameter,Title Part 1,Title Part 2,Path 1,Path 2
Format Version,,,,,,,,,,,,,,6.0,,,,,,,,,,
Hotel Ad,Active,,-1112,ParentCampaignNameGoesHere,AdGroupNameGoesHere,ClientIdGoesHere,,,,,,Find New Customers & Increase Sales!,,,,,,,,,,,,,

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 BulkHotelAd 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 BulkHotelAd
var bulkHotelAd = new BulkHotelAd
{
    // '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 
    // HotelAd object of the Campaign Management service.
    HotelAd = new HotelAd
    {
        // 'Id' column header in the Bulk file
        Id = null,
        // 'Promotion' column header in the Bulk file
        PromotionalText = "Find New Customers & Increase Sales!",
        // 'Status' column header in the Bulk file
        Status = AdStatus.Active,
    },
};

uploadEntities.Add(bulkHotelAd);

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

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

For a Hotel Ad record, the following attribute fields are available in the Bulk File Schema.

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

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

Id

The system-generated identifier of the ad.

Add: Optional. You must either leave this field empty, or specify a negative identifier. A negative identifier set for the ad can then be referenced in the Parent Id field of dependent record types such as Hotel Ad Label. This is recommended if you are adding new ads and new dependent records in the same Bulk file. For more information, see Bulk File Schema Reference Keys.
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.

Publisher Countries

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

In a bulk file, the list of publisher countries or regions 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.