ASPSMS notification¶
Prerequisites¶
git checkout origin/osp-communications-configuration .
git checkout origin/osp-reports-configuration .
Description¶
In this tutorial you will learn to :
Configure an sms provider
Configure the notification
Configure an output and the contact
Structure¶
Steps¶
1. Configure the ASPSMS provider¶
root/providerSMS/provider.coms
{
"moduleId": "modules.communications.communications-1",
"providerType": "ASPSMS",
"username": "${YOUR_USERNAME}",
"passwordProvider": {
"type": "PLAINTEXT",
"password": "${YOUR_PASSWORD}"
}
}
root/providerSMS/value.ospp
{
"name": "ASPSMS Provider Value",
"description": "",
"type": "BOOLEAN"
}
2. Create the notification with the template¶
root/notification/notification.coms
{
"moduleId": "modules.communications.communications-1",
"template": {
"shortMessageTemplateId": "root.notification.short"
},
"accessedValues": []
}
root/notification/short/template.ospp
{
"description": "",
"format": "plain",
"name": ""
}
root/notification/short/template.reports
{
"moduleId": "modules.reports.reports-1",
"baseTemplatePath": "root/notification/short/template.ftl"
}
root/notification/short/template.ftl
Change on ${trigger["name"]}
3. Create the output and the contact¶
root/notification/output.coms
{
"notificationId": "root.notification",
"targets": [
{
"originator": {
"smsSender": "OnSphere"
},
"providers": [
{
"providerId": "root.providerSMS"
}
],
"recipient": {
"type": "FROM_STATIC_LIST",
"contactsId": "root.directory"
}
}
]
}
root/directory/contacts.coms
{
"moduleId": [
"modules.communications.communications-1"
],
"contacts": [
{
"type": "PERSONAL",
"firstname": "Bob",
"lastname": "Morane",
"email": "bob.morane@localhost",
"number": "0791234567"
},
{
"type": "PERSONAL",
"firstname": "Titi",
"lastname": "Minet",
"email": "titi.minet@localhost",
"number": "0791234567"
},
{
"type": "PERSONAL",
"firstname": "Code",
"lastname": "Lyoko",
"email": "code.lyoko@localhost",
"number": "0791234567"
}
]
}