Connect Usage

by onezero
6 months ago
846 Views

Table of Contents


Voodoo RPA Connect (Voodoo Connect)

What is Voodoo Connect?

Voodoo Connect is a new technology that makes it possible for users to interact with robots performing business processes. For example, in the RPA scenario, the robot is planed to sign in to a bank account but 2-factor authentication is required. So, using Voodoo RPA Connect in your RPA scenario, you can send a request to the user for responding to the robot with an SMS Code that has come to his/her phone in a systematic way. Systematic means that a well-defined input form (all input forms with types like DateTime, Numeric, Text, etc.) can send to users’ phones with mobile push notifications. When the user clicks this notification, Voodoo Connect opens with this form, and during this phase, the robot waits for a response until the expiration time. After the user sends that form filled with required fields, the robot gets dynamic form data and puts it into fields. Thus, the robots pass that 2-factor authentication restriction.

How to use Voodoo Connect?

Before starting to use Voodoo Connect in your scenario check the required software on the list below.

Prepare your Voodoo Connect for the RPA Scenarios
  1. Check Voodoo UC End Point is working. For example: your UC (Unified Console or Orchestrator) End Point is usually servicing on (https or http)://yourvoodooucdomain.name/service
  2. Install Voodoo Connect on your mobile phone. You can get it from Apple or Play Stores by searching Voodoo Connect.
  3. After installation, open your Voodoo Connect on your mobile phone, and from the left click “Setting”.
  4. On the “Profile Setting Page” copy Player ID that is unique to your phone.
  5. Login Voodoo UC account with your username and password. After that, navigate to the “Profile” page from the right top corner of the site.
  6. Enter your copied Player ID into the Player ID box under the “Information Update” part and click the “Save”.
  7. That is it 🙂 Now you are ready to use your mobile phone in your RPA Scenarios that the robots perform.
Use your Voodoo Connect in the RPA Scenarios

That technology is the Voodoo EDE Library. By default, it comes with Voodoo RPA 2.1 or higher versions. You can manually download this library from here and add it to your EDE file references.

Methods

Property Description
new Connect(string ucEndPoint, string ucUsername, string ucPlayerId) Create instance of class. This is the constructor and return instance of Object.
Note: You need to enter Unified Console End Point, Your UC Username and Your UC Player ID that you get from Voodoo Connect during proceed with the above steps
int send(string info, int expire, string formParams)

Send a request to the user phone. The first parameter (info) will be shown in the Push Notification message. The second parameter is the expiration time for the request. After this period of time user doesn’t reach to request form. The third parameter is the Form Decoration String check below instructions. This method return processID.

Form decoration string is a structured string representation of JSON array object. For example below string represents two form inputs.

[{“name”:”smscode”, “title”:”SMS Code”, “type”:”number”, “placeHolder”:”Enter SMS Code”, “require”:”yes”}, {“name”:”processtime”, “title”:”Process Time”, “type”:”datetime-local”, “placeHolder”:”Enter Process Time”, “require”:”yes”}]

Property Description
name Key parameter. After response to the that form data will be retireved by this Key
title Title of input. This input object will be shown the user with this Title
type Type of input. “date” | “datetime-local” | “email” | “month” | “number” | “password” | “search” | “tel” | “text” | “time” | “url” | “week”
placeHolder Place holder of input.
require Requirement of input. “yes” | “no”

Dictionary < int, string > check (int processID, int ms = 100000)

Check the process result and get a response from the user.
Note: This method return dictionary. First Key is the result code and the First Value is the response data for the form decoration you created. Result Codes (First Key): [-1: task not found (error) | 0: task waiting for | 2: task completed]. Below is the sample of First Value for the above form decoration that we sent to user’s phone.

{“smscode”:”12345″, “processtime”:”28-04-2020 16:45:20″}

Example #1

In this example, we sent to Voodoo Connect User (Username: johnny, PlayerId: 3421708e-7390-46b1-96e2-4fb8e5c0b863) simple SMS Code form and wait for 100 seconds (that is default value for check) for response from User Phone. If the user responds to that request, we will get a result (SMS Code) and assign this value into Robot’s in-memory data storage for use in the next steps of the scenario.

namespace VoodooImplementation {
    using System;  
    using VooDooCommonData.CommonInterface;
    using VooDooCommonData.InstanceData;
    
    using System.Collections.Generic;
    using System.Linq;
    using ConnectLoader;
    using Newtonsoft.Json;
    
    public class ComputationEvaluator : System.MarshalByRefObject, IPlugInComputation {
        
        private bool result_;
        
        private VooDooCommonData.InstanceData.PlanDataInstanceManager planDataInstanceManager_;
        
        /// Default Constructor for class
        public ComputationEvaluator() {
        }
        
        public bool result {
            get {
                return result_;
            }
        }
        
        public virtual VooDooCommonData.InstanceData.PlanDataInstanceManager planDataInstanceManager {
            get {
                return planDataInstanceManager_;
            }
            set {
                planDataInstanceManager_ = value;
            }
        }
        
        /// Calculate
        public virtual void ExecuteComputation() {
            
            Connect ConnectObj = new Connect("http://myvoodoouc.com/service", "johnny", "3421708e-7390-46b1-96e2-4fb8e5c0b863");
            int id = ConnectObj.send("I Am Voodoo Robot. Please! Send Me SMS Code :)", 100, @"[{""name"":""smscode"", ""title"":""SMS Code"", ""type"":""number"", ""placeHolder"":""Enter SMS Code"", ""require"":""yes""}]");
            Dictionary< int, string > result = ConnectObj.check(id);
            if(result.First().Key  == 2)
            {
                Dictionary< string, string > response = JsonConvert.DeserializeObject< Dictionary< string, string > >(result.First().Value);
                planDataInstanceManager_.SetDataTableValueFromCurrentDataRowIndex(2, "code", response["smscode"]);
                result_ = true;
            } else {
                result_ = false;
            }
            
        }
    }
}

Real Life Usage Example