SAP Knowledge Base Article - Public

2575403 - Not able to create Lead Contact data with OData API

Symptom

You want to POST lead with contact data but ContactFirstName and ContactLastName cannot be updated.

Environment

SAP CLOUD FOR CUSTOMER

Reproducing the Issue

URL: https://<TenantURL>/sap/c4c/odata/v1/c4codata/LeanLeadCollection

Payload:

{
"AccountPartyID": "XXX",
"ContactFirstName": "XXX",
"ContactLastName": "XXX",
"Name": "XXX",
"OriginTypeCode": "XXX",
"OriginTypeCodeText": "XXX",
"OwnerPartyID": "XXX"
}

Contact field is blank in the created Lead

Cause

The cause of the issue might be that you want to create a lead with Active Account (exsiting account) and Inactive Contact (contact does not exist). The scenario is not supported in lead creation via LEADS OWL > New and also OData API.

Resolution

You should create a lead with valid use cases:

Option 1) with Active Account and Active Contact

{
"AccountPartyID": "XXX",
"ContactID": "XXX",  (existing contact)
"Name": "XXX",
"OriginTypeCode": "XXX",
"OriginTypeCodeText": "XXX",
"OwnerPartyID": "XXX"
}

Option 2) with Inactive Account and Inactive Contact (like in UI you enter company name, contact first / last name)

{
"Company ": "XXX",
"ContactFirstName": "XXX",
"ContactLastName": "XXX",
"Name": "XXX",
"OriginTypeCode": "XXX",
"OriginTypeCodeText": "XXX",
"OwnerPartyID": "XXX"

}

Keywords

KBA , LOD-LE-MKT-LEA , Lead , How To

Product

SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions