praekelt/vumi — Issue #67: TextToChange Generic Worker
Author: overnin
Created: 2011-12-13 07:31:36+00:00
State: open

This worker is running a sms program that are described in a json file. The aim is to allow non technical staff to write a program description (with the help of a form) on the front end that will later be run by the worker. Obviously it will not be possible to express some complex program with a simple document tree structure, however we target to address medium complexity program.

The model is relying on 2 abstractions: dialogue and interaction
- dialogue groups a set of interaction with the participant
- interaction is an atomic exchange with the participant, it can be a question with answers, a announcement or answers/reply

Here is a basic example of program description:
{"program":
{"name":"M4H",
"participants":[
{"phone":"0788601444"} //only one participant
]
"dialogues": [ //only one dialogue which group 2 message to be schedule
{"name":"main",
"type":"sequential", //the type=sequential tell that the interaction are following a sequential pattern
"interactions":[
{"type":"announcement", //the first interaction immediately send "Hello" to the participant
"name":"1",
"content":"Hello",
"schedule_type":"immediately"},
{"type":"announcement", //the second interaction send "How are you" 20 minutes after the first interaction
"name":"2",
"content":"How are you",
"schedule_type":"wait(00:20)"}
]
}
]
}}