in Source/Function/EnrollmentVerificator.cs [80:102]
public static void RunSendNotification([ActivityTrigger] RequestNotification notificationRequest,
ILogger log,
[TwilioSms(AccountSidSetting = "TwilioAccountSid", AuthTokenSetting = "TwilioAuthToken", From = "%TwilioPhoneNumber%")] out CreateMessageOptions message)
{
log.LogInformation($"Sending notification to mobile number {notificationRequest.MobileNumber}.");
var useSMSReply = Environment.GetEnvironmentVariable("UseSMSReply");
var enrollmentAFUrl = Environment.GetEnvironmentVariable("EnrollmentAFUrl");
var subsKey = Environment.GetEnvironmentVariable("APIM_SubsKey");
if (Convert.ToBoolean(useSMSReply))
{
message = new CreateMessageOptions(new PhoneNumber(notificationRequest.MobileNumber));
message.Body = $"Welcome to the Tailwind Traders Rewards Program! Please reply to the message with YES/ACCEPTED or NO/CANCELLED for customer enrollment";
}
else
{
message = new CreateMessageOptions(new PhoneNumber(notificationRequest.MobileNumber));
message.Body = $"Welcome to the Tailwind Traders Rewards Program! " +
$"Please click one of the following links to ACCEPT or CANCEL your enrollment. " +
$"Click ACCEPT {enrollmentAFUrl}?action=accepted&id={notificationRequest.InstanceId}&Subscription-Key={subsKey} Or " +
$"Click CANCEL {enrollmentAFUrl}?action=rejected&id={notificationRequest.InstanceId}&Subscription-Key={subsKey}";
}
}