Package org.apache.unomi.sfdc.services
Interface SFDCService
- All Known Implementing Classes:
SFDCServiceImpl
public interface SFDCService
Public interface for the Salesforce connector
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrUpdateLead
(Profile profile) Create or update a lead based on a Unomi profile.findLeadIdsByIdentifierValue
(String identifierFieldValue) Load the configuration from the persistence service (if it exists)boolean
login
(SFDCConfiguration sfdcConfiguration) Login into Salesforce using the configuration passed in the methods arguments.void
logout()
boolean
saveConfiguration
(SFDCConfiguration sfdcConfiguration) Save a Salesforce configuration into the persistence serviceboolean
updateProfileFromLead
(Profile profile) Updates a Unomi profile from a Salesforce lead
-
Method Details
-
loadConfiguration
SFDCConfiguration loadConfiguration()Load the configuration from the persistence service (if it exists)- Returns:
- an instance of the configuration if it was found, null otherwise
-
saveConfiguration
Save a Salesforce configuration into the persistence service- Parameters:
sfdcConfiguration
- the configuration to persist- Returns:
- a boolean indicating if the save was successful or not
-
login
boolean login(SFDCConfiguration sfdcConfiguration) throws org.apache.http.HttpException, IOException Login into Salesforce using the configuration passed in the methods arguments.- Parameters:
sfdcConfiguration
- the configuration to use for the login- Returns:
- true if the login was successful, false otherwise
- Throws:
org.apache.http.HttpException
- thrown if there was an error communicating with the Salesforce serverIOException
- thrown if there was an error communicating with the Salesforce server
-
getSFDCSession
SFDCSession getSFDCSession() -
logout
void logout() -
createOrUpdateLead
Create or update a lead based on a Unomi profile.- Parameters:
profile
- the Unomi profile to use to update leads- Returns:
- a String containing the identifier of the corresponding SFDC lead
-
updateProfileFromLead
Updates a Unomi profile from a Salesforce lead- Parameters:
profile
- the profile to update with the data coming from the lead- Returns:
- true if the profile was updated, false otherwise.
-
getRecentLeadIds
-
getLead
-
query
-
findLeadIdsByIdentifierValue
-
getLimits
-