How To Associate Product To A Lead During The Creation Through WebService - Create Sales Lead Version2 WebService (Doc ID 1997582.1)

Last updated on MAY 18, 2015

Applies to:

Oracle Fusion Lead Management Cloud Service - Version 11.1.9.2.0 and later
Information in this document applies to any platform.

Goal

Tried to create SalesLead through webservice Sales Lead Service Version 2 using operation createSalesLead , in which trying to associate a Product created previously using this payload sample :


 
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/types/"
xmlns:lead="http://xmlns.oracle.com/oracle/apps/marketing/leadMgmt/leads/leadService/"
xmlns:lead1="http://xmlns.oracle.com/apps/marketing/leadMgmt/leads/leadService/" xmlns:not="http://xmlns.oracle.com/apps/crmCommon/notes/noteService"
xmlns:not1="http://xmlns.oracle.com/apps/crmCommon/notes/flex/noteDff/">
  <soapenv:Header/>
   <soapenv:Body>
      <typ:createSalesLead>
         <typ:salesLead>
            <lead:Name>New_Sun2</lead:Name>
            <lead:StatusCode>UNQUALIFIED</lead:StatusCode>
            <lead:CurrencyCode>USD</lead:CurrencyCode>          
            <lead:MklProdAssoc1>
  <lead1:LeadProductId>300000007075543</lead1:LeadProductId>
  <lead1:ProductGroupId>300000003618506</lead1:ProductGroupId>
            </lead:MklProdAssoc1>
         </typ:salesLead>
      </typ:createSalesLead>
   </soapenv:Body>
  </soapenv:Envelope>
 


 
But getting error as  "Constraint "MKL_LEAD_ITEMS_ASSOC_PK" is violated during post operation "Insert" using SQL statement "  which means LeadProductId cannot be used here.
 
Tried creating using ProductGroupId alone, which was successful but that creates a new product entry in db, with a new LeadProductId. What is needed is to associate the SalesLead with a previous product during creation of salesLead only.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms