public interface LeadService extends BatchService<LeadServiceBatch>
The service contains header, item, person responsible, and text entities. The information is sent in the request as a payload. All information is used when creating, updating or deleting a lead data, including appropriate checks for restricted values and authorizations. Once the lead has been created or updated, the lead information is sent in the response. If there are any issues when the lead is created or updated, the system returns error messages. In each API call, you can use the following operations: - Retrieve leads. - Create leads. Note: You must use “deep insert” requests (a header plus the following entities: person responsible, text, and item). - Create new item, person responsible, text for existing leads. - Update the header, person responsible, text, and item for existing leads. - Delete the person responsible, text, and item for existing leads. .
Reference: SAP API Business Hub
OData Service: | OP_API_LEAD_SRV_0001 |
API Version: | 1 |
Minimum ERP Version: | 2020 |
Authentication Methods: | Basic, x509 |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVICE_PATH
If no other path was provided via the
withServicePath(String) method, this is the default service path
used to access the endpoint. |
Modifier and Type | Method and Description |
---|---|
LeadCreateFluentHelper |
createLead(Lead lead)
Create a new
Lead entity
and save it to the S/4HANA system. |
LeadItemCreateFluentHelper |
createLeadItem(LeadItem leadItem)
Create a new
LeadItem
entity and save it to the S/4HANA system. |
LeadPersonRespCreateFluentHelper |
createLeadPersonResp(LeadPersonResp leadPersonResp)
Create a new
LeadPersonResp entity and save it to the S/4HANA system. |
LeadTextCreateFluentHelper |
createLeadText(LeadText leadText)
Create a new
LeadText
entity and save it to the S/4HANA system. |
LeadItemDeleteFluentHelper |
deleteLeadItem(LeadItem leadItem)
Deletes an existing
LeadItem entity in the S/4HANA system. |
LeadPersonRespDeleteFluentHelper |
deleteLeadPersonResp(LeadPersonResp leadPersonResp)
Deletes an existing
LeadPersonResp
entity in the S/4HANA system. |
LeadTextDeleteFluentHelper |
deleteLeadText(LeadText leadText)
Deletes an existing
LeadText entity in the S/4HANA system. |
LeadFluentHelper |
getAllLead()
Fetch multiple
Lead
entities. |
LeadItemFluentHelper |
getAllLeadItem()
Fetch multiple
LeadItem
entities. |
LeadPersonRespFluentHelper |
getAllLeadPersonResp()
Fetch multiple
LeadPersonResp entities. |
LeadTextFluentHelper |
getAllLeadText()
Fetch multiple
LeadText
entities. |
LeadByKeyFluentHelper |
getLeadByKey(String lead)
Fetch a single
Lead entity
using key fields. |
LeadItemByKeyFluentHelper |
getLeadItemByKey(String lead,
String leadItem)
Fetch a single
LeadItem
entity using key fields. |
LeadPersonRespByKeyFluentHelper |
getLeadPersonRespByKey(String lead,
String responsibleEmployee)
Fetch a single
LeadPersonResp entity using key fields. |
LeadTextByKeyFluentHelper |
getLeadTextByKey(String lead,
String textObjectType,
String language)
Fetch a single
LeadText
entity using key fields. |
LeadUpdateFluentHelper |
updateLead(Lead lead)
Update an existing
Lead
entity and save it to the S/4HANA system. |
LeadItemUpdateFluentHelper |
updateLeadItem(LeadItem leadItem)
Update an existing
LeadItem entity and save it to the S/4HANA system. |
LeadPersonRespUpdateFluentHelper |
updateLeadPersonResp(LeadPersonResp leadPersonResp)
Update an existing
LeadPersonResp entity and save it to the S/4HANA system. |
LeadTextUpdateFluentHelper |
updateLeadText(LeadText leadText)
Update an existing
LeadText entity and save it to the S/4HANA system. |
LeadService |
withServicePath(String servicePath)
Overrides the default service path and returns a new service instance with the specified service path.
|
batch
static final String DEFAULT_SERVICE_PATH
withServicePath(String)
method, this is the default service path
used to access the endpoint.@Nonnull LeadService withServicePath(@Nonnull String servicePath)
servicePath
- Service path that will override the default.@Nonnull LeadFluentHelper getAllLead()
Lead
entities.@Nonnull LeadByKeyFluentHelper getLeadByKey(String lead)
Lead
entity
using key fields.lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
Lead
entity using
key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadCreateFluentHelper createLead(@Nonnull Lead lead)
Lead
entity
and save it to the S/4HANA system.@Nonnull LeadUpdateFluentHelper updateLead(@Nonnull Lead lead)
Lead
entity and save it to the S/4HANA system.@Nonnull LeadItemFluentHelper getAllLeadItem()
LeadItem
entities.@Nonnull LeadItemByKeyFluentHelper getLeadItemByKey(String lead, String leadItem)
LeadItem
entity using key fields.leadItem
- Shortened Item Number in Document
Constraints: Not nullable, Maximum length: 6
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
LeadItem
entity
using key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadItemCreateFluentHelper createLeadItem(@Nonnull LeadItem leadItem)
LeadItem
entity and save it to the S/4HANA system.@Nonnull LeadItemUpdateFluentHelper updateLeadItem(@Nonnull LeadItem leadItem)
LeadItem
entity and save it to the S/4HANA system.@Nonnull LeadItemDeleteFluentHelper deleteLeadItem(@Nonnull LeadItem leadItem)
LeadItem
entity in the S/4HANA system.@Nonnull LeadPersonRespFluentHelper getAllLeadPersonResp()
LeadPersonResp
entities.LeadPersonResp
entities. This fluent helper allows methods which modify the underlying query to be
called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadPersonRespByKeyFluentHelper getLeadPersonRespByKey(String lead, String responsibleEmployee)
LeadPersonResp
entity using key fields.lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
responsibleEmployee
- Business Partner Number
Constraints: Not nullable, Maximum length: 10
LeadPersonResp
entity using key fields. This fluent helper allows methods which modify the underlying
query to be called before executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadPersonRespCreateFluentHelper createLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadPersonResp
entity and save it to the S/4HANA system.leadPersonResp
- LeadPersonResp
entity object that will be created in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadPersonRespUpdateFluentHelper updateLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadPersonResp
entity and save it to the S/4HANA system.leadPersonResp
- LeadPersonResp
entity object that will be updated in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadPersonRespDeleteFluentHelper deleteLeadPersonResp(@Nonnull LeadPersonResp leadPersonResp)
LeadPersonResp
entity in the S/4HANA system.leadPersonResp
- LeadPersonResp
entity object that will be deleted in the S/4HANA system.LeadPersonResp
entity. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadTextFluentHelper getAllLeadText()
LeadText
entities.@Nonnull LeadTextByKeyFluentHelper getLeadTextByKey(String lead, String textObjectType, String language)
LeadText
entity using key fields.textObjectType
- Text ID
Constraints: Not nullable, Maximum length: 4
language
- Language Key
Constraints: Not nullable, Maximum length: 2
lead
- Transaction ID
Constraints: Not nullable, Maximum length: 10
LeadText
entity
using key fields. This fluent helper allows methods which modify the underlying query to be called before
executing the query itself. To perform execution, call the
execute
method on the fluent helper object.@Nonnull LeadTextCreateFluentHelper createLeadText(@Nonnull LeadText leadText)
LeadText
entity and save it to the S/4HANA system.@Nonnull LeadTextUpdateFluentHelper updateLeadText(@Nonnull LeadText leadText)
LeadText
entity and save it to the S/4HANA system.@Nonnull LeadTextDeleteFluentHelper deleteLeadText(@Nonnull LeadText leadText)
LeadText
entity in the S/4HANA system.Copyright © 2021 SAP SE. All rights reserved.