-
Notifications
You must be signed in to change notification settings - Fork 15
feat: adding empty suggestion for forms opportunity #1595
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
base: main
Are you sure you want to change the base?
Conversation
3ba4f6c to
abd06c8
Compare
|
This PR will trigger a minor release when merged. |
| * @param newSuggestions | ||
| * @returns {Promise<void>} | ||
| */ | ||
| async function addSuggestions( |
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.
move this to common utils for all three oppties.
| const wrappedGuidance = { recommendations: guidance }; | ||
| opportunity.setGuidance(wrappedGuidance); | ||
| opportunity.setUpdatedBy('system'); | ||
| await addSuggestions(opportunity, suggestions); |
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.
opportunity gets created before this in low-conversion-handler.js with default guidance, shouldn't this be added there.
Scenario where mystique fails to send response back and oppty remains in backoffice without suggestion.
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.
this is the handler where it receives the guidance generated by Mystique. Suggestions are also generated by Mystique which we will update it here once we have implemented it there.
e.g
| await addAltTextSuggestions({ |
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 happens if Mystique doesn’t provide guidance? We will loose on oppties to show on ASO UI as it'll not have suggestion object or am i missing something here.
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.
If there are no suggestions, or in pending_validation state they will not be visible in ASO UI. That is the contract as of now.
| opportunityId: opportunity.opportunityId, | ||
| type: 'CONTENT_UPDATE', | ||
| rank: 1, | ||
| status: 'NEW', |
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.
shouldn't this be PENDING_VALIDATION?
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!