-
Notifications
You must be signed in to change notification settings - Fork 48
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
Added propositions option to sendEvent command to make display notifications easier #985
Conversation
if (propositions && propositions.length > 0) { | ||
const propositionEventType = | ||
event.getEventType() === "decisioning.propositionInteract" || | ||
event.getPropositionEventType() === "interact" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(non-blocking nitpick) Change this to PropositionEventType.DISPLAY
and PropositionEventType.INTERACT
from src/components/Personalization/constants/propositionEventType.js
.
({ id, scope, scopeDetails }) => ({ id, scope, scopeDetails }) | ||
), | ||
propositionEventType: { | ||
[propositionEventType]: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the 1
mean?
); | ||
}); | ||
}); | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this TODO for? Is it "write a process destinations test?" Why was this test removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to have a test for the use case when there are both the propositions
and _experience.decisioning.propositions
passed in the same event. I would expect the propositions arrays to be merged and duplications excluded.
Closed in favor of #1036 |
Description
This PR adds a propositions option to the sendEvent command. This will be useful when doing top of page and bottom of page calls as it allows you to include the display notification along with the page view at the bottom of the page.
Related Issue
Motivation and Context
Screenshots (if appropriate):
Types of changes
Checklist: