Image Ad Extension Record - Bulk

Defines an image ad extension that can be downloaded and uploaded in a bulk file.

You can associate an image ad extension with the account or with campaigns and ad groups in the account. Each account may have up to 250,000 campaign image extension associations, and up to 250,000 ad group image extension associations. Each entity (account, campaign, or ad group) can be associated with up to 25 image ad extensions. Use the Account Image Ad Extension, Ad Group Image Ad Extension, and Campaign Image Ad Extension records to manage image ad extension associations.

You can download all Image Ad Extension records in the account by including the DownloadEntity value of ImageAdExtensions 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 Image Ad Extension to the account's shared library.

Type,Status,Id,Parent Id,Campaign,Ad Group,Client Id,Modified Time,Start Date,End Date,Device Preference,Name,Ad Schedule,Use Searcher Time Zone,Alternative Text,Media Ids,Final Url Suffix
Format Version,,,,,,,,,,,6.0,,,,,
Image Ad Extension,Active,-14,0,,,ClientIdGoesHere,,,,,,,FALSE,ImageAdExtension Alternative Text,ImageMediaIdHere,

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 BulkImageAdExtension 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 BulkImageAdExtension
var bulkImageAdExtension = new BulkImageAdExtension
{
    // 'Parent Id' column header in the Bulk file
    AccountId = 0,
    // 'Client Id' column header in the Bulk file
    ClientId = "ClientIdGoesHere",
                
    // Map properties in the Bulk file to the 
    // ImageAdExtension object of the Campaign Management service.
    ImageAdExtension = new ImageAdExtension
    {
        // 'Alternative Text' column header in the Bulk file
        AlternativeText = "ImageAdExtension Alternative Text",
        // 'Destination Url' column header in the Bulk file
        DestinationUrl = null,
        // 'Id' column header in the Bulk file
        Id = imageAdExtensionIdKey,
        // 'Media Ids' column header in the Bulk file
        ImageMediaIds = new long[] { ImageMediaIdHere },
        // 'Status' column header in the Bulk file
        Status = AdExtensionStatus.Active,
    },
};

uploadEntities.Add(bulkImageAdExtension);

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

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

For an Image Ad Extension record, the following attribute fields are available in the Bulk File Schema.

Ad Schedule

The list of day and time ranges that you want the ad extension to be displayed with your ads. Each day and time range includes the scheduled day of week, start/end hour, and start/end minute. Each day and time range is enclosed by left and right parentheses, and separated from other day and time ranges with a semicolon (;) delimiter. Within each day and time range the format is Day[StartHour:StartMinue-EndHour:EndMinute].

The possible values of StartHour range from 00 to 23, where 00 is equivalent to 12:00AM and 12 is 12:00PM.

The possible values of EndHour range from 00 to 24, where 00 is equivalent to 12:00AM and 12 is 12:00PM.

The possible values of StartMinute and EndMinute range from 00 to 60.

The following example demonstrates day and time ranges during weekdays from 9:00AM through 9:00PM: (Monday[09:00-21:00]);(Tuesday[09:00-21:00]);(Wednesday[09:00-21:00]);(Thursday[09:00-21:00]);(Friday[09:00-21:00])

Add: Optional. If you do not set this field, the ad extension will be eligible for scheduling anytime during the calendar start and end dates.
Update: Optional. The individual day and time ranges cannot be updated. You can effectively update the day and time ranges by sending a new set that should replace the prior set. The Ad Schedule, End Date, Start Date, and Use Searcher Time Zone fields depend on each other and are updated together. If you leave all of these fields empty during update, then none of them are updated. If you include values for any of these fields, then the prior values for all of these fields are removed or replaced. To remove all prior schedule settings, set each of these fields to delete_value.
Delete: Read-only

Alternative Text

Alternative description of the image media for usability. If the image could not be displayed, the alternative text is used instead.

The maximum length for this field is 90 characters.

Add: Required
Update: Optional. If no value is set for the update, this setting is not changed.
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 3 pilot (GetCustomerPilotFeatures returns 635), 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.

  • 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. For customers in the Custom Parameters Limit Increase Phase 3 pilot (GetCustomerPilotFeatures returns 635), the Value limit increases to 250 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

Destination URL

The URL of the webpage to take the user to when they click the image.

