Package org.apache.unomi.sfdc.services
Interface SFDCService
-
- All Known Implementing Classes:
SFDCServiceImpl
public interface SFDCServicePublic interface for the Salesforce connector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateOrUpdateLead(Profile profile)Create or update a lead based on a Unomi profile.Set<String>findLeadIdsByIdentifierValue(String identifierFieldValue)Map<String,Object>getLead(String leadId)Map<String,Object>getLimits()Set<String>getRecentLeadIds()SFDCSessiongetSFDCSession()SFDCConfigurationloadConfiguration()Load the configuration from the persistence service (if it exists)booleanlogin(SFDCConfiguration sfdcConfiguration)Login into Salesforce using the configuration passed in the methods arguments.voidlogout()Map<String,Object>query(String query)booleansaveConfiguration(SFDCConfiguration sfdcConfiguration)Save a Salesforce configuration into the persistence servicebooleanupdateProfileFromLead(Profile profile)Updates a Unomi profile from a Salesforce lead
-
-
-
Method Detail
-
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
boolean saveConfiguration(SFDCConfiguration sfdcConfiguration)
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
String createOrUpdateLead(Profile profile)
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
boolean updateProfileFromLead(Profile profile)
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.
-
-