Forum Discussion
API to create/update Segments
Why do you need to export this segment of users? I wonder if we knew more about what you're achieving, there might be another solution.
This is perhaps something that could be implemented as a webhook campaign and Braze could push the data to a destination.
Can you use currents or the snowflake integration? That would let you dump all the data and query it externally.
Regardless of anything though, there is a clear gap in the API.
If Braze were to create such an endpoint, I feel that they'd want to implement it such a way that it maintained feature parity with the segments in the UI - which is presumably a more challenging thing to implement. I wonder though if it could be limited to those only defined by SQL, which would keep things simple from an implementation standpoint.
Hi bob ,
In one case we are tracking a set of a custom attributes that changes. We have a segment with a list of all of those attributes. We download the segment to get the applicable users and the values of the attributes. After a set period of time we remove applicable attributes from the segment. I'd really like to be able to have an API call that removes those attributes from the segment.
I agree with you that it can be challenging. Some kind of basic SQL language that supports the level of selection that can be defined in the UI would be great. I think documenting how the selection is currently constructed is not very difficult though.
(attribute1 is not blank or attribute2 is not blank) and external user id is not blank
I can write a process that can put together a new string and replace it:
(attribute1 is not blank) and external user id is not blank
There are other applications as well.
Thanks.
- Joseph_C9 months agoPractitioner II
Really interesting thread - very curious how/why you're using this!
My initial thought is to just create as many segments as you need up front, instead of trying to update a single segment. But, that may not give you the historical tracking you need (or at least makes it difficult)?
Trying to get to the root of your usecase/problem pcapazzi... Can you tell me more about the custom attributes? Are they time sensitive details like `marchPurchaseDetails`?
Related Content
- 11 months ago