cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
408
Views
4
Helpful
7
Replies

WxCC Flow Editor String to Int Conversion?

tmessenger
Level 1
Level 1

Is it possible to convert a string value to an int in the WxCC Flow Editor?  We have a large qty of patient rooms that call into our Dietary contact ctr.  The staff would like WxCC to display the patient room number.  Most of the room numbers coordinate with the last 3 digits of the DN, but not all of them.  I would like to convert the NewPhoneContact.ANI to an INT variable so I can perform some basic math functions to set the Room Number field.  I have some very basic Java experience and I've looked through the Pebble documents but haven't seen a way to accomplish this. 

Any help is greatly appreciated! 

7 Replies 7

Hi, this may be a basic question, but if you try and just do something like a slice of the ANI to get the last 4 digits or whatever you need, it errors out? I wouldn't think you'd need to specify if it is int vs string or whatnot.

I beleive Slice would work if we only had one range of DNs. However, we have a few different ranges that need to be sorted and labeled appropriately. 
All calls should be coming in via our SME, so they should be presented as 5 digit ANIs. 
 
Standard Pt Rms 202-394 w/DNs: 63202 - 63394
ICU Pt Rms 1-8 w/DNs: 61101 - 61108
Rooms 102A/B - 116A/B wDNs: 6886 - 68879
LDR Rooms 1-7 w/DNs: 63311 - 63317
Sleep Lab Rm1 65121 & Rm2 65122
Surg Rooms 1-16 w/DNs: 65101 - 65113
 
Plus, we have other DNs that could get associated to a room incorrectly if we use only the leading digits to sort.  If I could convert the ANI to an INT, 
I could check the value of the ANI vs a range (using > and <), and populate the Room Number after slicing the first 2 digits off where applicable. 

I just got an updated range, which now shows that these ranges are not contiguous, so that makes this even more challenging.  Ideally, having the Flow Editor access an XML doc to designate the Room Number based off of the NewPhoneContact.ANI would be ideal. 

Is this information available that you could query it via an HTTPS web call, like a basic database lookup that room 123 = Standard but 456 is ICU?

I'm meeting with our Cisco Rep tomorrow, we're looking into BRE, as well as other solutions.  I'll update you on what we go with.  

BRE would solve your problem, but my advice is to just put this on an API somewhere. It’s going to be so much easier to maintain and so much easier to just script. There are so many services out that that are dirt cheap which could house a simple DB and HTTP end point for you. The cost will probably be less than  $10 USD/month . Peanuts in the grand scheme of things.

david

gkovanis
Cisco Employee
Cisco Employee

@tmessenger To answer your initial question, you can type cast (convert from string to int) in Flow Designer by creating an integer variable and then using the Set Variable node (with Set Value option) and select as Variable your integer one and as Set Value use the formula {{String_variable}}. You can see an example below of how I make a string variable (Record_String) to integer one (Record_Integer).

Screenshot 2024-03-14 at 16.29.58.png