Let's take an example of a Business Process to create a ticket in an ITSM system. When an end-user requests Luma to log a ticket in ISM, the virtual Agent should prompt the user to provide issue details. A Luma skill is identified that triggers an automation workflow that logs a ticket in ISM. Once the ticket is successfully logged, an email is sent to the requestor with the ticket details, and a Channel Notification is sent to the user.
To design the required business flow, the following components are required:
Inputs
Ticket Description to capture the details of the user request.
User’s Email ID to send an email to the requestor with ticket details.
Web Operations
‘Log a Ticket’: An integration operation to log a ticket in an ITSM system such as ISM with the provided issue description.
‘Send Email’ to trigger an email to the ticket requester.
'Channel Notification' to trigger a notification to the user on the Luma channel on successful ticket creation.
To design the workflow in Luma Automation, follow the below steps:
Step 1: Configure Integration Instances
The first step is to create the third-party application and configure the environments with which the workflow integrates. In our example, the workflow connects to your ITSM system, Intelligent Service Management (ISM), and Email server.
To configure ISM Application for your tenant, follow the below steps:
Navigate to Integrations.
Create an Application with the integration type as REST.
Add AppName, Description, Integration Type, and click on Create.
Next, create an instance for your ISM environment.
On the Instance details window, add your Instance Name, target URL, and Authorization Type.
To authenticate and connect to your ISM environment, pass the following details as Global Header:
csm_app_url
slice_token
user_auth_token
webservice_user_name
webservice_user_password
integration
Click on Create.
Similarly,
Configure the Email server API:
Create an Application with the integration type as REST.
Configure the instance for the Email server.
Add Instance Name and Target URL.
Set the Authentication Type and add the Bearer Token.
Click on Create.
Configure your Luma Instance:
Create an Application with the integration type as REST.
Configure the instance for the Email server.
Add Instance Name and Target URL.
Pass the following as Headers:
Generate and copy the API Access Token from Luma VA and pass it to the API as the Header. Provide Send Channel Notifications permission when creating API access key. Refer to Create and Manage API Access Keys to create an API access key with Send Channel Notifications permission.
Fetch the Tenant External ID from Luma VA and pass it to the API as the Header. Click on the Tenant → Settings. Copy the Tenant External ID on Tenant Information. Refer to Tenant Information for more details.
Click on Create.
Once the Application and Instance are ready, you can now design the workflow using these applications as connectors.
The Authentication method and Global Headers configured for the instance is organization-specific.
Step 2: Create a Workflow
Follow the below steps to create a workflow:
Navigate to the Workflow Builder screen and click on Create Workflow.
On Create Workflow screen, add the new workflow details.
Add ‘Name’ and ‘Description’
Select ‘Retry Configuration’ to enable the system to retry executing the operation in case of an error.
Click on Create to create the Workflow.
Workflow is created and you are redirected to the Workflow Designer.
Step 3: Design Workflow
You can now drag and drop controls on the designer to create the workflow. To do so, follow the below steps:
Define Workflow Input Parameters
On the Workflow Designer screen, open the Properties Panel → Workflow Inputs tab.
On the Input Parameters section, click on + to:
Add TicketDescription as the input parameters. The parameter is used to accept user issue details from the end-user.
Add UserEmailID. The parameter is used to hold the requestor's email id.
Design Workflow
Now, add the controls in sequence to design the workflow.
Select and name the Start event.
Add a Service Task to log a ticket in ISM
Now drag and drop the ISM Connected App from the left pan on the designer.
On the Properties panel → General tab, add the Service Task Name to ‘Log a Ticket’.
In the Connected App, select the configured Instance for your ISM environment (created in Step 1).
Select the Start event and use the Sequence/MessageFlow Association to create a connection to the Service Task.
Now, select the Service Task and navigate to the Input/Output tab to add the following input parameters.
Description to hold the issue details. Map the parameter to the Workflow Input Parameter TicketDescription
UserEmailID to hold the requestor’s email id. Map the parameter to the Workflow Input Parameter UserEmailID
Next, navigate to Operations to configure the task to be executed in your target environment.
Add the following details:
URI: /Incident
Method: POST
Request Payload to send the ticket details to the API.
Now, navigate to the On Success tab to configure the steps to be performed on the successful execution of the task on the target application.
In the Response Output Parameters section, create a new parameter Ticket_ID to hold the ticket number received in the JSON response from the target system.
Service Task to log a ticket in ISM is ready.
Similarly, create another Service Task to send an email to the ticket requestor.
Drag and drop the SendEmail Connected App from the left pan on the designer.
Select the Service Task and create the following Input Parameters:
Ticket ID: Set the parameter to the ticket id generated in ISM in the earlier step. Map the parameter using the Step Output Parameter to use the output parameter from the 'Log a Ticket’ step.
UserEmailID to hold the requestor’s email id. Map the parameter to the Workflow Input Parameter UserEmailID.
Configure the operation to send an email to the Requestor.
Once the Service Task is created, add the XOR gateway to add Rule-based conditions to the workflow.
Use the Sequence Message Flow or Association tool to create a link between the ‘Log a Ticket’ Service Task and the XOR gateway.
Create the Alternative paths for the following rules:
Ticket created: If the ticket is successfully created, send an email to the requestor with ticket details.
Use the System Defined Output variable default_status to identify the execution status of the 'Log a Ticket’ step.
Example: Add Condition Expression ${out_Activity_17mx2d1_default_status == 'SUCCESS'}Use the Sequence Message Flow or Association tool to create a link with the SendEmail Service task.
Ticket Creation Failed: If the ticket creation fails, end the workflow.
Add EndEvent to the designer.
Use the rule ${out_Activity_17mx2d1_default_status != 'SUCCESS'}
Use the Sequence Message Flow or Association tool to create a link with the EndEvent.
Add another Service Task to notify the user on Luma Channel on successful ticket creation.
Drag and drop the Luma Connected App from the left pan on the designer.
Select the Service Task and create the following Input Parameters:
Ticket ID: Set the parameter to the ticket id generated in ISM in the earlier step. Map the parameter using the Step Output Parameter to use the output parameter from the 'Log a Ticket’ step.
UserID to hold the requestor’s contact id. Map the parameter to the Workflow Input Parameter → System Defined parameter ‘initiatorContactId’.
Configure the operation to send a notification to the Requestor. For more details on the SPI, refer to Sending Notifications to Users From External Applications.
Use the Sequence Message Flow or Association tool to create a link between the Send Email and Channel Notification Service Task.
Add EndEvent to the designer.
Use the Sequence Message Flow or Association tool to create a link between the Channel Notification with the EndEvent.
Click on Save to save the new workflow.
The workflow is now ready.
Step 4: Test the Workflow
Once the workflow is ready, manually execute the workflow to affirm that the workflow is working as expected.
To test the workflow, follow the below steps:
Navigate to the Workflow Builder.
Locate the newly created workflow and click on the execute button associated with the workflow.
On the ‘Execute Workflow’ window, add the workflow input parameters:
Description: Add the issue details.
Email: Add the Requestor’s email id.
Click on Execute.
Once the Workflow is executed, you can view the execution status in Workflow executions.
Navigate to Workflow Executions → Historical Executions.
Select the required execution record to view execution details. Here you can view the steps and the path executed. On the Execution Details, view the execution details for each step. For more details, refer to Historical Executions.
Once the workflow is successfully executed, it can be executed through a skill.
Step 5: Execute Workflow through a Skill
Once configured, an automation workflow can be executed through a Luma skill. You can now build a new skill and add the Automation workflow to the conversation Flow. To do so, follow the below steps:
Navigate to Skill Builder on your Luma tenant.
Click on Create Skill to build a new skill.
Add skill details.
Click next and add Invocation details.
Click Next and create Conversation Flow for the skill.
Add the Attribute 'Description' to prompt the user to provide issue details.
Next, add the Conversation Item, Automation Workflow. Add the following details:
Set Workflow Type as Designer
Select the Workflow created in Step 2.
Pass the attribute ‘Description' to the workflow input parameter 'TicketDescription’ (as created in Step 3).
Set workflow input parameter ‘UserEmailID’ to the user context variable @{user.email}.
Add a message to inform the user about the workflow execution initiation.
Click Create to build the skill.
Execute Build and Publish to publish the skill.
You can now execute the skill and trigger the automation workflow.