Download PDF

STD Code Management Policy

In the Contact Centre Industry, the phone numbers are fetched from multiple sources. Each source provides phone numbers in different formats. For example, one source sends the phone number of 10 digits, whereas another source adds "0" (zero) before a 10-digit phone number. In some cases, a source sends the numbers with country code, whereas another source sends the numbers without country code. Phone numbers in different formats may be available in an Ameyo Setup. However, in Ameyo, a phone number with different formats will be counted as different phone numbers. For example, if John's number is stored as 123456789, then a call made to 0123456789 will be counted as a different number instead of John's number.

If STD Code Management is applied with other Phone Number Cleanup Policies, then it will be as the organizations collect phone numbers from the different sources that may have multiple number formats such as +91 123 456 7891, +91-1234567891, 12345647891, 01234567891, 001234567891. With the applicability of Phone Number Cleanup Policies, the Ameyo System can provide the same format for all phone numbers even if they are submitted in different formats.

Landline Number Policy maps the location code to the STD Codes, and the mapped STD code will be added as a prefix to all phone numbers. Its code name is "LandlineNumbersPolicy".

Architecture and Configuration of Number Cleanup Policies

The Number Cleanup Policies can be enabled at the System-level. After upgrading the Ameyo Server package to 4.7 GA, you have to run the following query to add the flag "shouldEnableAutoNumberCleanup" and provide its value as "true".

INSERT INTO server_preference_store(context_type, context_id, key, value) VALUES (<system/process>, <ID of cc/process>, 'shouldEnableAutoNumberCleanup', true );

If "shouldEnableAutoNumberCleanup" is not added in "server_preference_store" for system-level, then its value will be considered as "false," by default, which means the Number Cleanup Policies are disabled by default.

As soon as the value of the "shouldEnableAutoNumberCleanup" flag is provided as "true" at system-level, then all 5 Number Cleanup Policies will be applicable at the system-level and will be applicable to all processes in the system.

You can use the above query to disable the Number Cleanup Policy at the process-level. If this configuration is not available for a process, then the system-level configuration will be applicable to that process.

Number Cleanup Policies cannot be configured at the Campaign-level.

Now, you can define which Number Cleanup Policy out of total 5 policies (from the above list) will be applicable to a process. If this policy selection configuration is not available for a process, then all policies will be applicable in the process.

You have to provide the value of "allowedCleanupPolicies" flag in the server_preference_store to select which number cleanup policies will be enabled in a process. Run the following query.

Enable Number Cleanup Policy

INSERT INTO server_preference_store(context_type, context_id, key, value) VALUES ('process','<process_id>','allowedCleanupPolices','<comma_separated_list_of_policies>');

Replace <process_id> with the ID of the Process. Provide any of the following values in the comma separated format in the place of <comma_separated_list_of_policies>.

Number Cleanup Policies cannot be configured at the Campaign-level.

RemoveSpecialCharacterPolicy

This Policy is used to remove any special character present within the phone number. For example, a phone number <+91-910 109 7656> is changed to <9101097656>.

There is no configuration for this; the only enablement of this policy is sufficient.

RemoveLeadingZerosPolicy

This policy is used to remove all the zeros before the phone numbers. For example, a phone number <09101097656> is changed to <9101097656>.

There is no configuration for this; the only enablement of this policy is sufficient.

AddCountryCodePolicy

This policy helps to add the prefix with the phone number. This policy reads another policy first and then apply its configuration.
For example, suppose the countryCodePrefixValue is +91, thus the phone number <9101097656> is changed to <+919101097656>.

Run the following query to insert the country code in the database.

INSERT INTO server_preference_store (context_type, context_id, key, value) VALUES ('process','<Process_Id>','AddCountryCodePolicy','+91');

Here, '+91' is the Country code of India. You can define another country code depend upon the organization's usage.

Configuration of Landline Number Policy for STD Code Management

After enabling this policy, you have to provide the mapping of a location code (that is a locality name, city name, or PIN Code) to the STD Code. The selected location code (that is locality name, city name, or PIN Code) should be a part of the Data Table Definition fields and should store the selected location code. Multiple queries can be run to store the mapping entries of a unique location code to a unique STD Code in "server_preference_store." Make sure not to provide multiple mappings of an STD Code.

Run the following query to add a mapping entry to map a location code to an STD Code.

INSERT INTO std_code_location_code_mapping(location_code,std_code) VALUES ('<location_code>','<std_code>');

Replace <location_code> with location name (such as Sohna Road), city name (such as Gurgaon), and PIN Code (such as 122003) and replace <STD_Code> with the STD Code (such as 124).

The "std_code_location_code_mapping" table will be available after upgrading Ameyo Server to 4.7 GA.

Consider the following examples of this query.

You can configure these policies for different processes. For example, "RemoveSpecialCharacterPolicy" is for process 1, and "LastNDigitsPolicy" is for process 2.

Disable any Particular Policy

Run the following query to disable any particular number policy.

UPDATE number_correction_policies SET enabled = <false> where policy_name = '<Policy_Name>' ;

Provide the name of the policy that you want to disable.

API for STD Code Management

The following two APIs are available for STD Code Management Policy.

  1. Add STD Code Management API: This API is used to add the STD code management in Management Framework Architecture. Know more...

  2. Get STD Code Management API: This API is used to fetch the list of the STD codes that have been uploaded in Management Framework Architecture. Know more...

Provide the credentials of your Application server and other necessary details, as mentioned in the APIs itself.