[STRATCONN-5449] Update GEC - userList action to common hashed function #2710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal is to use a Standard Function: commonHashedEmailValidation for email hashing. The only action that needs an updates is the addUserList action.
The commonHashedEmailValidation function will now be used in place of formatEmail for the userList action to ensure consistency and improve validation efficiency across email handling.This will not introduce any new functionality.
Testing
A unit test was added to verify the functionality of commonHashedEmailValidation and ensure that the hashed values are generated correctly.
Since this is for Engage, I was unable to run a full E2E test to verify the payload sent. However, I did test this locally, and everything appears to be functioning as expected.
formatEmail
Input: [email protected] Output (hashed): 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674
commonHashedEmailValidation
Input: [email protected] Output (hashed): 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674
formatEmail
Input: 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674 Output : 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674
commonHashedEmailValidation
Input: 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674 Output: 87924606b4131a8aceeeae8868531fbb9712aaa07a5d3a756b26ce0f5d6ca674
Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.