The URL can contain dynamic text strings such as {keyword}. For more information, see What tracking or URL parameters can I use?.

The URL can contain a maximum of 1,024 characters. If the URL does not specify a protocol, the system uses the HTTP protocol when a user clicks the ad. If the URL specifies the HTTP protocol when you add an ad, the service will remove the http:// protocol string (the HTTP protocol string does not count against the 1,024 character limit); however, the service will not remove an HTTPS protocol string (https://) from the URL.

Note

If the URL is not specified for the image ad extension, the URL of the ad is used.

Add: Optional. Note: This field is required for multi-image ad extensions. Update: Optional. If no value is set for the update, this setting is not changed. Note: This field is required for multi-image ad extensions.
Delete: Read-only

Display Text

The display text of your image extension.

The maximum length for this field is 35 characters.

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

Editorial Location

The component or property of the ad extension 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 extension.

Possible values are described in the table below.

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

End Date

The ad extension scheduled end date string formatted as MM/DD/YYYY.

The end date is inclusive. For example, if you set this field to 12/31/2020, the ad extensions will stop being shown at 11:59 PM on 12/31/2020.

Add: Optional. If you do not specify an end date, the ad extension will continue to be delivered unless you pause the associated campaigns, ad groups, or ads.
Update: Optional. The end date can be shortened or extended, as long as the start date is either null or occurs before the new end date. If you set this field to the delete_value string, then you are effectively removing the end date. The Ad Schedule, End Date, Start Date, and Use Searcher Time Zone fields depend on each other and are updated together. If you leave all of these fields empty during update, then none of them are updated. If you include values for any of these fields, then the prior values for all of these fields are removed or replaced. To remove all prior schedule settings, set each of these fields to delete_value.
Delete: Read-only

Final Url

The landing page URL.

The following validation rules apply to Final URLs and Final Mobile URLs.

  • The length of the URL is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.
  • You may specify up to 10 list items for both Final Url and Mobile Final Url; however, only the first item in each list is used for delivery. The service allows up to 10 list items for potential forward compatibility.
  • Each URL is delimited by a semicolon and space ("; ").
  • Usage of '{' and '}' is only allowed to delineate tags, for example {lpurl}.
  • Final URLs must each be a well-formed URL starting with either http:// or https://.
  • If you specify Mobile Final Url, you must also specify Final Url.

Add: Optional
Update: Optional. If no value is set for the update, this setting is not changed.
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 3 pilot (GetCustomerPilotFeatures returns 636). If you are not in the pilot this property will be ignored and no error will be returned.

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 extension.

Add: Optional. You must either leave this field empty, or specify a negative identifier. A negative identifier set for the ad extension can then be referenced in the Id field of dependent record types such as Ad Group Image Ad Extension and Campaign Image Ad Extension. This is recommended if you are adding new ad extensions 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

Images

Image assets with different sizes and aspect ratios so they can flexibly display across a variety of publishers and placements.

You are only required to provide a landscape image asset i.e., this field must contain one image asset with subType set to LandscapeImageMedia. The recommended dimensions for the LandscapeImageMedia are 1200 width x 628 height. Optionally you can include additional asset links, i.e., one image asset for each supported sub type. For any image asset sub types that you do not explicitly set, Microsoft Advertising will automatically create image asset links by cropping the LandscapeImageMedia.

The image assets are represented in the bulk file as a JSON string. Seven images are included in the example JSON below, and only the LandscapeImageMedia subType is not cropped. The id is a property of the asset, whereas the cropHeight, cropWidth, cropX, cropY, and subType are properties of the asset link i.e., the relationship between the asset and the ad. For more details see cropHeight, cropWidth, cropX, cropY, id, and subType below.

[{
	"id": 1234567890000,
	"subType": "LandscapeImageMedia"
},
{
	"id": 1234567890000,
	"subType": "SquareImageMedia",
	"cropX": 286,
	"cropY": 0,
	"cropWidth": 628,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia169X100",
	"cropX": 70,
	"cropY": 0,
	"cropWidth": 1061,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia93X100",
	"cropX": 308,
	"cropY": 0,
	"cropWidth": 584,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia15X10",
	"cropX": 129,
	"cropY": 0,
	"cropWidth": 942,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia155X100",
	"cropX": 114,
	"cropY": 0,
	"cropWidth": 973,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia133X100",
	"cropX": 183,
	"cropY": 0,
	"cropWidth": 835,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia178X100",
	"cropX": 41,
	"cropY": 0,
	"cropWidth": 1118,
	"cropHeight": 628
},
{
	"id": 1234567890000,
	"subType": "ImageMedia172X100",
	"cropX": 60,
	"cropY": 0,
	"cropWidth": 1080,
	"cropHeight": 628
}]

