共用方式為


負關鍵字清單記錄 - 大量

定義可以在大量檔案中下載和上傳的負關鍵字清單。

您可以在DownloadCampaignsByAccountIdsDownloadCampaignsByCampaignIds服務要求中包含NegativeKeywordListsDownloadEntity值,以下載帳戶中的所有負關鍵字清單記錄。 此外,下載要求必須包含 EntityData 範圍。 如需大量服務的詳細資訊,包括最佳做法,請參閱 大量下載和上傳

下列大量 CSV 範例會新增負關鍵字清單。

Type,Status,Id,Parent Id,Campaign,Ad Group,Client Id,Modified Time,Keyword,Match Type,Name
Format Version,,,,,,,,,,6.0
Negative Keyword List,Active,-19,,,,ClientIdGoesHere,,,,My Negative Keyword List

如果您使用適用于 .NET、JAVA 或 Python 的 Bing Ads SDK ,您可以使用 BulkServiceManager 來節省時間來上傳和下載 BulkNegativeKeywordList 物件,而不是直接呼叫服務作業,並撰寫自訂程式碼來剖析大量檔案中的每個欄位。

var uploadEntities = new List<BulkEntity>();

// Map properties in the Bulk file to the BulkNegativeKeywordList
var bulkNegativeKeywordList = new BulkNegativeKeywordList
{
    // 'Client Id' column header in the Bulk file
    ClientId = "ClientIdGoesHere",

    // Map properties in the Bulk file to the 
    // NegativeKeywordList object of the Campaign Management service.
    NegativeKeywordList = new NegativeKeywordList
    {
        // 'Id' column header in the Bulk file
        Id = negativeKeywordListIdKey,
        // 'Name' column header in the Bulk file
        Name = "My Negative Keyword List",
    },

    // 'Status' column header in the Bulk file
    Status = Status.Active
};

uploadEntities.Add(bulkNegativeKeywordList);

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

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

針對 負關鍵字清單 記錄, 大量檔案架構中提供下列屬性欄位。

用戶端識別碼

用來將大量上傳檔案中的記錄與結果檔中的記錄產生關聯。 伺服器不會使用或儲存此欄位的值;它只會從上傳的記錄複製到對應的結果記錄。 它可以是長度上限為 100 的任何有效字串。

添加:
更新:
刪除: 唯讀

識別碼

系統產生的負關鍵字清單識別碼。

添加: 選。 您必須將此欄位保留空白,或指定負識別碼。 負數關鍵字清單的負識別碼可接著在活動負關鍵字清單關聯等相依記錄類型的 [標識符] 欄位中參考。 如果您要新增新的負關鍵字清單,並將它與相同大量檔案中的行銷活動建立關聯,則建議您這麼做。 如需詳細資訊,請 參閱大量檔案架構參考金鑰
更新: 唯讀和必要
刪除: 唯讀和必要

修改時間

上次更新實體的日期和時間。 值為國際標準時間 (UTC)。

注意事項

日期和時間值會反映伺服器上的日期和時間,而不是用戶端。 如需日期和時間格式的相關資訊,請參閱 基本 XML 資料類型中的 dateTime 專案。

添加: 唯讀
更新: 唯讀
刪除: 唯讀

名稱

負關鍵字清單的名稱。

名稱的最大長度為 255。

添加: 必填
更新: 必填
刪除: 唯讀

狀態

負關鍵字清單的狀態。

可能的值為 [作用中 ] 或 [已刪除]

添加: 選。 預設值為 Active
更新: 唯讀
刪除: 必填。 [狀態] 必須設定為 [ 已刪除]