Genpact Cora Knowledge Center

Support

Conversations View

V9.4.1

Overview

Conversations View is a solution-level component that enables the end users to have all the case related conversations at one place within a case. This reusable component can be combined in a form within any solution-based workflow.

Conversation types

All conversation related items are saved in a product database table. The Email and Comment conversation types are the out-of-the-box conversation types available in Cora SeQuence.

For configuring Email Conversation type, see this article.
For Comment Conversation type, see this article.

You can add any custom conversation type to your solutions per need.
For adding Custom Conversation type, see this article.

Add Conversations View to Cora SeQuence forms

  1. In a workflow, add or edit a form or task activity.
  2. Add the following script to the form’s source in the relevant location.
<div>
<sq:ConversationView runat="server" Id="Conversations"></sq:ConversationView>
</div>

NOTE

  • Only the workflows that are in the context of a Solution support Conversations View.
  • Conversations View component should be used in the master workflow forms.

Conversations view UI

Consider the following design parameters for Conversations view in Solutions.

  • Supported resolution in the form is:
    • Height: Minimal height for the view in the form (empty state) is 100px
    • Width: 33% - 100% of the screen; minimum 600px
  • View is responsive.
  • Most recent item is listed on top, from newest to oldest, or last update date descending.

Conversation item built-in command

The Create Conversation Item built-in command lets end users insert conversation items into the Conversations View. You can add a general conversation item, or a specific conversation item related to the type of conversation available in the system. The general items are added using a system default type called Conversation Item. This type uses the default template, and is the basis of all conversation items.
For details on the Email Conversation type, see this article

Command parameters

  • workflowIinstanceId
  • conversationItemState
  • Title
  • Body
  • Attachments
  • createdByUserId

IMPORTANT
To execute built-in command that writes into the Conversations View, make sure you have Execute permissions in the master workflow.
To use Conversations View in a sub-workflow, the WF instance Id parameter should be mapped to the master workflow instance Id.

Conversation solution configuration

You can configure the conversation types to be enabled or disabled in the relevant solution. The list of conversation types is loaded from all of the system-available solutions.

When conversation types are disabled, there is no option to add them through the UI, built-in command, or API. Any existing disabled conversation items are displayed with the default template.
The Delete action is allowed only through API.

These reusable solution components are deployed with the solution package.

NOTE
Conversation Types are enabled by default for new created Solutions. Post upgrade, for any existing Solutions, all the conversation types are disabled.
Post-upgrade, if you want to enable the Conversations View component for an existing Solution, then open and close the Conversations View window in the solution once.

Conversations View client API

The Conversations View component exposes the following four events to define additional actions and configurations.

  • addConversationViewItemActionClicked: is called when a user clicks on an action related to a specific item.
    For example, click on Reply.
  • addConversationViewItemToolbarActionClicked: is called when a user clicks on the Conversations View toolbar buttons.
    For example, click on New email.
  • addConversationViewParametersBinding: is called when Conversations View binds the Conversation Item parameters.
    This event helps implementation set the Email Composer properties.
  • addConversationViewActionCompleted: is called when a user completes an action performed in the Conversations View.
    For example, when closing the Email Composer window, either by clicking the X button, or by clicking Save or Send.

All the events receive the args object parameters that include the following:

  • args.details.actionName: The selected action.
    For example, New.
  • args.details.itemType: The Conversation item type on which the action applies.
    For example, Email.
  • args.detail.parameters: The Conversation item related parameters.
    For example, windowTitle for Email Composer.

Clients API example

<script type="application/javascript">
  $sq(document).ready(function(){
    var conversationsId = $sq("[id$=Conversations]").attr("id");
                var conversations = $findByControlId(conversationsId);


    conversations.addConversationViewItemActionClicked(function(args){
      console.log("i am item action");
                console.log(args.detail);
    });


    conversations.addConversationViewItemToolbarActionClicked(function(args){
               console.log("i am toolbar action");
              console.log(args.detail);
    });
    conversations.addConversationViewParametersBinding(function(args){
               if (args.detail.actionName == "new")
                {
                  args.detail.parameters.windowTitle = "New email title";
                  args.detail.parameters.from = "xyz@genpact.com,bbb@genpact.com";
                  args.detail.parameters.template = "DefaultTemplate";
                  args.detail.parameters.to = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.cc = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.bcc = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.subject = 'Email Composer Subject';
                  args.detail.parameters.body = 'Test test test';
                  args.detail.parameters.signature = 'alias';
                }


console.log(args.detail);
    });
    conversations.addConversationViewActionCompleted(function(args){
              console.log("i am completed");
console.log(args.detail);
    });
  });


</script>

Configure conversation item events for event handling

