Interface CustomerSegmentService

All Known Implementing Classes:
CustomerSegmentServiceImpl

public interface CustomerSegmentService
Service to programatically add customers to segments, determine if a customer is part of a segment, or find all segments for which a customer is a member.
Author:
bpolster
  • Method Details

    • save

      CustomerSegment save(CustomerSegment customerSegment)
      Saves and returns the passed customer segment.
      Parameters:
      customerSegment -
      Returns:
    • save

      Saves and returns the passed PurchaseCustomerCustomerSegmentXref
      Parameters:
      xref -
      Returns:
    • delete

      void delete(CustPrchBasedCustSegXref xref)
      Deletes the passed PurchaseCustomerCustomerSegmentXref
      Parameters:
      xref -
    • findCustomerSegmentsByFilterAndLimit

      List<CustomerSegment> findCustomerSegmentsByFilterAndLimit(String filter, Integer limit)
    • findCustomerSegmentsByLimit

      List<CustomerSegment> findCustomerSegmentsByLimit(Integer limit)
    • readNumberOfCustomerSegments

      Long readNumberOfCustomerSegments()
      Returns the total number of Customer Segments for the current site.
      Returns:
      total number of Customer Segments for the current site.
    • checkCustomerSegmentMembership

      boolean checkCustomerSegmentMembership(CustomerSegment segment, org.broadleafcommerce.profile.core.domain.Customer customer)
      Returns true if the passed in customer is a member of the passed in segment.
      Parameters:
      segment - The segment to check
      customer - The customer to check
      Returns:
    • findCustomerSegmentById

      CustomerSegment findCustomerSegmentById(Long id)
      Returns the CustomerSegment for the given id.
      Parameters:
      id -
      Returns:
    • findCustomerSegmentByIds

      List<CustomerSegment> findCustomerSegmentByIds(List<Long> ids)
    • findCustomerSegmentByName

      CustomerSegment findCustomerSegmentByName(String name)
      Returns the CustomerSegment for the given name.
      Parameters:
      name -
      Returns:
    • findCustomerSegmentsWithMember

      List<CustomerSegment> findCustomerSegmentsWithMember(org.broadleafcommerce.profile.core.domain.Customer customer)
      Returns the list of customer segments for which the customer is a member.
      Parameters:
      customer -
      Returns:
    • findAllOfferCustomerSegmentXrefsByOfferId

      List<OfferCustomerSegmentXref> findAllOfferCustomerSegmentXrefsByOfferId(Long offerId)
      Returns the list of OfferCustomerSegmentXrefs for the given Offer id.
      Parameters:
      offerId -
      Returns:
      list of OfferCustomerSegmentXrefs
    • findAllPurchaseBasedCustomerSegments

      List<CustomerSegment> findAllPurchaseBasedCustomerSegments()
      Finds all customer segments that have purchase requirements
      Returns:
    • findAllCustomersInSegmentWithLatestPurchaseBeforeDate

      List<CustPrchBasedCustSegXref> findAllCustomersInSegmentWithLatestPurchaseBeforeDate(CustomerSegment customerSegment, Date cutoffDate)
      Finds all customers for a customer segment that made a qualifying purchase before the cutoff date
      Parameters:
      customerSegment -
      cutoffDate -
      Returns:
    • findAllPurchaseBasedCustomersInSegment

      List<CustPrchBasedCustSegXref> findAllPurchaseBasedCustomersInSegment(CustomerSegment customerSegment)
    • findCustomerForPurchaseBasedSegment

      CustPrchBasedCustSegXref findCustomerForPurchaseBasedSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer)
      Finds a specific customer in a purchase based customer segment.
      Parameters:
      customerSegment -
      customer -
      Returns:
    • findAllPurchaseBasedCustomersInSegment

      List<CustPrchBasedCustSegXref> findAllPurchaseBasedCustomersInSegment(int size, int start, CustomerSegment segment)
    • findAllCustomersWithPurchasesInDateRange

      List<Long> findAllCustomersWithPurchasesInDateRange(int size, int start, PurchBasedCustSegConfigDTO config)
    • findCountAllPurchaseBasedCustomersInSegment

      int findCountAllPurchaseBasedCustomersInSegment(CustomerSegment segment)
    • findCountAllCustomersWithPurchasesInDateRange

      int findCountAllCustomersWithPurchasesInDateRange(PurchBasedCustSegConfigDTO config)
    • archiveCustomerPurchaseBasedCustomerSegmentXrefs

      int archiveCustomerPurchaseBasedCustomerSegmentXrefs(List<Long> customerIds, Long segmentId)
    • customerIdentifiesWithCustomerSegment

      boolean customerIdentifiesWithCustomerSegment(Long segmentId, org.broadleafcommerce.profile.core.domain.Customer customer)
    • findBatchCustomerCustomerSegXrefs

      List<CustomerCustomerSegmentXref> findBatchCustomerCustomerSegXrefs(Long firstId, int count)
      Returns list of CustomerCustomerSegmentXrefs starting at start up to start+count.
    • findBatchCustomerCustomerSegXrefs

      List<CustomerCustomerSegmentXref> findBatchCustomerCustomerSegXrefs(int firstRecord, int count)
    • findBatchXrefsForCustomerSegment

      List<CustomerCustomerSegmentXref> findBatchXrefsForCustomerSegment(Long customerSegmentId, Long firstId, int count)
      Returns list of CustomerCustomerSegmentXrefs for a specific CustomerSegment starting at start up to start+count.
    • clear

      void clear()
    • findBatchXrefsForCustomerSegment

      List<CustomerCustomerSegmentXref> findBatchXrefsForCustomerSegment(Long customerSegmentId, Integer recordNumber, int count)
    • getNumberOfCustomerCustomerSegXrefs

      Long getNumberOfCustomerCustomerSegXrefs()
    • getNumberOfXrefsForCustomerSegment

      Long getNumberOfXrefsForCustomerSegment(Long customerSegmentId)