无法使用AddConversionGoals API添加离线转化目标 [英] Unable to add an Offline Conversion Goal using AddConversionGoals API

查看:56
本文介绍了无法使用AddConversionGoals API添加离线转化目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

经过多次尝试创建离线转化目标后,我遇到了一个错误,我无法确定问题:

After numerous attempts to create an offline Conversion Goal, I've gotten an error where I am unable to pinpoint the issue:

我的SOAP请求 

my SOAP request 

<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/v12">
    <Action mustUnderstand="1">AddConversionGoals</Action>
    <AuthenticationToken i:nil="false">******</AuthenticationToken>
    <CustomerAccountId i:nil="false">******</CustomerAccountId>
    <CustomerId i:nil="false">******</CustomerId>
    <DeveloperToken i:nil="false">******</DeveloperToken>
  </s:Header>
  <s:Body>
    <AddConversionGoalsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v12">
      <ConversionGoals i:nil="false">
        <ConversionGoal i:type="OfflineConversionGoal">
          <ConversionWindowInMinutes i:nil="false">129600</ConversionWindowInMinutes>
          <CountType i:nil="false">All</CountType>
          <Id i:nil="false"></Id>
          <Name i:nil="false">Test</Name>
          <Revenue i:nil="false">
            <CurrencyCode i:nil="false">USDollar</CurrencyCode>
            <Type i:nil="false">FixedValue</Type>
            <Value i:nil="false">0.05</Value>
          </Revenue>
          <Scope i:nil="false">Account</Scope>
          <Status i:nil="false">Active</Status>
          <TagId i:nil="false"></TagId>
          <TrackingStatus i:nil="false">NoRecentConversions</TrackingStatus>
          <Type i:nil="false">OfflineConversion</Type>
        </ConversionGoal>
      </ConversionGoals>
    </AddConversionGoalsRequest>
  </s:Body>
</s:Envelope>

回复:  ;

The Response: 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFailed</faultcode>
         <faultstring xml:lang="en-US">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/CampaignManagement/v12:ConversionGoals. The InnerException message was 'There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts.V12.ConversionGoal[]. The value '' cannot be parsed as the type 'Int64'.'.  Please see InnerException for more details.</faultstring>
         <detail>
            <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
               <HelpLink i:nil="true"/>
               <InnerException>
                  <HelpLink i:nil="true"/>
                  <InnerException>
                     <HelpLink i:nil="true"/>
                     <InnerException>
                        <HelpLink i:nil="true"/>
                        <InnerException i:nil="true"/>
                        <Message>Input string was not in a correct format.</Message>
                        <StackTrace>at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Xml.XmlConverter.ToInt64(String value)</StackTrace>
                        <Type>System.FormatException</Type>
                     </InnerException>
                     <Message>The value '' cannot be parsed as the type 'Int64'.</Message>
                     <StackTrace>at System.Xml.XmlConverter.ToInt64(String value)
   at System.Xml.XmlDictionaryReader.ReadElementContentAsLong()
   at ReadOfflineConversionGoalFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
   at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract&amp; dataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
   at ReadArrayOfConversionGoalFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )
   at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract&amp; dataContract)
   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)</StackTrace>
                     <Type>System.Xml.XmlException</Type>
                  </InnerException>
                  <Message>There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts.V12.ConversionGoal[]. The value '' cannot be parsed as the type 'Int64'.</Message>
                  <StackTrace>at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)
   at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.PartInfo.ReadObject(XmlDictionaryReader reader, XmlObjectSerializer serializer)
   at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)</StackTrace>
                  <Type>System.Runtime.Serialization.SerializationException</Type>
               </InnerException>
               <Message>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/CampaignManagement/v12:ConversionGoals. The InnerException message was 'There was an error deserializing the object of type Microsoft.AdCenter.Advertiser.CampaignManagement.Api.DataContracts.V12.ConversionGoal[]. The value '' cannot be parsed as the type 'Int64'.'.  Please see InnerException for more details.</Message>
               <StackTrace>at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
   at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, Boolean isRequest)
   at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
   at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
   at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
               <Type>System.ServiceModel.Dispatcher.NetDispatcherFaultException</Type>
            </ExceptionDetail>
         </detail>
      </s:Fault>
   </s:Body>
</s:Envelope>




我已按照说明操作来自:

I've followed the directions from:

https://docs.microsoft.com/en-us/bingads/campaign-management-service/addconversiongoals?view=bingads-12

https://docs.microsoft.com/en-us/bingads/campaign-management-service/addconversiongoals?view=bingads-12

https://docs.microsoft.com/en-us/bingads/campaign-management-service/conversiongoal?view=bingads-12

https://docs.microsoft.com/en-us/bingads/campaign-management-service/conversiongoal?view=bingads-12

能帮我解决问题吗?

Can you please help me to locale the issue?

谢谢!

推荐答案

以下是一些初步建议:

Here are a few initial suggestions:


  • 删除
    Id元素
    因为它是只读的。如果你包含它,那么它应该是nil(非空值),例如,< Id i:nil =" true" />
  • 删除
    TagId

    TrackingStatus
    元素,因为它们不适用于OfflineConversion。如果您包含TagId ,则它应为nil(非空值),例如< TagId i:nil =" true" />
  • Remove the Id element since it is read-only. If you include it, then it should be nil (not empty value) e.g., <Id i:nil="true" />
  • Remove the TagId and TrackingStatus elements since they are not applicable to OfflineConversion. If you include TagId , then it should be nil (not empty value) e.g., <TagId i:nil="true" />



我希望这会有所帮助!


I hope this helps!

Eric


这篇关于无法使用AddConversionGoals API添加离线转化目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