In this article you will learn how to send files or attachments as well as chat conversation history over email and in Web service fulfillment from Luma. In addition to sending text, a user can also send files such as images and documents in a variety of file types such as Text, PNG, Jpeg, PDF, and MS Office formats. For example, as an end user chatting with Luma, you want to share a screen shot of the error or include a form in a word document to help troubleshoot the issue or follow the required fulfillment process. This can be done adding the file in the chat window for supported chat platforms.
Supported Chat Platforms
Not all chat platforms that work with Luma allow sending files. This is controlled by the chat platform vendor and is unfortunately out of Luma or Serviceaide's control. As you will see below, skills will use file type attributes to prompt the user to upload an attachment. If this attribute/conversation parameter is required and the user is on an unsupported chat platform, they will see a message reflecting this scenario and provided with options to exit the skill.
If your organization uses a chat channel that does not support sending files you should not use this feature. It will create a bad experience for users if they see errors that they need to upload a file but cannot do so. If your organization uses multiple chat tools and some are supported while others are not, you can use this feature but be careful of the impact to users who are using those unsupported channels.
The following chat channels support uploading files:
- Embedded Web Widget in Intelligent Service Management
- Facebook Messenger
- Web Widget
- Directline - this is a channel to support custom built integrations for home grown chat tools.
Supported File Formats
While inserting an attachment, the following list of file formats are allowed. If a user attempts to upload an unsupported file type they will receive an error message asking them to upload a different file type. After 3 attempts the skill will exit and follow the fallback process:
|Compressed (*.zip, *.gz, *.rar, *. tar)||Compress files can be attached.|
|Document Link||Links to external URL can be attached|
|Image (*.bmp, *. gif, *. jpeg, *.png)||Image files can be attached |
|Mail Message (*.msg)||Email messages can be attached|
|Office Documents (*.doc, *.rtf, *.ppt, *.xls) ||MS Office files can be attached|
|Portable Documents (*.pdf, *.ps) ||Portable files can be attached|
|System/ Application Logs (*.log) ||Log files can be attached. |
|Text (*.txt, *.csv, *. dat, *.sql) ||Text documents can be attached|
|Web (*.css, *.htm) ||Web pages can be attached |
Pass Attachments Using Email Fulfillment
An administrator can configure the email template and customize the message to add the chat conversation history for sending it to a specific email address.
To send attachments with email fulfillment, first you need to enable the conversation log in the Settings page, create an attribute of the Data Type 'File', configure email to pass the chat conversation history via email, and then insert the required attachment in the chat channel.
First, you must create an attribute of the Data Type 'File'. Ensure that your file is saved on your system. For more information about creating attribute, see Creating attributes that retrieve values from outside of Luma page.
To learn how to create an attribute, see Creating attributes.
The following process describes the email configuration details to pass the attachment and chat conversation history via email.:
- Create your skill using the Skills tab on the Bot Dashboard. For more information about creating a skill, see Creating your First Skill page.
- Link the file attribute which you have created for the email attachment since the attribute implies how the input is analyzed.
- After creating the skill, select the Fulfillment option and then select Email as shown below. For more information on post fulfillment, see Post Fulfillment Actions page.
- Specify the To address such as firstname.lastname@example.org, the intended recipient of the file.
- Specify the Subject for the email.
- Type the message in the Message text box that must be the context of the email. Specify @context.chat_conversation if you want to view the chat conversation history context in the email message body. The below image displays a sample email.
- Specify the file name.
- In the File text field, specify the attribute you have created. You must specify it with the user variable such as@context, followed by the Attribute Name which you have linked to the skill. For example, the Attribute which we have linked to the Skill is t1file. In this case, you can type it as @context.t1file. Based on the Smart Lookup feature, when you type @context, only the relevant attributes are displayed in the context menu.
- If you want to link the chat conversation as an attachment in the email, specify @context.chat_conversation in the File field.
- Click Save.
Sample Skill Execution to Pass Attachments
Using the bot you can execute the skill and add the attachment via Email Fulfillment. A sample conversation is displayed below.
You can upload your file by clicking the After executing the skill successfully, an email is sent to the intended user based on the details specified in the email body along with the specific attachment.
Pass Attachments Using Web Service Fulfillment
This section describes how to send attachments from a chat channel to an external system via web service fulfillment. For example, the end user may need to send a screen shot of an error to Intelligent Service Management (ISM) to be included in a ticket to provide more insight into troubleshooting an issue. This feature helps incorporate files in the chat channel to send as an attachment in a ticket using web service fulfillment.
To send an attachment to a ticket in ISM, you need to configure the following details in a skill for web service fulfillment.:
- Create an attribute of the Data Type 'File' using the Attributes page. User receives the prompt message in the Bot based on the Data Type selected here. The File Data type captures files and media attachments that is passed through the chat channel. For more information about creating attribute, see Creating attributes that retrieve values from outside of Luma page.
- Create a skill using Skills on the Bot Dashboard and associate the attribute.
- On the Fulfillment tab select Web Service.
- Select the web service connector and the web service operation. For example, Web Service Connector is ITSM-ISM and operation is OTB update ServiceRequest. OTB update ServiceRequest is available as out-of-the-box operation in the Operations list.
On the Request Header tab, set the Content-Type to multipart/form-data and Accept to Custom as shown below.
- On the Outbound Mapping tab, in the Attachments section, specify the following details:
- Type 'file' in the File Name field.
- Type @context followed by the attribute name in the File field. For example, if the attribute name is textfile, you can specify it as @context.textfile. The smart lookup feature helps prompting the user variable and valid attribute as required.
- Click Save.
Sample Skill Execution to Pass Attachments
Using the bot you can execute the skill and add the attachment. A sample conversation is displayed below.
Sample Attachment in ISM
Following is a sample ticket created in ISM.
After successfully executing the skill, an attachment will be sent to the respective ITSM connector based on the web service configuration.