Interface SFDCService

  • All Known Implementing Classes:
    SFDCServiceImpl

    public interface SFDCService
    Public interface for the Salesforce connector
    • 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 server
        IOException - thrown if there was an error communicating with the Salesforce server
      • 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.
      • getRecentLeadIds

        Set<String> getRecentLeadIds()
      • findLeadIdsByIdentifierValue

        Set<String> findLeadIdsByIdentifierValue​(String identifierFieldValue)