Skip to content

Shopping campaign creation fails: Priority string values cause 'request message is null' #14

Description

@ctrlswing

Bug Summary

Creating a Shopping campaign via the mutate tool fails with a cryptic The request message is null error when Priority is passed as a string value (e.g., "Low", "Medium", "High"). The operation passes client-side dry_run validation but fails at the Bing Ads API.

Steps to Reproduce

Fails — Priority as string:

{
  "entity": "campaigns",
  "create": {
    "Name": "Test Shopping Campaign",
    "BudgetType": "DailyBudgetStandard",
    "DailyBudget": 10,
    "CampaignType": "Shopping",
    "Status": "Paused",
    "BiddingScheme": { "Type": "EnhancedCpc" },
    "Settings": [{
      "Type": "ShoppingSetting",
      "StoreId": "3402046",
      "SalesCountryCode": "US",
      "Priority": "Low"
    }]
  }
}

Error: Bing Ads API request failed (400): The request message is null.

Works — Priority as integer:

"Priority": 0

Using Priority: 0 (integer) succeeds and creates the campaign correctly.

Expected Behavior

Either:

  1. The tool should map string values ("Low" -> 0, "Medium" -> 1, "High" -> 2) before sending to the API, or
    1. Client-side validation (dry_run) should reject string values with a clear error message explaining that Priority must be an integer (0/1/2).
      Currently, dry_run passes with Priority: "Low" but the actual API call fails with an unhelpful error.

Additional Context

  • Search campaign creation works fine (no Settings needed).
    • The query tool returns "Low" / "Medium" / "High" strings for existing Shopping campaigns, which creates a natural expectation that the same strings work for creation.
      • StoreId accepts both string and integer types without issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions