How-To configure SMS Gateway for the Application Service

Introduction

The CoreOne Application Service has the capability to send SMS messages. For instance, you can send SMS messages from within any workflow. This how to describes how you can configure the various available methods.

Step 1 - Decide on the provider type

The CoreOne Application Service supports two ways of sending SMS. Depending on your needs, you will need the appropriate GUID:

  • RestSmsProvider / EC0D6B9E-F1A7-4B85-B21C-02BB4B94183A

  • AwsSmsProvider / 3D46060F-833B-434B-AA09-58C6792EA141

Step 2 - Add the appropriate setting value

In the CoreOne Application Service setting values table, you have to add the appropriate configuration depending on the selected type.

Note: You have to escape & in URLs to & in order for the XML to be valid

set @providerGuid = 'EC0D6B9E-F1A7-4B85-B21C-02BB4B94183A'; set @providerXmlSetting = '<?xml version="1.0" encoding="UTF-8"?> <ArrayOfSmsProviderSettingValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SmsProviderSettingValue Id="0"> <Value xsi:type="xsd:string">https://soap.aspsms.com/aspsmsx.asmx/SimpleTextSMS?UserKey=LZDQT7RWG&amp;Password=SWn1vQT08UIueL&amp;Recipient={receiver}&amp;Originator=COS&amp;MessageText={message}</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="1"> <Value xsi:type="xsd:string">GET</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="2"> <Value xsi:type="xsd:string"></Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="3"> <Value xsi:type="xsd:string">text/plain</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="4"> <Value xsi:type="xsd:string">ISO-8859-1</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="5"> <Value xsi:type="xsd:string">JSON</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="8"> <Value xsi:type="xsd:string"></Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="9"> <Value xsi:type="xsd:string"></Value> </SmsProviderSettingValue> </ArrayOfSmsProviderSettingValue>'; set @moduleGuid = 'E47D730D-053E-40E0-8CA2-33AFCCE56DC9'; select count(*) into @providerSettingExists FROM setting_setting_value WHERE setting_id = 3 AND setting_module_guid = @moduleGuid; select count(*) into @providerConfigurationExists FROM setting_setting_value WHERE setting_id = 1 AND string_value = @providerGuid AND setting_module_guid = @moduleGuid; INSERT INTO `setting_setting_value` (`tenant_id`,`security_user_id`,`setting_id`,`integer_value`,`text_value`,`decimal_value`,`string_value`,`blob_value`,`bool_value`,`dropdown_definition_id`,`setting_module_guid`,`uint_value`) SELECT 1,0,3,NULL,NULL,NULL,@providerGuid,NULL,NULL,NULL,@moduleGuid,NULL FROM DUAL WHERE @providerSettingExists = 0; UPDATE setting_setting_value SET string_value = @providerGuid where setting_id = 3 AND setting_module_guid = @moduleGuid; INSERT INTO `setting_setting_value` (`tenant_id`,`security_user_id`,`setting_id`,`integer_value`,`text_value`,`decimal_value`,`string_value`,`blob_value`,`bool_value`,`dropdown_definition_id`,`setting_module_guid`,`uint_value`) SELECT 1,0,1,NULL,@providerXmlSetting,NULL,@providerGuid,NULL,NULL,NULL,@moduleGuid,NULL FROM DUAL WHERE @providerConfigurationExists = 0; UPDATE setting_setting_value set text_value = @providerXmlSetting WHERE setting_id = 1 AND string_value = @providerGuid AND setting_module_guid = @moduleGuid;

RestSmsProvider

An example configuration for REST looks like this:

<?xml version="1.0" encoding="UTF-8"?> <ArrayOfSmsProviderSettingValue xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SmsProviderSettingValue Id="0"> <Value xsi:type="xsd:string">https://messagingproxy.swisscom.ch:4300/rest/1.0.0/submit_sm/50345</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="1"> <Value xsi:type="xsd:string">GET</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="2"> <Value xsi:type="xsd:string">{ "destination_addr": "{receiver}", "short_message": "{message}" }</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="3"> <Value xsi:type="xsd:string">application/json</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="4"> <Value xsi:type="xsd:string">ISO-8859-1</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="5"> <Value xsi:type="xsd:string">JSON</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="8"> <Value xsi:type="xsd:string">username</Value> </SmsProviderSettingValue> <SmsProviderSettingValue Id="9"> <Value xsi:type="xsd:string">password</Value> </SmsProviderSettingValue> </ArrayOfSmsProviderSettingValue>

Whereas the setting IDs are defined as following:

Url = 0, Method = 1, Content = 2, ContentType = 3, ContentEncoding = 4, ContentPlaceholderConverter = 5, MaxMessageLength = 6, SupportsAlphanumericSenders = 7, BasicAuthenticationUserName = 8, BasicAuthenticationUserPassword = 9

And the following replacements are available in the Url and Content settings: {receiver}, {sender}, {message}

AwsSmsProvider

An example configuration for AWS SNS looks like this:

© ITSENSE AG. Alle Rechte vorbehalten. ITSENSE und CoreOne sind eingetragene Marken der ITSENSE AG.