共用負關鍵字記錄 - 大量
定義負關鍵字,該關鍵字會在負關鍵字清單中共用,而且可以在大量檔案中下載並上傳。
您可以在DownloadCampaignsByAccountIds或DownloadCampaignsByCampaignIds服務要求中包含SharedNegativeKeywords的DownloadEntity值,以下載帳戶中的所有共用負數關鍵字記錄。 此外,下載要求必須包含 EntityData 範圍。 如需大量服務的詳細資訊,包括最佳做法,請參閱 大量下載和上傳。
下列大量 CSV 範例會將新的負關鍵字新增至負關鍵字清單,指定有效的負關鍵字清單識別碼 (父 識別碼) 。
Type,Status,Id,Parent Id,Campaign,Ad Group,Client Id,Modified Time,Keyword,Match Type,Name
Format Version,,,,,,,,,,6.0
Shared Negative Keyword,Active,,-19,,,ClientIdGoesHere,,shoes,Exact,
如果您使用適用于 .NET、JAVA 或 Python 的 Bing 廣告 SDK ,您可以使用 BulkServiceManager 來節省時間來上傳和下載 BulkSharedNegativeKeyword 物件,而不是直接呼叫服務作業,並撰寫自訂程式碼來剖析大量檔案中的每個欄位。
var uploadEntities = new List<BulkEntity>();
// Map properties in the Bulk file to the BulkSharedNegativeKeyword
var bulkSharedNegativeKeyword = new BulkSharedNegativeKeyword
{
// 'Client Id' column header in the Bulk file
ClientId = "ClientIdGoesHere",
// Map properties in the Bulk file to the
// NegativeKeyword object of the Campaign Management service.
NegativeKeyword = new NegativeKeyword
{
// 'Id' column header in the Bulk file
Id = null,
// 'Match Type' column header in the Bulk file
MatchType = MatchType.Exact,
// 'Text' column header in the Bulk file
Text = "shoes"
},
// 'Parent Id' column header in the Bulk file
NegativeKeywordListId = negativeKeywordListIdKey,
// 'Status' column header in the Bulk file
Status = Status.Active
};
uploadEntities.Add(bulkSharedNegativeKeyword);
var entityUploadParameters = new EntityUploadParameters
{
Entities = uploadEntities,
ResponseMode = ResponseMode.ErrorsAndResults,
ResultFileDirectory = FileDirectory,
ResultFileName = DownloadFileName,
OverwriteResultFile = true,
};
var uploadResultEntities = (await BulkServiceManager.UploadEntitiesAsync(entityUploadParameters)).ToList();
對於 共用負數關鍵字 記錄, 大量檔案架構中提供下列屬性欄位。
用戶端識別碼
用來將大量上傳檔案中的記錄與結果檔中的記錄產生關聯。 伺服器不會使用或儲存此欄位的值;它只會從上傳的記錄複製到對應的結果記錄。 它可以是長度上限為 100 的任何有效字串。
添加: 選
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀
識別碼
系統產生的 negative 關鍵字識別碼。
添加: 唯讀
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀和必要
關鍵字
負關鍵字文字。
文字最多可以包含 100 個字元。
添加: 必填
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀
比對類型
要比較 negative 關鍵字和使用者搜尋字詞的相符類型。
negative 關鍵字支援的相符類型值為 Phrase 和 Exact。
添加: 必填
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀
修改時間
上次更新實體的日期和時間。 值為國際標準時間 (UTC)。
注意事項
日期和時間值會反映伺服器上的日期和時間,而不是用戶端。 如需日期和時間格式的相關資訊,請參閱 基本 XML 資料類型中的 dateTime 專案。
添加: 唯讀
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀
父項識別碼
包含 negative 關鍵字之負關鍵字清單的系統產生識別碼。
這個大量欄位會對應至[負關鍵字清單] 記錄的 [標識符] 欄位。
添加: 唯讀和必要。 您必須指定現有的負關鍵字清單識別碼,或指定等於父負關鍵字清單記錄之 [標識符] 欄位的負識別碼。 如果您要將新的負關鍵字新增至相同大量檔案中新的負關鍵字清單,則建議您這麼做。 如需詳細資訊,請 參閱大量檔案架構參考金鑰。
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 唯讀
狀態
表示 negative 關鍵字清單與 negative 關鍵字之間的關聯狀態。
如果 negative 關鍵字與 negative 關鍵字清單相關聯,則此欄位的值為 Active。
可能的值為 [作用中 ] 或 [已刪除]。
添加: 選。 預設值為 Active。
更新: 不適用。 可以新增和刪除負關鍵字,但無法更新。
刪除: 必填。 [狀態] 必須設定為 [ 已刪除]。