Managing User Custom Fields via API Method

The node <CustomFields> is not required and may have children where custom fields are specified:

        <CUSTOMFIELD>
          <NAME>CUSTOMFIELDSNAME</NAME>
          <VALUE>CUSTOMFIELDVALUE</VALUE>
        </CUSTOMFIELD>

SAP CPQ will look for specified custom fields and assign values accordingly.

SAP CPQ will not update custom fields nor delete their content during user update unless this has been specified in XML.

Exception Handling

If the provided custom field is not recognized in SAP CPQ, the following message will pop up “Specified Custom Field ‘Street 3’ doesn’t exist in the system.”

The response will be as follow

  <RESPONSE XMLNS="">
  <RESULT>NOK</RESULT> 
  <ERROR>
        <CODE>103005</CODE>
        <MESSAGE> SPECIFIED CUSTOM FIELD 'STREET 3' DOESN'T EXIST IN THE SYSTEM</MESSAGE>
  </ERROR>
  </RESPONSE>

The following is an input XML sample that can be used when calling the API Method for updating custom fields:

  <USERPROPERTIES>
   <USERNAME>AOSHEPAR</USERNAME>
   <PASSWORD>EASUP4SSW0RD</PASSWORD>
   <TITLE>MR.</TITLE>
   <FIRSTNAME>ADAM</FIRSTNAME>
   <LASTNAME>SHEPARD</LASTNAME>
   <TYPE>BU DRIVES</TYPE>
   <EMAILADDRESS>ADAM.O.SHEPARD@US.ACME.COM</EMAILADDRESS>
   <ADDRESS1>16250 W GLENDATE DR</ADDRESS1>
   <ADDRESS2 />
   <CITY>NEW BERLIN</CITY>
   <STATE>WI</STATE>
   <ZIPCODE>53151</ZIPCODE>
   <COUNTRY>UNITED STATES</COUNTRY>
   <PHONENUMBER>111222333</PHONENUMBER>
   <FAXNUMBER />
   <COMPANYCODE>ACME</COMPANYCODE>
   <MUSTCHANGEPASSWORD>0</MUSTCHANGEPASSWORD>
   <PASSWORDLOCKED>0</PASSWORDLOCKED>
   <ORDERINGPARENT>NZAGORAC</ORDERINGPARENT>
   <MANGAGINGPARENT>PPETROVIC</MANGAGINGPARENT>
   <APPROVINGPARENT>VZARIC</APPROVINGPARENT>
   <CRMUSERID>WEBCOM/CLESAR@WEBCOMINC.COM</CRMUSERID>
   <CRMNAME>WEBCOM/CLESAR@WEBCOMINC.COM</CRMNAME>
   <CRMUSERNAME></CRMUSERNAME>
   <CRMPASSWORD>WEBCOM123</CRMPASSWORD>
   <CUSTOMFIELDS>
     <CUSTOMFIELD>
       <NAME>STREET 3</NAME>
       <VALUE>YONGE STREET</VALUE>
     </CUSTOMFIELD>
     <CUSTOMFIELD>
       <NAME>CELL PHONE NUMBER</NAME>
       <VALUE>4422445666</VALUE>
     </CUSTOMFIELD>
   </CUSTOMFIELDS>
  </USERPROPERTIES>

Keep in mind that XML is case sensitive. This means that the node names written in uppercase and lowercase letters will not accomplish the same results. The convention of the Simple User API calls should be created in the uppercase letters.

You are here: CallidusCloud SAP CPQ Online HelpSAP CPQ APIUser Administration Web MethodManaging User Custom Fields via API Method