Hi Community,
I am looking to send a different SMS message to a user based on his/her ticket status. But there is a particular status that has two different messages. Would need help to find a way to toggle between the message based on other condition besides the status.
Example:
1) When the user submits a ticket, the status of the ticket is set to "Confirmed". An SMS with Message "A" will be sent to the user mobile number base on the "Confirmed" Status.
2) On the other hand when the admin triggers the ticket sent by the user using the trigger SMS button, an SMS with Message "B" will be sent to the user mobile number. (Notice the status of the ticket is still "Confirmed".
TiggerSms Action (Main Module):
TiggerSMS Action (Core Module):
GetSMSContentByStatus: I don't know what to set for my condition to toggle between the messages.
Thought of counting the number of SMS (If SMS>1 = otherwise), but I don't know how to implement it.
Please advice. Thank you so much in advance.
Hi Alvin,
Let me propose another solution if I understood your use case correctly.
Why don't you simply create an Input Parameter of type Boolean for your TriggerSMS action (something like SendSpecialSMS or you can come up with a better name).
Now for the Trigger SMS button that only the Admin uses, you can do the same and pass the value True to the TriggerSMS action and otherwise if the TriggerSMS action is NOT called via the Trigger SMS button you pass the value False.
This way if the TriggerSMS action is called with SendSpecialSMS = True, you can send message B, and if it is SendSpecialSMS = False you send message A.
Regards,
Nordin
Nordin Ahdi wrote:
Thanks Nordin, I tried your method and it works.
Your Admin will have something like an Admin role so use the Check<Role_name>Role.HasRole function to see if the user is Admin to differentiate the message that you want to send.
Daniel
Hi Daniel,
I did think of using the Admin role but the admin can also submit a ticket like a user so this method doesn't work in that case.
Can you store the messages number with the particular ticket after sending each message in an entity and while sending a message from admin you can check it the message number count is greater than or equal to 1 if it is true you can send Message B
hope it will resolve your issue
Krushna
Krushana Mantri wrote:
Hi Krushna,
I don't quite get your explanation :') " Can you store the messages number with the particular ticket after sending each message in an entity" ?
You wrote:
So the condition to sent Message A should always based on the fact that it is a new status being submitted, you know this by checking the Ticket Id prior to adding it to the database.
To send Message B the Ticket Id must <> NullIdentifier() and the Role of the user needs to be Admin.
Daniël Kuhlmann wrote:
I understand where you are coming from. The only problem now is that the action only has the ticket record that is linked to the database after the user submits his/her ticket. So it won't be Null. Is there a way for me to link to the database before the ticketId is included?
Thank you Daniel and Krushna for your help as well :)
Glad I could help Alvin :)