Jump to: navigation, search

Sending Chat Transcript via Siebel-side Email

Genesys Chat solution already provides the option to send a chat session transcript to a client by email. Chat Server automatically manages this task on request from the agent side (agent desktop) during chat session finalization.

By sending the Genesys Chat Transcript via the Siebel-side Email feature, the Adapter allows a chat session transcript to be sent to a client from the Siebel side. As a result, it allows you to edit email content before sending. Both Genesys Email and Siebel Email solutions can be used for this purpose. Siebel Email Templates are also supported.

In addition, this feature supports sending the transcript current chat session(s) for those chat sessions previously concluded.

Deployment notes

Configure Multimedia Component

This feature is a part of the Gplus Adapter for Siebel CRM Multimedia component. To enable it, you must perform new configuration steps in addition to those explained in the “Multimedia Component: Updating the Siebel repository file” procedure, under in the “Configuring Siebel Using the Siebel Tools” section in the Chapter 8 “Deploying the Multimedia Component” of the Gplus Adapter 8.0 for Siebel CRM Deployment Guide.

When doing the “Multimedia Component: Updating the Siebel repository file” procedure, described in the “Configuring Siebel Using the Siebel Tools” section, do the following additional actions:

  1. As part of Step 8,' make two more copies of chosen Action-related Siebel business component named:
  • *GHistory Action Chat”
  • “GHistory Action Email”
  • As part of Step 21, merge conflicts for the “GHistory Action Chat” and “GHistory Action Email” business components according to the following tables: “GHistory Action Chat” business component objects and resolutions
    Object Type Object Name Resolution
    BC Attribute INACTIVE File
    BC Attribute NO_DELETE File
    BC Attribute NO_INSERT File
    BC Attribute NO_MERGE File
    BC Attribute NO_UPDATE File
    BC Attribute SCRIPTED File
    Server Script (declarations) File
    Server Script BusComp_PreGetFieldValue File
    Server Script BusComp_PreQuery File
    Server Script buildTranscript File
    Server Script xGetChatActivityType File
    Server Script xGetProfileOrConfigParam File
    Field Primary Contact Email Address File
    Field TranscriptAsHTML File
    Field TranscriptAsText File


    “GHistory Action Email” business component objects and resolutions

    Object Type Object Name Resolution
    BC Attribute INACTIVE File
    BC Attribute NO_DELETE File
    BC Attribute NO_INSERT File
    BC Attribute NO_MERGE File
    BC Attribute NO_UPDATE File
    BC Attribute SCRIPTED File
    Server Script (declarations) File
    Server Script BusComp_PreGetFieldValue File
    Server Script BusComp_PreQuery File
    Server Script xGetInboundEmalActivityType File
    Server Script xGetOutboundEmalActivityType File
    Server Script xGetProfileOrConfigParam File
    Field Calculated Email Body File
    Field Calculated Email Type File
    Field Primary Contact Email Address File
  • After the Step 25, do the next two steps:
    1. Step 25a: For the “GHistory Action Chat” business components, set the Force Active field attribute to the checked state (or true in the Property window) for the following field:
      • "Call Id"
    2. Step 25b: For the “GHistory Action Email” business components, set the Force Active field attribute to the checked state (or true in the Property window) for the following fields:
      • "Call Id"
      • "Parent Activity Id"


    Customize Communication Applet

    If you plan to use Siebel Email for sending chat session transcripts, perform the following customization of the “Send Communication Applet” vanilla Siebel applet that is used for outbound emails. This automatically fills in addresses, subject and body with a chat session data. To do so, use the following procedure.

    1. Start Siebel Tools.
    2. Navigate to the “Project” folder of the Object Explorer.
    3. Lock the “Comm Manager” project.
    4. Navigate to the “Applet” folder of the Object Explorer.
    5. Select the Send Communication Applet.
    6. Right-click the applet and select Edit Server Scripts.
    7. Add the call of the GplusLoadPredefinedFields() function into the predefined WebApplet_Load() function, as shown in the example here:
      function WebApplet_Load ()
      {
          GplusLoadPredefinedFields();
      }
    8. Add the following GplusLoadPredefinedFields() function:
      function GplusLoadPredefinedFields()
      {
          var EMAIL_TEMPLATE_PARAM = "ChatTranscriptEmailTemplate";
      
          var id  = TheApplication().GetSharedGlobal("GplusChat2Email_Id");
          if (id != null && id != "")
          {
              TheApplication().SetSharedGlobal("GplusChat2Email_Id","");
      
              var CHAT_BUSINESS_OBJECT    = "GHistoryChat";
              var CHAT_BUSINESS_COMPONENT = "GHistory Action Chat";
              var svc = null;
              var ips = null;
              var ops = null;
              var bo = null;
              var bc = null;
              try
              {
                  ips = TheApplication().NewPropertySet();
                  ops = TheApplication().NewPropertySet();
                  svc = TheApplication().GetService("MCR Activity manager");
      
                  ips.SetValue(EMAIL_TEMPLATE_PARAM);
                  svc.InvokeMethod("GetProfileOrConfigParam",ips,ops);
                  var emailTemplate = ops.GetValue();
      
                  if (emailTemplate != null && emailTemplate !="" && emailTemplate !="CHANGE_ME")
                  {
                      ips.Reset();
                      ops.Reset();
                      svc = TheApplication().GetService("Outbound Communications Manager");
                      ips.SetProperty("CommTemplateName", emailTemplate);
                      ips.SetProperty("SourceBusObj", CHAT_BUSINESS_OBJECT);
                      ips.SetProperty("SourceId", id);
                      try
                      {
                          svc.InvokeMethod("ExpandCommTemplate", ips, ops); 
                      }
                      catch(e)
                      {
                          ops.SetProperty("ExpandedSubject","");
                          ops.SetProperty("ExpandedText","Failed to expand Email Template '"+emailTemplate+"'");
                          ops.SetProperty("HTMLExpandedText","Failed to expand Email Template '"+emailTemplate+"'");
                      }
                      var body = ops.GetProperty("ExpandedText");
                      if (body==null || body=="")
                          body = ops.GetProperty("HTMLExpandedText");
                      BusComp().SetFieldValue("Description",ops.GetProperty("ExpandedSubject"));
                      BusComp().SetFieldValue("Display Email Body",body);
                      BusComp().WriteRecord();
                  }
                  else
                  {
                      bo = TheApplication().GetBusObject(CHAT_BUSINESS_OBJECT);
                      bc = bo.GetBusComp(CHAT_BUSINESS_COMPONENT);
                      bc.ClearToQuery();
                      bc.SetSearchSpec("Id",id);
                      bc.ExecuteQuery(ForwardOnly);
                      if (bc.FirstRecord())
                      {
                          BusComp().SetFieldValue("Description",bc.GetFieldValue("Description"));
                          BusComp().SetFieldValue("Display Email Body",bc.GetFieldValue("TranscriptAsText"));
                          BusComp().WriteRecord();
                      }
                  }
              }
              catch(ex)
              {
              }
              finally
              {
                  svc = null;
                  ips = null;
                  ops = null;
                  bc = null;
                  bo = null;
              }
          }
      }
      
    9. Save changes to the applet.

    Configuring the Siebel Email Template for chat transcript sending

    This section describes how to configure the Siebel Email Template to form an outbound email with a chat session transcript. If the Template is not configured, outbound email will be created with a chat session transcript only.

    Note: The Siebel Email Template is applicable to both Siebel Email and Genesys Email.

    To configure Email Template to be used for sending chat session transcript, use the following procedure.

    1. Navigate to Site Map > Administration - Communications > All Templates.
    2. Create a new record with the following parameters:
    • Name: <TemplateName> (any you wish, for example, “Gplus Chat Transcript Text Template”)
    • Channel Type: email
    • Status: active
    • Language: <your language>
    • Locale: <your locale>
    • Description: <your description>
  • Complete the template using “GHistoryChat” as the Object parameter value. The figure here provides an example.
    GPSBL-5074-sbl-email-tpl-example.png
    Figure 1: Siebel Email Template example.

    The Special Chat session related fields are:
    • [GHistory Action Chat.Description]: chat session subject
    • [GHistory Action Chat.Primary Contact First Name]: client’s first name
    • [GHistory Action Chat.Primary Contact Last Name]: client’s last name
    • [GHistory Action Chat.TranscriptAsHTML]: chat session transcript in HTML format
    • [GHistory Action Chat.TranscriptAsText]: chat session transcript in text format
    • [GHistory Action Chat.Started]: Date and time when session was started
    • [GHistory Action Chat.Due]: Date and time when session was finished
  • Navigate to Site Map > Administration - Communications > All Configurations.
  • Select the required configuration. If no configuration is created, create it as described in the “Multimedia Component: Creating a customized configuration file” procedure, section “Configuring Siebel Using the Siebel Web Client”.
  • Set the “ChatTranscriptEmailTemplate” configuration parameter with <TemplateName> from the Step #2.
  • This page was last edited on December 16, 2016, at 02:45.
    Comments or questions about this documentation? Contact us for support!