Note

In the comma separated bulk file you'll need to surround the list of asset links, each attribute key, and each attribute string value with an extra set of double quotes e.g., the above JSON string would be written as "[{""id"":1234567890000,""subType"":""LandscapeImageMedia""},{""id"":1234567890000,""subType"":""SquareImageMedia"",""cropX"":286,""cropY"":0,""cropWidth"":628,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia169X100"",""cropX"":70,""cropY"":0,""cropWidth"":1061,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia93X100"",""cropX"":308,""cropY"":0,""cropWidth"":584,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia15X10"",""cropX"":129,""cropY"":0,""cropWidth"":942,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia155X100"",""cropX"":114,""cropY"":0,""cropWidth"":973,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia133X100"",""cropX"":183,""cropY"":0,""cropWidth"":835,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia178X100"",""cropX"":41,""cropY"":0,""cropWidth"":1118,""cropHeight"":628},{""id"":1234567890000,""subType"":""ImageMedia172X100"",""cropX"":60,""cropY"":0,""cropWidth"":1080,""cropHeight"":628}]".

Given the upload response JSON example above, please take note of the following:

  • The same image asset identifier (e.g., 1234567890000) is used for all auto-generated image asset sub types. Whether or not you let Microsoft Advertising automatically generate the cropped images, the Id does not need to be unique among the image assets linked to the same ad.
  • Because the ad in this example was created without crop settings for the LandscapeImageMedia image asset sub type, all image assets are cropped except for the original landscape image.
  • Whether or not the landscape image has its own crop settings, Microsoft Advertising uses the true height of the landscape image for all of the default crop settings. In this example the crop height for all system-generated image assets is 628, and we can infer that the landscape image (LandscapeImageMedia sub type) with 1.91:1 aspect ratio has width and height of 1200x628. Even if the landscape image asset link had been created with crop settings e.g., 703x368, the crop settings of the auto-generated image assets are based on the full dimensions of the landscape image (again that would be 1200x628 in this example).

cropHeight

The number of pixels to use from the image asset source, starting from the cropY position and moving upwards.

cropWidth

The number of pixels to use from the image asset source, starting from the cropX position and moving to the right.

cropX

Starting from the lower left corner of image asset source, this is the number of pixels to skip to the right on the x-axis before applying the cropWidth.

cropY

Starting from the lower left corner of image asset source, this is the number of pixels to skip upwards on the y-axis before applying the cropHeight.

id

The id attribute is a unique Microsoft Advertising identifier for the asset in a Microsoft Advertising account.

The same image asset identifier can be used multiple times in the same ad for different aspect ratios, and can also be used by multiple ads in the same Microsoft Advertising account. The identifier of image asset with SubType set to LandscapeImageMedia is used for all auto-generated image asset sub types within the same ad. Whether or not you let Microsoft Advertising automatically generate the cropped images, the Id does not need to be unique among the image assets linked to the same ad.

You can create images for image ad extensions via the Image bulk record. Then you can use the returned media identifier as the image asset ID. The aspect ratio of the image that you added must be supported for the image asset subType.

subType

The subType attribute represents the aspect ratio for this image asset.

The true aspect ratio of the Image that is stored in the account level media library can vary, so long as the resulting dimensions result in the expected aspect ratio per sub type. If you do not specify crop settings, the service will automatically crop up to the maximum possible area from the center of the image. For example, given a 1000x1000 pixel image, for the 1.91:1 aspect ratio, the auto crop setting will be cropWidth=1000, cropHeight=524, cropX=0, and cropY=238.

The possible sub type values include LandscapeImageMedia, SquareImageMedia, ImageMedia169X100, ImageMedia93X100, ImageMedia15X10, ImageMedia155X100, ImageMedia133X100, ImageMedia178X100, and ImageMedia172X100. New sub types might be added in the future, so you should not take any dependency on a fixed set of values.

