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 Summary
Modifier and TypeMethodDescriptionintarchiveCustomerPurchaseBasedCustomerSegmentXrefs(List<Long> customerIds, Long segmentId) booleancheckCustomerSegmentMembership(CustomerSegment segment, org.broadleafcommerce.profile.core.domain.Customer customer) Returns true if the passed in customer is a member of the passed in segment.voidclear()booleancustomerIdentifiesWithCustomerSegment(Long segmentId, org.broadleafcommerce.profile.core.domain.Customer customer) voidDeletes the passed PurchaseCustomerCustomerSegmentXreffindAllCustomersInSegmentWithLatestPurchaseBeforeDate(CustomerSegment customerSegment, Date cutoffDate) Finds all customers for a customer segment that made a qualifying purchase before the cutoff datefindAllCustomersWithPurchasesInDateRange(int size, int start, PurchBasedCustSegConfigDTO config) Returns the list of OfferCustomerSegmentXrefs for the given Offer id.Finds all customer segments that have purchase requirementsfindAllPurchaseBasedCustomersInSegment(int size, int start, CustomerSegment segment) findAllPurchaseBasedCustomersInSegment(CustomerSegment customerSegment) findBatchCustomerCustomerSegXrefs(int firstRecord, int count) findBatchCustomerCustomerSegXrefs(Long firstId, int count) Returns list of CustomerCustomerSegmentXrefs starting at start up to start+count.findBatchXrefsForCustomerSegment(Long customerSegmentId, Integer recordNumber, int count) findBatchXrefsForCustomerSegment(Long customerSegmentId, Long firstId, int count) Returns list of CustomerCustomerSegmentXrefs for a specific CustomerSegment starting at start up to start+count.intintfindCustomerForPurchaseBasedSegment(CustomerSegment customerSegment, org.broadleafcommerce.profile.core.domain.Customer customer) Finds a specific customer in a purchase based customer segment.Returns the CustomerSegment for the given id.findCustomerSegmentByIds(List<Long> ids) Returns the CustomerSegment for the given name.findCustomerSegmentsByFilterAndLimit(String filter, Integer limit) findCustomerSegmentsWithMember(org.broadleafcommerce.profile.core.domain.Customer customer) Returns the list of customer segments for which the customer is a member.getNumberOfXrefsForCustomerSegment(Long customerSegmentId) Returns the total number of Customer Segments for the current site.save(CustomerSegment customerSegment) Saves and returns the passed customer segment.save(CustPrchBasedCustSegXref xref) Saves and returns the passed PurchaseCustomerCustomerSegmentXref
-
Method Details
-
save
Saves and returns the passed customer segment.- Parameters:
customerSegment-- Returns:
-
save
Saves and returns the passed PurchaseCustomerCustomerSegmentXref- Parameters:
xref-- Returns:
-
delete
Deletes the passed PurchaseCustomerCustomerSegmentXref- Parameters:
xref-
-
findCustomerSegmentsByFilterAndLimit
-
findCustomerSegmentsByLimit
-
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 checkcustomer- The customer to check- Returns:
-
findCustomerSegmentById
Returns the CustomerSegment for the given id.- Parameters:
id-- Returns:
-
findCustomerSegmentByIds
-
findCustomerSegmentByName
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
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
-
findCountAllCustomersWithPurchasesInDateRange
-
archiveCustomerPurchaseBasedCustomerSegmentXrefs
-
customerIdentifiesWithCustomerSegment
boolean customerIdentifiesWithCustomerSegment(Long segmentId, org.broadleafcommerce.profile.core.domain.Customer customer) -
findBatchCustomerCustomerSegXrefs
Returns list of CustomerCustomerSegmentXrefs starting at start up to start+count. -
findBatchCustomerCustomerSegXrefs
-
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
-