SMSMode Connection Package - Use Case


To help you set up this use case, you can download the relevant documentation and sample project. Open url.png See List of files to download

From: Self Help Cobalt and later.

This use case enables you to send an SMS to a recipient from a Self Help procedure. It uses the SMSmodeSendtoNumber endpoint in the SMSMode connection package.

Note: The full procedure of this use case is available in the Examples folder in the connection package.

Overview

The implementation of the use case is performed in several phases:

  • Phase 4: Process the result of the SMS sending test (4)
    • Create a Page step to process the Sending successful result (success condition fulfilled).
    • Create a Page step to process the Sending failed result (success condition not fulfilled).
               Use case - Send a SMS procedure.png
       

Prerequisites: Installation and configuration of the SMSMode connexion package

   Open url.png See the install procedure.

Phase 1: Create a step to collect the information

   Information to be collected:

  • Phone number of the recipient
  • Text of the SMS message
     

Step 1: Create a form

1. Create a new form in your Self Help project. Name it fSMS.

    Open url.png See the detailed procedure.

2. Add a data input field for each of the input parameters required by the SMSmodeSendtoNumber end point.
         Use case - Form creation.png  Use case - Form fields.png

Parameters are saved in variables.
         Use case - Form parameters.png

Step 2: Associate the form with the first step of the procedure.

1. Create a new procedure in your Self Help project.

    Open url.png See the detailed procedure.

2. Insert a Page step. Name it Data input.

3. Click and drag the fSMS form from the Explorer pane to the Form step.

Phase 2: Call the SMSmodeSendtoNumber endpoint

Step 1: Create a step for calling the endpoint.

1. Insert a Sub-procedure step in the Self Help procedure. 

2. Double-click the step.
The properties window of the procedure will appear.

3. Select the Link to procedure alias option.
The list of aliases available is displayed.
         Use case - Alias list.png

4. Select the alias of the SMSmodeSendtoNumber endpoint.

5. Click Next.
The window for configuring input and output parameters will appear.
         Use case - Input output parameters.png

Step 2: Enter the values of the input parameters of the endpoint.

    Open url.png See the description of the input and output parameters.

1. Specify the form variables corresponding to the input parameters of the connection package procedure (Input values pane, fields => green).
Note: Parameters without specified variables are ignored.

2. Check the output parameters. Specify the output variables corresponding to the output parameters of the connection package procedure (Output variables pane, fields => red).

3. Click Finish.

Phase 3: Define the conditions for sending the SMS

Step 1: Create a step for adding the sending conditions.

1. Insert an Action with Switch step after the sub-procedure. Name it Test.
Two branches will be created.

  • The top branch <Condition> manages the response to be provided in the event of success of the SMS sending.
  • The bottom branch Default manages the response to be provided in the event of failure of the SMS sending.

Step 2: Define the condition that represents the success of the SMS sending.

1. Double-click the <Condition> field in the top branch.
The window for defining the condition will appear.

1. Enter the condition that indicates a creation success with a nul status of the query.

  • Select the status output variable that stores the status of the query.
  • Select the equal operator et enter the value 0.
        Open url.png See the description of return codes.

         Use case - Enter output parameters.png

  • Click Finish.
    • The condition will be updated.
    • Automatically, the Default branch at the bottom manages the response to be provided in the event of failure.
     

Phase 4: Process the test result of the SMS sending

Step 1: Process the result in the event of success.

1. Insert a Page step after the top branch that is called in the event of success. Name it Success.

2. Define the content of the step.

Best Practice icon.png  Click Insert an expression and enter the variable name to retrieve the value of variables.
Use case - Display value of a variable.png

  • Enter a message informing users that the procedure was correctly executed.
  • Display the phone number of the recipient using the fSMS.phone_number output variable.
    Caution: The name of the variable is case-sensitive.
     
Self Help Exemple
Use case - Success.png Use case - Success - Example.png

Step 2: Process the result in the event of an error.

1. Insert a Page step after the bottom branch that is called in the event of an error.

2. Define the content of the step.

  • Enter a message informing users that an error occurred.
  • Display the error message using the description output variable.
    Caution: The name of the variable is case-sensitive.
      
Self Help Exemple
Use case - Error.png Use case - Error - Example.png

List of files to download

Note: Refer to the procedure to install the files.

Tags:
Last modified by Unknown User on 2021/10/28 17:43
Created by Administrator XWiki on 2021/10/28 17:40

Shortcuts

Recent changes
•  EV Service Manager
•  Service Apps
•  EV Self Help
•  Service Bots

Powered by XWiki ©, EasyVista 2021