Customer Segment Service Tutorials
Customer Segment Service allows you to group your customers in many convenient ways that suit different purposes. You can assign products or categories to create targeted marketing campaigns and display the relevant items on the storefront. The flexible service's API facilitates configuring and managing customer segments.
How to add a customer segment
info
customersegment.segment_manage
scope.Create a customer segment
Create a customer segment by sending a request to the theAdd products/categories to a segment
Connect the segment with specific products and/or categories for more customized content.
- To add an individual product or a category, call the
Updating an item assignment endpoint.
- To assign multiple products or categories to the segment, call the
Updating multiple item assignments endpoint.
attention
UPSERT
operation. The UPSERT
means that if an item is already assigned to a segment, the assignment gets updated. If not, the new one is created in the system.Add segment members
Now, add customers to the segment. Depending on your setup and purpose, you can add B2B or B2C customers.
- To add a B2B customer, send the request to the
[B2B] Updating a customer assignment endpoint.
- To add a B2C customer, send the request to the
[B2C] Updating a customer assignment endpoint.
- To add multiple customers at once, send the request to the
Updating multiple customer assignments endpoint.
attention
UPSERT
operation. The UPSERT
means that if a customer is already assigned to a segment, the assignment gets updated. If not, the customer assignment is created in the system.How to find a specific segment using search parameters
info
customersegment.segment_read
scope to retrieve all customer segments.q
parameter.How to apply a coupon to a segment
Optionally, you can offer a discount coupon to a customer segment. The coupon then applies only to the assigned products/categories and is valid only for the customers that are the segment members. To create a coupon that is valid only for a specific segment, send the request to thesegmentRestricted
parameter as true
and specify the segments you want to apply the coupon to.How to use customer segments on a storefront
Having segments in place, you can use that functionality on your storefront. Depending on your business goals, you can utilize the segments differently. Decide whether you'd like to extend the assortment with the products/categories assigned to a given segment to, for example, promote certain items on your site. Or, you'd rather limit products/categories visibility to only those that a segment defines for segment members, to be able to sell specified products through a channel that targets the right group of people.
Retrieve all products and/or categories
To display the content you want, first retrieve all the products/categories assigned to all segments that a customer is a member of. Send the request to theq
parameter, for example, q=type:PRODUCT
or q=type:CATEGORY
. Use the segment information
If you want to use segments to restrict the content on your storefront, to display only the product and categories assigned to a segment for segment customers, use the endpoint to build a segment-based category tree. Send the request to theThe request generates a category tree with categories assigned to a segment and their parent categories, if applicable. If a segment specifies a subcategory only, the customer of that segment is able to see the parent category label, but content-wise, only the products from the subcategory are available.
To filter products that belong to a category that is assigned to a particular segment, send the request to theSpecify the segment id in the request.