Unable to Update CountType for Conversion Goal via SOAP or REST
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 updatedCountType
set toUnique
. The request succeeds with no error, but the change does not persist, theCountType
remains set toAll
. - As an additional test using SOAP, I created a new conversion goal using AddConversionGoals with
CountType
set toUnique
. However, the new goal also defaults toAll
ignoring my specifiedCountType
. - 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 toUnique
.
It seems that:
-
CountType
is not being respected during goal creation or update via SOAP. - 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
}
]
}