If you are trying this in a Bot Flow, you have to split your communicate between voice and text. Use the Text and Voice optional prompts or something like this:
If(IsSet(Flow.CustomerClaimNumber),
If(Session.ChannelType =="call",
ToCommunication(ToString(Split(ToString(Flow.CustomerClaimNumber), ""), " ")),
ToCommunication(Flow.CustomerClaimNumber)
),
ToCommunication("")
)
Or another where each part is converted to a string and then there's an overall ToCommunication function call for any returned string:
ToCommunication(
If(IsSet(Flow.CustomerClaimNumber),
If(Session.ChannelType=="call",
ToString(Split(ToString(Flow.CustomerClaimNumber), ""), " "),
ToString(Flow.CustomerClaimNumber)
),
""
)
)
------------------------------
Robert Wakefield-Carl
Avtex Solutions, LLC
Contact Center Innovation Architect
https://www.Avtex.comhttps://RobertWC.Blogspot.com------------------------------