Unable to Update CountType for Conversion Goal via SOAP or REST

Aimee Blair 0 Reputation points
2025-05-06T13:24:52.0266667+00:00

I'm trying to update the CountType on an existing conversion goal using the UpdateConversionGoals operation. I'm trying to change the CountType from All to Unique.

  • Using SOAP, I send the UpdateConversionGoals request, including the updated CountType set to Unique. The request succeeds with no error, but the change does not persist, the CountType remains set to All.
  • As an additional test using SOAP, I created a new conversion goal using AddConversionGoals with CountType set to Unique. However, the new goal also defaults to All ignoring my specified CountType.
  • I tried switching to the REST API, but UpdateConversionGoals via REST returns the error The Conversion Goal ID must be null. Which contradicts the documentation which shows that the ID should be entered in the request JSON.
  • I tried creating a new conversion goal with REST and it did create the new goal with the CountType set to Unique.

It seems that:

  1. CountType is not being respected during goal creation or update via SOAP.
  2. Updating the conversion goal via REST isn't working due to the ID error.

Am I missing something with how the CountType is handled in the API? Is this a known bug or limitation with the Microsoft Advertising API?

SOAP Request - UpdateConversionGoals (trying to set CountType to Unique, does not change)

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Action mustUnderstand="1">UpdateConversionGoals</Action>
<AuthenticationToken i:nil="false">HIDDEN</AuthenticationToken>
<CustomerAccountId i:nil="false">HIDDEN</CustomerAccountId>
<CustomerId i:nil="false">HIDDEN</CustomerId>
<DeveloperToken i:nil="false">HIDDEN</DeveloperToken>
</s:Header>
<s:Body>
<UpdateConversionGoalsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<ConversionGoals i:nil="false">
<ConversionGoal i:type="OfflineConversionGoal">
<ConversionWindowInMinutes i:nil="false">86400</ConversionWindowInMinutes>
<GoalCategory i:nil="false">Contact</GoalCategory>
<CountType i:nil="false">Unique</CountType>
<Id i:nil="false">42036279</Id>
<Name i:nil="false">Leads Test 3</Name>
<Revenue i:nil="false">
<CurrencyCode i:nil="true"></CurrencyCode>
<Type i:nil="false">VariableValue</Type>
<Value i:nil="false">0</Value>
</Revenue>
<Scope i:nil="false">Account</Scope>
<Status i:nil="false">Active</Status>
<Type i:nil="false">OfflineConversion</Type>
<TagId i:nil="true"/>
</ConversionGoal>
</ConversionGoals>
</UpdateConversionGoalsRequest>
</s:Body>
</s:Envelope>

SOAP Request - AddConversionGoals (CountType set to Unique, defaults to All)

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
          <s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
            <Action mustUnderstand="1">AddConversionGoals</Action>
            <AuthenticationToken i:nil="false">HIDDEN</AuthenticationToken>
            <CustomerAccountId i:nil="false">HIDDEN</CustomerAccountId>
            <CustomerId i:nil="false">HIDDEN</CustomerId>
            <DeveloperToken i:nil="false">HIDDEN</DeveloperToken>
          </s:Header>
          <s:Body>
            <AddConversionGoalsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
              <ConversionGoals i:nil="false">
                <ConversionGoal i:type="OfflineConversionGoal">
                  <ConversionWindowInMinutes i:nil="false">86400</ConversionWindowInMinutes>
                  <GoalCategory i:nil="false">Contact</GoalCategory>
                  <IsEnhancedConversionsEnabled i:nil="false">true</IsEnhancedConversionsEnabled>
                  <CountType i:nil="false">Unique</CountType>
                  <Name i:nil="false">Leads Test 4</Name>
                  <Revenue i:nil="false">
                    <CurrencyCode i:nil="true"></CurrencyCode>
                    <Type i:nil="false">VariableValue</Type>
                    <Value i:nil="false">0</Value>
                  </Revenue>
                  <Scope i:nil="false">Account</Scope>
                  <Status i:nil="false">Active</Status>
                  <Type i:nil="false">OfflineConversion</Type>
                </ConversionGoal>
              </ConversionGoals>
            </AddConversionGoalsRequest>
          </s:Body>
        </s:Envelope>

REST Request - UpdateConversionGoals (returns Conversion Goal Id Must be null error)
Endpoint: https://campaign.api.bingads.microsoft.com/CampaignManagement/v13/ConversionGoals
Body:

curl --___location 'https://campaign.api.bingads.microsoft.com/CampaignManagement/v13/ConversionGoals' \
--header 'Authorization: Bearer HIDDEN' \
--header 'DeveloperToken: HIDDEN' \
--header 'CustomerId: HIDDEN' \
--header 'CustomerAccountId: HIDDEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
  "ConversionGoals": [
    {
      "CountType": "Unique",
      "Type": "OfflineConversion",
      "Name": "Leads Test 4",
      "Id": "42036279",
      "GoalCategory": "Contact",
      "Revenue": {
        "Type": "VariableValue",
        "Value": 0
      }
    }
  ]
}

Response:

{
    "ConversionGoalIds": [
        null
    ],
    "PartialErrors": [
        {
            "FieldPath": null,
            "ErrorCode": "ConversionGoalIdIsNotNull",
            "Message": "The Conversion Goal ID must be null.",
            "Code": 5324,
            "Details": null,
            "Index": 0,
            "Type": "BatchError",
            "ForwardCompatibilityMap": null
        }
    ]
}
Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
483 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.