Sub Type Minimum dimensions in pixels
LandscapeImageMedia 703 width x 368 height
Aspect radio 1.91:1
SquareImageMedia 300 width x 300 height
Aspect radio 1:1
ImageMedia169X100 622 width x 368 height
Aspect radio 1.69:1
ImageMedia93X100 311 width x 333 height
Aspect radio 0.93:1
ImageMedia15X10 300 width x 200 height
Aspect radio 1.5:1
ImageMedia155X100 300 width x 194 height
Aspect radio 1.55:1
ImageMedia133X100 100 width x 75 height
Aspect radio 1.33:1
ImageMedia178X100 624 width x 350 height
Aspect radio 1.78:1
ImageMedia172X100 300 width x 174 height
Aspect radio 1.72:1

Add: Required. Only the id and subType are required for each asset link.
Update: Optional. To retain all of the existing asset links, set or leave this field empty. If you set this field, any images that were previously linked to this ad will be replaced. If you set this field, only the id and subType are required for each asset link.
Delete: Read-only

Layouts

The list of eligible image layouts.

Supported values are SearchSingle and SearchMultiple. New layouts might be added in the future, so you should not take any dependency on a fixed set of values.

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

Add: Optional. If you do not set this field, all current and future supported layouts will be set by default.
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

Media Ids

The identifiers of the images to include in the ad. You may not specify media identifiers for more than one image of the same aspect ratio. In other words each of the referenced images must have different aspect ratios.

You can specify up to four (4) image identifiers. While the minimum required is one image media ID, in order to qualify for all ad placements you must provide four image media identifiers.

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

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

Mobile Final Url

The landing page URL for mobile devices.

The following validation rules apply to Final URLs and Final Mobile URLs.

  • The length of the URL is limited to 2,048 characters. The HTTP or HTTPS protocol string does count towards the 2,048 character limit.
  • You may specify up to 10 list items for both Final Url and Mobile Final Url; however, only the first item in each list is used for delivery. The service allows up to 10 list items for potential forward compatibility.
  • Each URL is delimited by a semicolon and space ("; ").
  • Usage of '{' and '}' is only allowed to delineate tags, for example {lpurl}.
  • Final URLs must each be a well-formed URL starting with either http:// or https://.
  • If you specify Mobile Final Url, you must also specify Final Url.

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

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 account that contains the ad extension.

This bulk field maps to the Id field of the Account record.

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

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

Start Date

The ad extension scheduled start date string formatted as MM/DD/YYYY.

The start date is inclusive. For example, if you set StartDate to 5/5/2020, the ad extensions will start being shown at 12:00 AM on 5/5/2020.

Add: Optional. If you do not specify a start date, the ad extension is immediately eligible to be scheduled.
Update: Optional. The start date can be shortened or extended, as long as the end date is either null or occurs after the new start date. If you set this field to the delete_value string, then you are effectively removing the start date and the ad extension is immediately eligible to be scheduled. The Ad Schedule, End Date, Start Date, and Use Searcher Time Zone fields depend on each other and are updated together. If you leave all of these fields empty during update, then none of them are updated. If you include values for any of these fields, then the prior values for all of these fields are removed or replaced. To remove all prior schedule settings, set each of these fields to delete_value.
Delete: Read-only

Status

The status of the ad extension.

Possible values are Active 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.

Tracking Template

The tracking template to use for your promotion URLs.

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 https://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

Use Searcher Time Zone

Determines whether to use the account time zone or the time zone of the search user where the ads could be delivered.

Set this property to TRUE if you want the ad extensions to be shown in the search user's time zone, and otherwise set it to FALSE.

Add: Optional. If you do not specify this field or leave it empty, the default value of FALSE will be set and the account time zone will be used.
Update: Optional. If you set this field to the delete_value string, then you are effectively resetting to the default value of FALSE. The Ad Schedule, End Date, Start Date, and Use Searcher Time Zone fields depend on each other and are updated together. If you leave all of these fields empty during update, then none of them are updated. If you include values for any of these fields, then the prior values for all of these fields are removed or replaced. To remove all prior schedule settings, set each of these fields to delete_value.
Delete: Read-only

Version

The number of times the contents of the ad extension has been updated. The version is set to 1 when you add the extension and is incremented each time it's revised.

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