Here you can see an example of chat session between user and bot using Sametime client.
User asks bot several questions and bot responds to them providing user with the information he needs.
Example of "phone John Doe" bot command:
requesttext:=@RequestText;
Subject1:=@ReplaceSubstring(Subject;"*":" *":"* ";"");
user:=@Trim(@If(@Left(Subject;1)="*";@Left(requesttext; Subject1);@Right(Subject;1)="*";@Right(requesttext; Subject1);@UserName));
@If(user="";@Return("Please specify a name. eg: phone Jonh Doe");"");
tmp:=@DbLookup("":"NoCache";@Subset(@DBName;1):"names.nsf"; "($Users)";user;"OfficePhoneNumber");
@If(@IsError(tmp);@Return("Info not found for "+user);@Implode(tmp)) |
|