SMS keywords

From Catglobe Wiki
Revision as of 09:08, 12 April 2012 by Huynhhuyphong (talk | contribs) (SMS keywords)
Jump to: navigation, search



SMS keywords

SMS keywords can be inserted into outgoing SMS. The SMS Keyword is the Identification text that will be used by people with mobile phones to send SMS back to us. A message might thus be "If you would like to receive a free newsletter pls send an SMS to 555-5555 with the message "KEYWORD", where the keyword will depend on the provider they return the SMS to. All the KEYWORD merge-field in reality does is insert a keyword depending on the provider it is sent from instead of the KEYWORD tag. So it is a bit like a merge field. Only this mergefield is essential for anyone that wants to send an SMS to us to place first in the message so the provider knows that it is intended for your site as receiver. Besides this purpose, the keyword is also used as an "distribution rule" that identifies what resource's SMS inbox will receive the SMS.

If you want to set up a keyword in Catglobe you can access the dialogue for this under the drop down menu of the Communicator SMS list. You will be introduced to a dialog like below.

SMS581-2

When a keyword is added for a resource it means that this keyword is the one that will be merged into any mail sent from this resource for this provider. Thus there can only be one keyword per provider for the same resource. The keyword also has another function though. If the Catglobe site receives an SMS, then it will check if it can identify a keyword in it. If it can, then it will make sure that the incoming SMS is placed in the communicator of the resource that has this keyword registered. The keywords therefore also function as a type of distribution rule.

Allthough you are sending an SMS with keywords from a specific resource it does not necessarily mean that this is the place to which you want its return messages sent. You can specify more distribution rules for SMS using this keyword by using the distribution rules feature of SMS. Activate the distribution rules button by highlighting one of your SMS keywords and click on it. You will then see the following dialog.

SMS581-3

You can add multiple rules for the same keyword. Thus you can e.g. both sent a thank you SMS in return to the sender as well as well as move the SMS to a different resource in the system.

Click create to add a rule.

SMS581-4

At the top of the new SMS distribution rule dialog you can choose between 4 types of rules.

Move: Makes it possible for you to move the entire SMS to a different destination folder (typically the inbox) of a different resource.

Copy: Makes it possible for you to make a copy of the SMS on a different destination folder (typically the inbox) of a different resource. The difference to the move type is that this rule will leave not remove the original copy of the SMS.

Delete: Simply deletes the incoming SMS with the specific keyword.

Execute CGScript: This is a more advanced - but nonetheless extremely smart option. This rule offers you to choose a workflow or tabulation script. When an email with this keyword is received by Catglobe then the chosen script will be run. The SMS message will exist in context of the script and can thus be used to insert into e.g. a task or project.

Index

Data type

Value

SMS_KEYWORD

string

The keyword of the sms

SMS_FROM

String

The sender's number

SMS_TO_RESOURCE_ID

number

The resource ID of the resource to which the sms is delivered

SMS_CONTENT

string

The content of the sms (including the keyword)

Example : On the workflow using for adding the journal basing on the sms content :

array smsparameter=Workflow_getParameters();

string smskeyword = smsparameter[SMS_KEYWORD];

number parentResourceId = smsparameter[SMS_TO_RESOURCE_ID];

string phonenumber = smsparameter[SMS_FROM];

string smscontent = smsparameter[SMS_CONTENT];

addJournal(2188468, 1, "Comment", smscontent);