With the variable FROMAREA used in the inbound behavior of an extension, calls can be routed based on the incoming caller’s area code. This feature is useful for accounts that have multiple offices in different regions and want to use one number to direct calls to the appropriate office.
Using the FROMAREA Variable
The FROMAREA variable is used in the “Perform Next Step Only If...” inbound behavior action for an extension. The “Perform Next Step Only If...” inbound behavior action allows for logic-based routing to take place, using schedules and variables, in an IF-THEN fashion. If all the criteria are met for the “Perform Next Step Only If..” behavior the call advances to the next step in the sequence, otherwise it skips the following action and proceeds down the list of routing steps.
Setting the FROMAREA variable in the “Perform Next Step Only If..” behavior has four components:
- The Variable: In the “AND Variable” line of the “Perform Next Step Only If..”, the variable that will be used must be entered in the first input box. For area code routing the variable is FROMAREA. This variable tells the system to look at the area code of the caller’s number. Note that the variable must be in all caps and not have any hanging spaces before or after the text.
- DOES/DOES NOT: In the DOES/DOES NOT dropdown box select whether the following conditions should be evaluated in a positive does match/meet function or a negative does not match/meet function.
- A Condition: the third input field in the “AND Variable” line, allows the user to select a condition on which the criteria will be evaluated on. This list includes options such as EQUAL and EXCEED. In most cases with the FROMAREA variable EQUAL can be used to screen for a single area code, while FROM PART OF will allow for a match in a list of area codes.
- Data: The last input field is where the data the variable should be checked against is entered. For the FROMAREA this is where a list of area codes should be entered. The date should be entered without spaces, and each area code should be delimited. Example 111,222,333 or 111|222|333.
Once all the info is entered, it should form a logical query the system can evaluate, such as “Does the caller’s area code match one from this list: 111,222,333”
After setting the logic of the “Perform Next Step Only If…” step the proceeding step should be set to what should be performed if the logic statement is true (this action will be the same green as the if statement). A secondary Else action should be placed after the first for the routing to fail too if the if statement is false (this action will be in white or pink if using the Else action from the dropdown list). While you can use multiple IF-THEN statements together to provide many different routing options, an Else action should always be included as a contingency action to ensure that all calls are handled in a reasonable way.
Example of a Common Setup for the FROMAREA Variable
There are many ways that the FROMAREA variable can be used and numerous valid ways to set the logic for the IF-THEN statement, the following is an example of a standard setup for using the FROMAREA variable.
In this example, calls will be routed to either the main office (x2001 Lab 1) or the secondary office (x2002 Lab 2). The routing will be set so that area codes that surround the secondary office will be directed to Lab 2, all other calls will be directed to Lab 1. For this example, the area codes for the secondary office are 111 and 112. The following IF-Then statement will guide our setup:
IF the caller’s area code does match one of the followings: 111,112. THEN send the caller to the secondary office at extension “2002 - Lab 2”. Else, send the caller to the main office at extension “2001 Lab 1”.
Now let's look at how to build this in the NocTel control panel. In the control panel, navigate to the extension the routing will be added to, or create a new virtual extension (A new extension is used in this example). Once the extension is created, click the Edit link in the Inbound Behavior widget. Once you are in the inbound behavior editor perform the following steps:
- Set Step #1 to “Perform Next Step Only if…”.This action is located under the advanced features list in the drop-down menu.
- Locate the AND Variable section in the “Perform Next Step Only if…” action. In the first input field enter FROMAREA. Make sure that no hanging spaces are included at the end of the variable name.
- Leave the DOES/DOES NOT box to DOES. In this example, we want to find area codes that DOES meet our criteria.
- In the second dropdown list for the AND Variable section, set the condition to FORM PART OF. The FORM PART OF is used in this example because we want the system to check if the caller’s area code matches one in the list of codes.
- Next input the data in the last input box. In this example this is the two area codes that calls should be matched against, 111 and 112. Enter them in one of these formats 111,112 or 111|112.
With the AND Variable section completed Step #1 should look like this:
- Next, select an action for Step #2. The action in step two will take place if the above “Perform Next Step Only if…” is returned as true, meaning the criteria for the statement has been met. For this example, we want calls marked as true to go to the secondary office at extension 2002 Lab 2. Step 2 is set to Transfer to Extension and the correct extension is indicated.
- Next set the action in Step #3. Step 3 should be what happens if the statement is false (i.e. the criteria was not satisfied). For this example, calls that do not match the area codes in the list should be sent to the main office at extension 2001 Lab 1.
With Step #2 and Step #3 set the inbound behavior should look like this:
- Click Submit and test.