Pool settings scenarios - test cases
In this section we will analyze all the available settings that you can define for a Pool and we will see in depth some scenarios/test cases using different settings.
First we will see all the settings that you can define for a pool:
KEY | VALUE |
---|---|
poolName | The name of the Pool. |
sticky | When enabled, the service should try to always use the same number, as sender, for each recipient (default true). |
geomatch | When enabled, the service should try to use, as sender, a number that matches the destination country (default true). |
transcode | When enabled, the SMS message will get transcoded (when possible) (default false). |
defaultCountry | A country code in ISO 3166-1 alpha-2 format. Routee will use a number from this defaultCountry as sender, if there is not a more suitable option (eg a number from the same country or a sticky sender for the recipient). |
alphanumericSenderId | The alphanumeric Sender Id that will be used, when the pool strategy is "Alphanumeric". |
inboundSMSCallbackUrl | Defines the callback URL that will receive the inbound messages to the numbers of the Pool. |
callback | Defines the callback URL that will receive the status update notifications for your outbound SMS messages. |
callback.url | A URL that Routee will POST to, each time your message status changes. |
callback.strategy | Defines when the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion). |
Test case 1
To get info for our pool we make a request to:
{
"poolId": "xxxxx-xxxxxx-xxxxxx",
"poolName": "demo-pool",
"smsSettings": {
"sticky": true,
"geomatch": true,
"transcode": false,
"defaultCountry": "SP",
"callback": {
"url": "",
"strategy": "OnCompletion"
},
"inboundSMSCallbackUrl": ""
},
"totalNumbers": 3,
"updatedAt": "2018-11-20T08:17:08.275Z"
}
Then we want to see the virtual numbers that are assigned to this Pool, with the following request to:
{
"poolId": "xxxx-xxxxx-xxxxx-xxxxx",
"poolName": "demo-pool",
"numbers": [
"+30xxxxxxxx",
"+33xxxxxxxxx",
"+49xxxxxxxxx"
]
}
In this Pool, we have virtual numbers from Greece, Germany and France, and France and we have enabled the geomatch and the sticky. We want to send an SMS using our pool using the following example:
In this Pool we want to send a message to a number that belongs to the Netherlands.
{
"poolStrategy":"Numeric",
"to" : "+31xxxxxxxx",
"body": "Hello from Routee"
}
So the result will be as following:
{
"trackingId": "xxxxx-xxxxxx-xxxxxxx",
"status": "Queued",
"createdAt": "2018-11-21T07:27:53.362Z",
"poolId": "xxxxx-xxxxxx-xxxxx-xxxxx,
"poolName": "demo-pool",
"poolStrategy": "Numeric",
"smsSettings": {
"sticky": true,
"geomatch": true,
"transcode": false,
"defaultCountry": "SP",
"callback": {
"url": "",
"strategy": "OnCompletion"
},
"to": "+31xxxxxxxx",
"from": "49xxxxxxxxx",
"body": "Hello from Routte,
"bodyAnalysis": {
"parts": 1,
"unicode": false,
"characters": 17
}
}
The SMS is sent, using, as sender, the number "+49xxxxxxxxx" from the Pool.
Let's see the steps that Routee followed to select the above number, according to the settings that we have defined for the Pool:
- Search for a virtual number from the Netherlands but can't match one.
- Checks for sticky but for this number it is the first time that we sent an SMS so a sticky association does not exist yet.
- Search for numbers from the default country but can't match one.
- Match to the most appropriate virtual number from our Pool ("+49xxxxxxxxx").
A sticky association is now created between the sender ("+49xxxxxxxxx") and the recipient ("+31xxxxxxxx"), so the next time that we will send an SMS from this pool to the same recipient the same sender will be used.
Test case 2
Using the same pool and settings we will try to send an SMS but with a different recipient. This time we use a number from Greece.
{
"poolStrategy":"Numeric",
"to" : "+30xxxxxxxx",
"body": "Hello from Routee"
}
So the result will be as following:
{
"trackingId": "xxxxx-xxxxxx-xxxxxxx",
"status": "Queued",
"createdAt": "2018-11-21T07:27:53.362Z",
"poolId": "xxxxx-xxxxxx-xxxxx-xxxxx,
"poolName": "demo-pool",
"poolStrategy": "Numeric",
"smsSettings": {
"sticky": true,
"geomatch": true,
"transcode": false,
"defaultCountry": "SP",
"callback": {
"url": "",
"strategy": "OnCompletion"
},
"to": "+30xxxxxxxx",
"from": "30xxxxxxxxx",
"body": "Hello from Routte,
"bodyAnalysis": {
"parts": 1,
"unicode": false,
"characters": 17
}
}
Let's see what will happen to this scenario following the next steps:
- Search for a virtual numbers from Greece and match one.
- A sticky association is now created between the sender ("+30xxxxxxxxx") and the recipient ("+30xxxxxxxx"), so the next time that we will send an SMS from this pool to the same recipient the same sender will be used.
Updated almost 6 years ago