Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Using the caller-entered phone number to send SMS

    Posted 04-04-2025 17:04
    Edited by Marcus Hanna 04-04-2025 17:05

    I have a common module flow that's used when a caller elects to receive a SMS during the IVR.  If the caller presses 1, we will use the current ANI.  This is the expression used in the "toAddress" field of the data action: Substring(Common.ANI_Input,4,25) and that works well to send the SMS.  I'm stuck at the caller-entered number when they press "2". I can collect the caller-entered number successfully however, I cannot figure out the expression to take that caller-entered number and use it for SMS.  I hijacked build from our courtesy callback flow.  That expression is:  ToPhoneNumber(Append("tel: +",ToPhoneNumber(Common.ANI_Input).dialingCode, Substring(Common.CallbackNumber,1,Length(Common.CustomerNumber))))

    I've tried a dozen different variations.  Appreciate any help.


    #Architect

    ------------------------------
    Marcus Hanna
    Technology Manager
    ------------------------------



  • 2.  RE: Using the caller-entered phone number to send SMS
    Best Answer

    Posted 04-09-2025 14:04
    Edited by Marcus Hanna 04-09-2025 14:05

    Issue solved with help from Genesys support.  I don't know why CCB likes to append "tel: +" while my SMS data action only likes to append "+", but that did the trick.  Here's the functional expression for a SMS data action in a Common Module looking for a caller-entered string phone number: ToPhoneNumber(Append("+",ToPhoneNumber(Common.ANI_Input).dialingCode, Common.CallbackNumber)) 



    ------------------------------
    Marcus Hanna
    Technology Manager
    ------------------------------