2 Replies Latest reply on May 14, 2014 6:32 PM by Dev Influitive

    How to add a custom Lead attribute from the SOAP API?

    Dev Influitive
           Marketo SOAP API related question:
            
           In the docs it's mentioned that:
            
           Additional fields can be added to a lead record to extend the profile of a lead. Custom attributes can be read and written to just as the standard fields.
            
           so I would expect that updating a Lead with a custom (boolean) `Activated` attribute to be successful. 

                Yet I get the following exception in response:
      HTTPI POST request to XXX-XXX-XXX.mktoapi.com (httpclient)
      SOAP response (status 500)
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP-ENV:Body>
          <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Client</faultcode>
            <faultstring>20105 - Unknown lead field</faultstring>
            <detail>
              <ns1:serviceException xmlns:ns1="http://www.marketo.com/mktows/">
                <name>mktServiceException</name>
                <message>syncLead operation failed: unknown fields for import: Activated (20105)</message>
                <code>20105</code>
              </ns1:serviceException>
            </detail>
          </SOAP-ENV:Fault>
        </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
            
           Help me understand: does the line about "Additional fields can be added to a lead record..." refer more to being able to do it in the Marketo Admin, but not necessarily from an API call? 
            
           Or should we be able to straight from the API as well?