Skip to content
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

Add new Contact Attribute containing the initial message sent, #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

trindfus
Copy link

I have modified sms.js to send the body (trim and toLower) of the text message to inboundhelper.js.
In inboundhelper.js I create a new contact attribute containing this message. This allows a customer to branch on the initial message sent to the solution. If a customer sends a text message with "Out" as the message, we can branch on the contents of the new attribute "chatframework_InitialMessage" to log an outage for the customer with the phone number in question (chatframework_VendorId).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Send message as parameter to getOrCreateParticipant
Add chatframework_InitialMessage to addNewParticipant so that the initial message sent when initializing communication can be referenced using an attribute and logic can branch based on it.
Fixed indentations.
addNewParticipant now adds new attribute "chatframework_InitialMessage" that holds the initial message sent to the application. This attribute has been trimmed for whitespace and has been set to lowercase to make it easier to branch on keywords (like "Out") in Amazon Connect.
Accidentally added a comma that has now been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant