How to create a segment based on specific object IDs in Customer.io

  • 15 October 2023
  • 0 replies
  • 35 views

 

Introduction

 

In this tutorial, we will go through the process of creating a segment in Customer.io based on specific object IDs. This is a common procedure for many of our users who want to target customers that belong to a specific number of company IDs.

Problem

The challenge arises when regular expression characters, specifically the '|' character, don't seem to work as expected. This can happen when you're trying to include multiple object IDs in your segment.

For more information, you can refer to the segment details here.

 

Solution

Jumping right into the question here, the reason why the regex character | isn't working is often because you are using the is equal to operator. As per our help docs, regex will only work when using the contains operator. The tricky thing with contains though is that the value needs to be a string, and since object_id is not a string, you would need to continue to use is equal to in order to get any results.

In summary, this means that you would need to build out the object ID's with OR operators instead, similar to this:

image.png

 

Conclusion

With this understanding, you should now be able to create segments based on specific object IDs successfully. Remember, the correct usage of 'OR' operators and the 'contains' function is crucial for setting up these filters in your customer.io segments.


0 replies

Be the first to reply!

Reply