User Tools

Site Tools


Receiving messages from users

At the bottom of the mobile device message list, the APP displays a text box where the user can send messages to the application associated to the channel. This text box only appears in the APP when the developer fills the Response messages URL attribute when including the channel. If this attribute is not informed, the text box is omitted.

Receiving user messages in the application can be used in several situations, as in the examples below:

When the user requests information to the application:

  1. The user sends the message: “order 12345” …
  2. The application receives the message and responds: “Click here to track your order 12345” …
  3. The user clicks on the message and opens the URL associated with it to track the order.

When the application sends a message and waits for a response from the user (or not):

  1. The application sends the message: “Purchase $100 on credit card number 5678. Answer B5678 to block the credit card.” …
  2. The user receives the message and answers: “B5678” …
  3. The application receives the user response and processes the credit card blocking.

POST variables

The message sent by the user reaches the URL of the application with a POST containing 2 variables:

fzupidchannel Identification of the channel that is receiving the message (unencrypted).
fzupresponse String containing the date/time, User-ID and user's message (encrypted).

To decrypt the string contained in the fzupresponse variable, the application must use the decrypt method included in the channel API, as shown below:

$encrypt_string = $_POST["fzupresponse"];
$usermessage = $object -> decrypt ( $encrypt_string ); 
String encrypt_string = httpServletRequest.getParameter("fzupresponse");
String usermessage = object.decrypt ( encrypt_string ); 
encrypt_string = params[:fzupresponse]
usermessage = object.decrypt ( encrypt_string )
my $encrypt_string = $post->param('fzupresponse');
my $usermessage = $object -> decrypt ( $encrypt_string ); 
encrypt_string = request.args['fzupresponse']
usermessage = object.decrypt ( encrypt_string )

In the above examples, the user message stored in the variable usermessage contains the following string:

String content:
YYYY-MM-DD HH:MM:SS;User-ID;Text-message

YYYY-MM-DD HH:MM:SS = Date and time the message was sent
User-ID = User identification
Text-message = The text of the message
en-050-user-message.txt · Last modified: 2017/04/20 16:14 by admin

Page Tools