The Conversation item events hook up to implementations, and make them capable of performing actions on conversation item status change. You can configure the system to initiate a specific workflow and perform action when an email conversation item changes to a specific status.

You can configure the conversation item events to hook up to implementations at the solution level.

  1. In the Administration site, open a Solution from the list.
  2. In the Solution Components section, click Conversation Component.
  3. In the Conversation Component window, click Status Change Handlers.
  4. Click Add New Record.
  5. Select Conversation Item Type as Email. 
  6. Select Status, Sent or Undelivered.
  7. Select Workflow Template, the workflow to initiate for conversation item.
  8. Click Add.


  9. In the selected workflow, add a Built-in Command Listener activity to listen to the conversation item event.
    For more details, see this article.

V9.4

Overview

Conversations View is a solution-level component that enables the end users to have all the case related conversations at one place within a case. This reusable component can be combined in a form within any solution-based workflow.

Conversation types

All conversation related items are saved in a product database table. The Email conversation type is the out-of-the-box conversation type available in Cora SeQuence. You can add any custom conversation type to your solutions per need.

For configuring email conversation type, see this article.

For adding custom conversation type, see this article.

Add Conversations View to Cora SeQuence forms

  1. Add or edit a form or task activity in a workflow.
  2. Add the following script to the form’s source in the relevant location.
<div>
<sq:ConversationView runat="server" Id="Conversations"></sq:ConversationView>
</div>

NOTE
Conversations View is supported only in workflows that are in the context of a Solution.

Conversations view UI

Consider the following design parameters for Conversations view in Solutions.

  • Supported resolution in the form is:
    • Height: Minimal height for the view in the form (empty state) is 100px
    • Width: 33% - 100% of the screen; minimum 600px
  • View is responsive.
  • Most recent item is listed on top, from newest to oldest, or last update date descending.

Built-in command

The Create Conversation Item built-in command lets end users insert conversation items into the Conversations View. You can add a General conversation item, or a specific conversation item related to the type of conversation available in the system. The general items are added using a system default type called Conversation Item. This type uses the default template, and is the basis of all conversation items.

Command parameters

  • WF instance Id
  • conversationItemState
  • Title
  • Body
  • Attachments 

IMPORTANT
To execute built-in-command that write into the Conversations View, make sure you have Execute permissions in the master workflow.

Conversation solution configuration

You can configure the conversation types to be enabled or disabled in the relevant solution. The list of conversation types is loaded from all of the system-available solutions.

When conversation types are disabled, there is no option to add them through the UI, built-in-command, or API. Any existing disabled conversation items are displayed with the default template.
The Delete action is allowed only through API.

These reusable solution components are deployed with the solution package.

Conversations View client API

The Conversations View component exposes four events to define additional actions and configurations.

  • addConversationViewItemActionClicked: is called when a user clicks on an action related to a specific item.
    For example, click on Reply.
  • addConversationViewItemToolbarActionClicked: is called when a user clicks on the conversation view toolbar buttons.
    For example, click on New email.
  • addConversationViewParametersBinding: is called when Conversation View binds the Conversation Item parameters.
    This event helps implementation set the Email Composer properties.
  • addConversationViewActionCompleted: is called when a user closes the Email Composer window, either by clicking the X button, or by clicking Save or Send.

All the events receive the args object parameters that include:

  • args.details.actionName: The selected action. For example, New.
  • args.details.itemType: The Conversation item type on which the action applies. For example, Email.
  • args.detail.parameters: The Conversation item related parameters. For example, windowTitle for Email Composer.

Clients API example

<script type="application/javascript">
  $sq(document).ready(function(){
    var conversationsId = $sq("[id$=Conversations]").attr("id");
                var conversations = $findByControlId(conversationsId);


    conversations.addConversationViewItemActionClicked(function(args){
      console.log("i am item action");
                console.log(args.detail);
    });


    conversations.addConversationViewItemToolbarActionClicked(function(args){
               console.log("i am toolbar action");
              console.log(args.detail);
    });
    conversations.addConversationViewParametersBinding(function(args){
               if (args.detail.actionName == "new")
                {
                  args.detail.parameters.windowTitle = "New email title";
                  args.detail.parameters.from = "xyz@genpact.com,bbb@genpact.com";
                  args.detail.parameters.template = "DefaultTemplate";
                  args.detail.parameters.to = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.cc = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.bcc = "xyzso@genpact.digital,abcgen@genpact.digital";
                  args.detail.parameters.subject = 'Email Composer Subject';
                  args.detail.parameters.body = 'Test test test';
                }


console.log(args.detail);
    });
    conversations.addConversationViewActionCompleted(function(args){
              console.log("i am completed");
console.log(args.detail);
    });
  });


</script>