Segment Creation | Community
Skip to main content
April 29, 2024
Question

Segment Creation

  • April 29, 2024
  • 3 replies
  • 1273 views

Customers buys specific product alongiwth others products- how to create segment

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

ReshuAuthor
April 29, 2024

How to create segment : Other than Product"

MandyGeorge
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 29, 2024

There's essentially two ways to make a segment that doesn't include a particular product, and depending on what you want it to return will decide which method you use. I'll start by saying, you have to identify a specific product (or products) in the segment.

 

First, if you want to return a hit that contains something other than the product in question (whether or not the product is also present)

"Product does not equal X"

Doing this at a hit level will return any hit that contains a product that is not X. Now, if a hit contains two products (X and Y), it will still return that hit, because the "not X" condition is met, so it will return the whole hit. An example of this would be if someone places an order and buys more than one product. 

 

Second, if you want to exclude any hit that contains the product, regardless of what else is in it.

"Product equals X" inside of an Exclude container

Doing this will exclude any hit that contains X product, regardless of what else is in the hit. So take our example of an order with two products, X and Y. That hit would not be included here because of the presence of X (so it can possibly undercount other products).

 

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 29, 2024

Part of the problem with "Products" is that every product that was sent on the same hit will be returned by this segment...

 

So let's say you had

 

 

s.products = "Category 1,Product A;Category 2,Product B;Category 2,Product C"

 

 

 

It doesn't matter if you say:

 

HIT

    Product equals Products A

 

or

 

HIT

    Product contains Product A

 

 

Since ALL three products will be returned: Product A , Product B and Product C

 

 

Now, if the products have unique Categories, like Category 1 / Product A.

 

You can build out a table like this:

 

    Page View
Category 1   1
  Product A 1

 

 

Basically, adding filters or specific locked values (like pulling in specifically "Category 1" as a top level breakdown) into your table work differently than segments....

 

Now, if the category is repeated, like Category 2 / Product B and Product C... then pulling in Category 2 first will result in 2 of the products being returned....

 

Unfortunately, sometimes the only option is to use a filter on your table (this has been a long running complaint about Products works)

 

    Page View
Product (filtered to "Product B")   1
  Product B 1

 

 

Unfortunately, working with Products can sometimes be a big pain... 

MandyGeorge
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 29, 2024

I see that you have another question about segments, I'll answer this one too because it seems to be a bit different than your other question. For this particular case you want an order where there are two products. You would need a hit level segment with three conditions, one insisting an order exists, then the presence of the product you want and the absence of the product. So "product equals X" means that they ordered the product you want to know about. Also including "product does not equal X" means that there has to be a second product, and it can't be X (it can be literally any other product). Then the order exists just means that both of these happen in the same hit as an order existing. 

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 29, 2024

Unfortunately, due to the complications of how Products works, the segment:

 

Hit

    Product equals X

    AND

    Product does not equals Y

    And

    Online Order exists

 

 

Won't result in the expected outcome... 

 

For example:

 

Scenario 1 (only Product X":

 

 

s.products = ",X";

 

 

 

Scenario 2 (Product X and Product Y):

 

 

s.products = ",X;,Y";

 

 

  

Scenario 3 (Product X and Product Z):

 

 

s.products = ",X;,Z";

 

 

 

The segment above will return Scenario 1 and Scenario 3, it will not return Scenario 2 (despite Product X being included), and the segment will also return the Product Z from Scenario 3....

 

    Page Views
Products   2
  Product X 2
  Product Z 1

 

So your Product X will be missing "Product X" hits, and still including other products that you don't want... 

 

This is because the logic of segments on products runs the logic on each individual product, but pulls back all products that were part of the same hit...

 

 

Unfortunately, applying filters onto the table is the most reliable way to see only Product X (unless you also have unique categories on your products... (see your other post).

 

But if you are trying to get back all products from "Department 1", and you are passing the departments as the category (or as a merchandising eVar, or maybe as a classification); you can pull that department value into the table as a locked top level breakdown, then break that down with "Products" allowing them to flow based on the locked item above them.

 

s.products = "department 1,Product X;department 2,Product Y";

 

    Page View
Department 1   1
  Product X 1
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 29, 2024

FYI, I've merged the two questions into one, as they seem to be inter-related.