Automation Example

Luma supports a variety of Automation Workflow. In this article, you will learn how to configure an Automation Workflow related to Powershell Service Configuration as an example. 

Below are the ready-to-use, Out-of-the-box (OOTB) Powershell workflows. You can add these Workflow Services to your Skill as Skill fulfillment and execute the workflow. 

No.CategoryWorkflow ServiceDescriptionInput ParametersExample
1PowershellLdap DeleteUserDeletes the AD user from LDAPUpdate Message On successMessage to be displayed on deleting the user 
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
2PowershellLdap DeleteGroupDeletes the Group from LDAPUpdate Message On successMessage to be displayed on deleting the group
Update Message On FailureMessage to be displayed if an error occurred.
Group SAM Account NameLDAP Group SAM Account Name
3PowershellLdap SearchUserSearch for the user in LDAPUpdate Message On successMessage to be displayed on success
Update Message On FailureMessage to be displayed if an error occurred.
FilterFilter criteria for the search
4PowershellLdap ExistsUserFind if the user already exists in LDAPUpdate Message On successMessage to be displayed on success
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
5PowershellLdap Change PasswordResets AD user password for a given login namePasswordNew Password
Update Message On successMessage to be displayed on successful password change
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
SMS TOPhone number to which the Self Service Password Reset service sends SMS.
SMS BodySpecify the SMS message to be sent when changing the password
6PowershellLdap enable UserEnables the AD userUpdate Message On successMessage to be displayed on enabling the user
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
7PowershellLdap disable UserDisables the AD userUpdate Message On successMessage to be displayed on disabling the user
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
8PowershellLdap change password at logon 



Resets AD user password for a given login name at logonPasswordNew Password
Update Message On successMessage to be displayed on successful password change
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name
SMS TOPhone number to which the Self Service Password Reset service sends SMS.
SMS BodySpecify the SMS message to be sent when changing the password
9PowershellLdap create UserCreates a new user in Active DirectoryPasswordPassword for the new user account
Update Message On successMessage to be displayed on successful creation of user in LDAP
Update Message On FailureMessage to be displayed if an error occurred.
First NameUser's first name
Last NameUser's last name
Login NameUser's login name
User Principal Name
Employee idUser's Employee id
Path
10PowershellLdap Unlock User Unlocks Active Directory (AD) userUpdate Message On successMessage to be displayed on success
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP Account Name to unlock
11PowershellLdap create GroupCreates New Group in Active directory for that AD domainUpdate Message On successMessage to be displayed on success
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name for Group
Path
Group NameNew Group name
Group CategoryGroup Category
Group ScopeGroup scope
DescriptionGroup Description
12PowershellLdap add User To GroupAdds a user to a groupUpdate Message On successMessage to be displayed on success
Update Message On FailureMessage to be displayed if an error occurred.
Group SAM Account NameLDAP Group SAM Account Name 
User SAM Account NameLDAP User SAM Account Name 
13PowershellAzure execute Powershell ScriptExecutes the Powershell script in the fileUpdate Message On SuccessMessage to be displayed on the successful execution of Powershell script.
Update Message On FailureMessage to be displayed if an error occurred.
File PathPowerShell script file absolute path.

Note: To use the operation, the PowerShell script must be available on the PowerShell machine.
File ParamsParameters required to execute the shell script.

Using Service Workflow in a Skill

Let us look at an example using the Automation workflow service 'Ldap enable User'.

The 'LDAP enable User' Workflow Service enables an end-user in LDAP using a PowerShell script. Follow the below steps to configure and use the workflow service:

 

Step 1: Setup Service Configurations

Service Configurations store the information used to connect to the system for automation workflows. Using the Automation Service Configurations page in Luma Skill Builder, you can specify the required login credentials for the specific service to which you want to connect.

Click on  Automation icon and navigate to Automation →  Service Configurations tab.

Following is the list of service configurations:

For any 'Ldap enable User' Workflow, you need to update the following Service Configurations.

  1. Powershell Configuration- The configuration is used to execute the PowerShell script to enable a user in LDAP. To use Powershell, the following configurations are required: 

    config.powershell.passwordRefers to the machine or environment password where you can execute PowerShell or winrm service is running.
    config.powershell.domainRefers to the machine or environment windows domain name where you can execute PowerShell or winrm service is running.
    config.powershell.usernameRefers to the machine or environment username where you can execute PowerShell or winrm service is running.
    config.powershell.addressRefers to the machine or environment address where you can execute PowerShell or winrm service is running.
  2. Luma 1.x Configurations- To use the workflow service in Luma Virtual Agent. To use Luma 2.x, the following configurations are required: 

    config.luma1x.urlThis is the URL to the Luma 1.x environment you want to connect to.
    config.luma1x.luma.api.access.keyRefers to the API access key created in Luma to allow a third-party system to connect to your tenant.

For more information refer to Out-of-the-box Automation Operations and Workflows.

Step 2: Using the Workflow Service in SKill

The next step is to create a skill in Luma Skill Builder to enable a user in LDAP. Add 'Ldap enable User' Workflow to the skill fulfillment. The Workflow requires the following parameters

Ldap enable UserPowershellEnables the AD userUpdate Message On successMessage to be displayed on enabling the user
Update Message On FailureMessage to be displayed if an error occurred.
SAM Account NameLDAP SAM Account Name

Map the parameters that require user inputs to the attributes in skill. Add attribute 'username' as mandatory input in Conversation Parameters section of the skill and map it to the input field 'SAM Account Name' for Automation Workflow in Skill Fulfillment.

When the skill is executed, Luma prompts the user to enter the user name to be enabled in LDAP. The user input is saved in the 'username' attribute and passed to the Automation Workflow, which in turn enables the account in AD.


© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com