GATUM
By Sempico Solutions

Client Content Autoreplacement Rules: How to Create?

The GATUM platform is quite flexible and automated, so the process of sending SMS traffic is quite easy and fast. One of the functions that ensures the safe sending of SMS is the autoreplacement of the client’s SMS content. With the help of ready-made or created by you rules, you can regulate the content of SMS, in accordance with your or general requirements. In this mechanism, it is possible to use both rules created by developers, they are called macros, or create your own, based on the content of the traffic passing through your platform.

When you set a rule for autoreplacement content for a client, then all of its traffic, regardless of the aggregator, will go through these rules.

In order to create a rule for a client, you need:

  1. Go to Profiles -> Clients page.
  2. Go to the profile of the client you need by clicking on his name.
  3. In the Content replacement rules block, click on the green Create button.
creating-a-content-autoreplacement-rules

Let’s create an example rule. For example, you want the word code to be replaced with password in all SMS messages of this client.

  1. In the Destination field, select the direction for which this rule will apply.
  2. In the Aggregator field, if necessary, select the aggregator, when sending SMS to which this rule will apply. You can choose not to choose a specific one and then the rule will apply to all aggregators.
  3. In the Sender field, if necessary, write the name of the sender and then the rule will apply only for those SMS that have this sender’s name. You can leave this field blank and the rule will apply to all names.
basic-configuration-for-content-autoreplacement-rule
  1. In the Searched phrase field, enter your search phrase, in this case code.
searched-phrase-of-the-content-autoreplacement-rule
  1. In the Replacement field, enter a replacement phrase, in this case password.
phrase-to-enter-in-content
  1. In the Priority field, enter the priority for this rule. The unit is the highest priority.
priority-of-the-content-autoreplacement-rule
  1. Click on the green Save button.
saving-the-content-autoreplacement-rule

Now, when this client sends SMS, the content of which will contain the word code, it will be replaced with the word password.

There are also rules built by developers. One of the built-in replacement rules is the replacement of Arabic or Roman numerals with Persian. In the dropdown line, you will need to select the Persian digits value.

All digits will be changed to Persian type of digits:
0 -> ٠
1 -> ١
2 -> ٢
3 -> ٣
4 -> ٤
5 -> ٥
6 -> ٦
7 -> ٧
8 -> ٨
9 -> ٩

The NULL rule erases the value you specify in the Searched phrase string. For example, you do not want the word dump to appear in the SMS content, set up this rule and now in every SMS where the word dump is found, it will be erased.

mechanisms-of-the-content-autoreplacement-rule

In addition, there are macros that perform specific actions on content.

Macro {SAVEDIGITS} – searches and saves stand-alone digits. For example, you send your customers passwords consisting of numbers, and in order not to manually create many SMS with different passwords, you can use macros. This macro searches for and remembers phrases consisting of numbers, but does not replace them. Also, if you send passwords in parentheses or quotes, you will need to create rules to remove them: one rule for the left parenthesis / quote, another rule for the right parenthesis / quote. That is, there must be spaces or emptiness in front and after the phrase of numbers. Also, if you have other free-standing numbers in your message, the {SAVEDIGITS} macro will remember them too, so you will need to create a rule that will remove them.

macroses-of-the-content-autoreplacement-rule

The same principle of action with the {SAVEURL} macro, only now this rule will remember not a phrase of numbers, but a link.

Again, the {SAVEPHONE} macro, it searches and remembers phone numbers in SMS content. It is important to remember that for all three macros the search phrase must be free-standing, separated by spaces or empty.

Macro {CHANGEDIGITS} – Between remembered digits will be added “Some character”.

Macro {CHANGEDIGITSEACHSECOND} – Add “some character” after each 2 symbols in remembered Digits.

The {EMPTY} macro is used in cases where the SMS has no text at all. That is, according to the created rule {EMPTY}, the system finds SMS that have no content and replaces them with the text specified in the Replacement field of this rule. This is often used if many rules for replacing content have been established and there is a possibility that after passing the rules, nothing will remain in the SMS content at all. Then the text from the Replacement field will be sent.

Macro {TRIM} – removes spaces at the beginning and at the end of SMS. For example, if there is an SMS “Hi, Steve”, it will remove only spaces at the beginning and at the end, they will remain between words. The text will end up like “Hi Steve”.

Macro {TRIM-RTL} – removes the character that reverses the spelling of text from right to left. This is used when working with content in Arabic and Hebrew. The macro removes this character and the SMS will go in the usual direction from left to right.

Macro {NEWLINE} – Replacing Newline symbol to the space.

Macro {PHONE} – Replacing a phone of recipient by Some content.

Macro {UPPERCASE} – converts all SMS text to upper case.

Macro {LOWERCASE} – converts all SMS text to lower case.

Macro {CLEAR} – erases all SMS content, erases text.

Macro {CUTONEPART} – cuts SMS to 1 part, the first part remains, all the rest are erased.

Macro {CUTIFMORE} – removes unnecessary parts from SMS if there are more of them as a result of content replacement rules.

It is not necessary to enter any values ​​in the Replacement field when using these macros:

Macro {BEGIN} – inserts at the beginning of the SMS the value that you define in the Replacement field. Here you can use the data found by the {SAVEDIGITS}, {SAVEURL} and {SAVEPHONE} macros, which you put in the Replacement field, just change it to {PHONE}, {URL} and {DIGITS}. For example, using the {SAVEDIGITS} rule, the system found a code or password, and now, through the {BEGIN} rule, it will insert it at the beginning of the SMS. That is, there was an SMS “- your code”, the system remembered the code 743564 from the previous SMS and will now insert it into this SMS. It will come out like this: “743564 – your code”. This works if the two rules are configured together for the same client.

The {END} macro works similarly, only it inserts the value from the Replacement field at the end of the SMS.

Macros {RANDOM_SYMBOLS_BEGIN} and {RANDOM_SYMBOLS_END} – insert random characters at the beginning or at the end of SMS, respectively. The number of characters is indicated in the Replacement field.

Similar macros {RANDOM_DIGITS_BEGIN} and {RANDOM_DIGITS_END} – only they already insert not symbols, but numbers. The number of digits is also indicated in the Replacement field.

And the last macro is {CUTBYLENGTH}. It truncates the SMS text to a certain number of characters specified in the Replacement field. This rule minimizes the likelihood of an increase in the cost of SMS, which can be triggered by an increase in parts of SMS.

If necessary, if you want to automate a rule for closing certain tasks, contact our developers and they will make an individual macro for you.

In addition, this mechanism has the ability to give priority to rules, put them in a logical order. For example, you have set up the {SAVEDIGITS}, {END}, and {CUTBYLENGTH} rules for a client. It is logical that the system must first find the numbers, then insert them at the end, then check for the allowed number of characters. Therefore, the rule {SAVEDIGITS} will have the highest priority – 1, lower priority will be for {END} – 2, and the lowest for {CUTBYLENGTH} – 3.

With the help of the SMS content autocorrect mechanism, you can protect your traffic from unnecessary content, save time and increase its efficiency.

Share the Post: