Cette interface permet de configurer les appels de sendito vers d2.
Nous constatons que les paramètres à envoyer, notamment le shortcode, sont susceptibles de changer selon les produits, services et opérateurs.
C'est pourquoi nous avons conçu un système flexible de configuration pour répondre à ces variations.
Comment ça marche :
1. Création de configurations :
Vous pouvez créer des configurations personnalisées en utilisant un tableau où chaque ligne correspond à une configuration.
Chaque configuration est composée des colonnes principales : 'country', 'filter', 'priority', 'sending_params' et 'active'.
La colonne 'country' vous permet de spécifier le pays vers lequel vous souhaitez envoyer vos SMS.
La colonne 'filter' vous permet de définir une liste de conditions qui doivent être remplies pour que la configuration soit sélectionnée.
Ces conditions sont liés aux paramètres reçus par sendito et peuvent être enrichies en utilisant un jeu de données provenant des API Dvp4m et Atom en utilisant la syntaxe #billing_info.arbrescence_de_l'entité.
La colonne 'priority' définit la priorité d'analyse d'une configuration pour un pays.
La colonne 'sending_params' vous permet de définir les paramètres spécifiques à envoyer à l'API d2 pour l'envoi du SMS.
Ces paramètres peuvent être enrichis en utilisant un jeu de données provenant des API Dvp4m et Atom en utilisant la syntaxe #billing_info.arbrescence_de_l'entité.
La colonne active est une case à cocher permettant d'activer la configuration, si cette dernière n'est pas cochée la configuration ne sera jamais analysée
2. Analyse des paramètres reçus :
Lorsqu'un appel est réalisé à l'API Sendito, notre système analyse les paramètres reçus à la recherche d'une configuration correspondante.
Les configurations sont analysées par priorité décroissante. La configuration avec la priorité la plus élevée sera analysée en premier.
Si les conditions spécifiées dans la colonne 'country' et 'filter' d'une configuration sont validées, cette configuration sera sélectionnée pour l'envoi du SMS.
3. Envoi via l'API d2 :
Une fois qu'une configuration appropriée est sélectionnée, les paramètres définis dans la colonne 'sending_params' de cette configuration seront utilisés pour envoyer le SMS via d2.
A noter qu'en cas d'absence des paramètres 'internal_ope_id', 'mccmnc' et 'shortcode' dans la colonne 'sending_params', ces derniers seront automatiquement définis (si presents dans le jeu de données billing) lors de l'appel à D2.
Exemple technique:
Voici l'appel reçu par l'api sendito:
Json1
{
"country": "MA",
"mccmnc": "60401",
"destination": "+2126624775...",
"operation_id": "dvp4m:bb0a90c4-979f-4064-860d-dd7945bde089",
"lang": "en",
"message": "",
"type": "subscription",
"offer_id": "133"
}
Et voilà le jeu de données provenant des API Atom et Dvp4m en lien avec les paramètres operation_id et offer_id reçu par sendito
Json2
"billing_info": {
"operation_id": "bb0a90c4-979f-4064-860d-dd7945bde089",
"billing_mode": 2,
"msisdn": "+212662477572",
"billing_channel": "MNO-BILLING",
"alias": null,
"alias_bp": null,
"dynamic_acr": null,
"locale": "fr-MA",
"offer_id": 133,
"mccmnc": 60401,
"contact_mccmnc": null,
"moId": null,
"billing_provider": {
"subscription_id": "62535634-8822-4027-9fe8-64ad971849d5",
"transaction_id": null,
"transaction_id_dvp4m": null,
"service": 43,
"firm": 98,
"end_user_provider": "195",
"service_id": null,
"aggregatorId": null,
"merchantId": null,
"apiKey": null,
"sender": null,
"product": "0017012000001639",
"subProduct": "0017012000001639"
},
"offer_legal": "Digital Virgo Maroc",
"product_id": 1349,
"offer_name": "Bouquet TV Acces 15 DH TTC \/ Semaine",
"billing_provider_id": "196",
"platform_id": 35,
"csp_mail": "supportmttv@mes-abonnements.ma",
"csp_phone": null,
"termspage_url": "https:\/\/moncompte.mttv.ma\/legal-terms-of-service-fr",
"sku_data": {
"serviceType": "bundle",
"spId": "001701"
},
"external_id": "0017012000001639"
}
}
Le Json1 et Json2 corespondent aux données récupérées sur lesquelles la selection de la bonne configuration va se jouer.
Ici il s'agira la configuration suivante:
_country: MA
_filter: {
"offer_id": 113
"#billing_info.product_id": 1349,
"#billing_info.billing_provider.end_user_provider": 195
}
On constate dans un premier temps que la 1ere clé "offer_id" du json n'est pas précédée d'un '#billing_info', cela signifie que la vérification de cette donnée est faite au niveau du Json1 (paramètre reçus dans l'appel à sendito).
Ici l'offer_id doit être égal à 113. Cette condition est vérifiée.
On passe donc au deux conditions suivantes
1 "#billing_info.product_id": 1349,
2 "#billing_info.billing_provider.end_user_provider": 195
On constate que les clés du json filter sont précédées d'un '#billing_info', cela signifie que les données à vérifier se trouve dans le jeu de données billing info (json2), pour cela il est obligatoire d'indiquer la bonne arborescence.
Ici dans le jeu de données Json2, le product_id doit être égal à 1349 et le end_user_provider égal à 195.
Enfin une fois les conditions de filter validées, les données présentes dans la colonne sending_params sont envoyées vers d2
_sending_params: {
"shortcode": "8888",
"internal_ope_id": "99920",
"channel": "#billing_info.billing_channel"
}
Ici la valeur de la clé channel est une valeur dynamique qui correpond à la valeur "#billing_info.billing_channel" du jeu de donnée soit "MNO-BILLING".
This interface allows configuring sendito calls to d2.
We observe that the parameters to send, especially the shortcode, are subject to change depending on the products, services, and operators.
That's why we've designed a flexible configuration system to accommodate these variations.
How it works:
1. Configuration Creation:
You can create custom configurations using a table where each row corresponds to a configuration.
Each configuration consists of main columns: 'country', 'filter', 'priority', 'sending_params', and 'active'.
The 'country' column allows you to specify the country to which you want to send your SMS.
The 'filter' column allows you to define a list of conditions that must be met for the configuration to be selected.
These conditions are linked to the parameters received by sendito and can be enriched by using a dataset from the Dvp4m and Atom APIs using the syntax #billing_info.entity_hierarchy.
The 'priority' column defines the priority of analyzing a configuration for a country.
The 'sending_params' column allows you to define specific parameters to be sent to the d2 API for sending the SMS.
These parameters can be enriched by using a dataset from the Dvp4m and Atom APIs using the syntax #billing_info.entity_hierarchy.
The active column is a checkbox to activate the configuration; if it is not checked, the configuration will never be analyzed.
2. Analysis of Received Parameters:
When a call is made to the Sendito API, our system analyzes the received parameters to find a corresponding configuration.
Configurations are analyzed in descending priority order. The configuration with the highest priority will be analyzed first.
If the conditions specified in the 'country' and 'filter' columns of a configuration are validated, that configuration will be selected for sending the SMS.
3. Sending via the d2 API:
Once an appropriate configuration is selected, the parameters defined in the 'sending_params' column of that configuration will be used to send the SMS via d2.
Note that in case of absence of the 'internal_ope_id', 'mccmnc', and 'shortcode' parameters in the 'sending_params' column, these will be automatically defined (if present in the billing dataset) when calling D2.
Technical Example:
Here's the call received by the sendito API:
Json1
{
"country": "MA",
"mccmnc": "60401",
"destination": "+2126624775...",
"operation_id": "dvp4m:bb0a90c4-979f-4064-860d-dd7945bde089",
"lang": "en",
"message": "",
"type": "subscription",
"offer_id": "133"
}
And here's the dataset from the Atom and Dvp4m APIs related to the operation_id and offer_id parameters received by sendito:
Json2
"billing_info": {
"operation_id": "bb0a90c4-979f-4064-860d-dd7945bde089",
"billing_mode": 2,
"msisdn": "+212662477572",
"billing_channel": "MNO-BILLING",
"alias": null,
"alias_bp": null,
"dynamic_acr": null,
"locale": "fr-MA",
"offer_id": 133,
"mccmnc": 60401,
"contact_mccmnc": null,
"moId": null,
"billing_provider": {
"subscription_id": "62535634-8822-4027-9fe8-64ad971849d5",
"transaction_id": null,
"transaction_id_dvp4m": null,
"service": 43,
"firm": 98,
"end_user_provider": "195",
"service_id": null,
"aggregatorId": null,
"merchantId": null,
"apiKey": null,
"sender": null,
"product": "0017012000001639",
"subProduct": "0017012000001639"
},
"offer_legal": "Digital Virgo Maroc",
"product_id": 1349,
"offer_name": "Bouquet TV Acces 15 DH TTC / Semaine",
"billing_provider_id": "196",
"platform_id": 35,
"csp_mail": "supportmttv@mes-abonnements.ma",
"csp_phone": null,
"termspage_url": "https://moncompte.mttv.ma/legal-terms-of-service-fr",
"sku_data": {
"serviceType": "bundle",
"spId": "001701"
},
"external_id": "0017012000001639"
}
Json1 and Json2 correspond to the retrieved data on which the selection of the correct configuration will be based.
In this case, it will be the following configuration:
_country: MA
_filter: {
"offer_id": 113
"#billing_info.product_id": 1349,
"#billing_info.billing_provider.end_user_provider": 195
}
Firstly, we notice that the 1st key "offer_id" of the json is not preceded by a '#billing_info', which means that the verification of this data is done at the level of Json1 (parameters received in the call to sendito).
Here, the offer_id must be equal to 113. This condition is verified. We then move on to the next two conditions:
1 "#billing_info.product_id": 1349,
2 "#billing_info.billing_provider.end_user_provider": 195
We notice that the keys of the json filter are preceded by a '#billing_info', which means that the data to be checked is in the billing info dataset (json2), so it is mandatory to indicate the correct hierarchy.
Here, in the Json2 dataset, the product_id must be equal to 1349 and the end_user_provider must be equal to 195.
Finally, once the filter conditions are validated, the data present in the sending_params column are sent to d2.
_sending_params: {
"shortcode": "8888",
"internal_ope_id": "99920",
"channel": "#billing_info.billing_channel"
}
Here, the value of the channel key is a dynamic value that corresponds to the value "#billing_info.billing_channel" of the dataset, i.e., "MNO-BILLING".
By country, all rules that drive sms sending parameters
| Id | Country | Name | Priority | Filter | Sending param | Active | Insert | Last Update |
|---|---|---|---|---|---|---|---|---|
| Id | Country | Name | Priority | Filter | Sending param | Active | Insert | Last Update |