-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create a dynamic segment using identifyUser #14024
Comments
Hello, @renso3x 👋 and thanks for opening this issue. Pinpoint's updateEndpoint API is called under the hood when If you create a Segment in Pinpoint console (see here), are you trying to then use this attribute to add user to an existing one? Or is the goal to have a new segment made when the |
Hi @cwomack, Yes I am seeing the In v5, it was necessary to call both identifyUser() with updated user attributes and record() for events. Could you confirm if this step is still required, or does identifyUser() alone suffice for updating the segment in the current implementation? |
@renso3x, thanks for the additional context here. That delay you see for the Let me know if I'm understanding your goal properly, but it sounds like the intent is to have the Dynamic Segment created programmatically. If that's the case, then there's no Amplify API that can be called on the client side to do this simultaneously when the |
Hi @cwomack, Yes, my goal is to create the dynamic segment in Amplify. Generally, I trigger the identifyUser function only once when the user signs in to the app. However, if my goal is to update the user endpoint, would it be better to use a Lambda function instead? |
@renso3x, appreciate the clarity. I think the best way to achieve this then would be to use the Lambda function then to create the dynamic segment when there are changes to the attribute recorded by Pinpoint. Any type of client side implementation runs the risk of potentially allowing a malicious user to create a large amount of segments that could then complicate or drive up costs on our campaigns or messages that use them. Because of this, it wouldn't be a feature that we'd consider implementing on the Amplify side at this time (and it's also not something Pinpoint supports at this time even if we could). Hope that helps clear things up, but let us know if there's further questions here! |
Closing this issue as we have not heard back from you. If there's further questions or guidance needed, please feel free to reply back and we'd be happy to re-open the issue. Thank you! |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Analytics
Amplify Version
v6
Amplify Categories
analytics
Backend
None
Environment information
Describe the bug
I was creating a dynamic segment in AWS Pinpoint to filter users based on the organizationName. Initially, I encountered an issue where supplying only customProperties resulted in no endpoints being filtered. Additionally, it appears that triggering an event is required to apply the segment criteria.
Upon further investigation, I found that including options.userAttributes allows segments to be filtered based on this attribute. However, the documentation provided here is unclear about how to create segments effectively. Furthermore, version 6 of the library seems to have limited features for this purpose.
Expected behavior
I expect that when I trigger the identifyUser I can create a Segment based on those user criteria
Reproduction steps
npm install aws-amplify @aws-amplify/analytics
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: