Updated on 2023-09-20 GMT+08:00

Configuring the Telegram Channel

Prerequisites

  • You have contacted the system administrator to obtain the app key and app secret of the app that has subscribed to the ccmessage_telegram_north_v1.0.0, telegram_north_v1.0.0, and file_donload_get-v1.0.0-manual - v1.0.0 APIs and bound to the tenant space for which the Telegram channel needs to be configured on the Configuration Center > Expansion Management > API Management > APP Service > APP Management page.
  • You have contacted the system administrator to set ApiFabric interface Address to the IP address and port number of the API Fabric under Configuration Center > System Management > System Parameter Configuration > System parameters > Service Channels > Common. The format must be IP address:Port number.
  • You have submitted an application to the system administrator to add the IP address and port number for logging in to the system frontend to the address trustlist. The value must start with https://, for example, https://*.*.*.*:28090. A domain name is not supported for this channel.
  • You have obtained the authentication certificate provided by the API Fabric and the identity certificate of the current system, and have uploaded them by referring to Managing a Certificate. To obtain the authentication certificate, perform the following steps:
    1. Contact O&M personnel to log in to the system backend and run the following command on the active container node to generate a certificate:
      openssl s_client -showcerts -connect IP:28090 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem

      Set IP to the IP address for logging in to the system frontend or the IP address of the server where the NSLB is located.

    2. Convert the certificate format to obtain the authentication certificate.
      openssl x509 -in mycertfile.pem -outform der -out mycert.cer
  • You have installed the Telegram software.

Context

If the app ID and app secret provided by the API Fabric are changed, you need to modify the involved Telegram channel as follows: Sign in as a tenant administrator, choose Configuration Center > Access Configuration > Channel Configuration, click Modify in the Operation column corresponding to the involved channel, and update the values of APP Key and APP Secret.

Procedure

  1. Sign in to the AICC as a tenant administrator and choose Configuration Center > Access Configuration > Channel Configuration.
  2. Click New. The Social Media Enabling Configuration page is displayed.

    Set Channel Access Code, select TELEGRAM, and click Next.

    The channel access code must be unique. The code can contain a maximum of 64 characters, including only letters, digits, and underscores (_), and can start only with a letter or an underscore (_).

  3. On the Choose configuration method page, set Telegram channel parameters.

    Table 1 Telegram channel parameters

    Parameter

    Description

    Personalized Configuration

    APP Key

    App ID information obtained from the API Fabric, which is the AK.

    APP Secret

    App secret information obtained from the API Fabric, which is the SK.

    BaseUrl

    IP address and port number for logging in to the system frontend. The value must start with https://, for example, https://*.*.*.*:28090. A domain name is not supported.

    Trust certificate

    Authentication certificate of the API Fabric, which has been uploaded in Managing a Certificate.

    Identity certificate

    Identity certificate of the current system, which has been uploaded in Managing a Certificate.

    Common Configuration

    Channel access code

    The channel access code set in 2 is displayed and can be modified.

    Info Configuration

    Set the following parameters:

    • Skill Queue: The options are all multimedia called routes of the current tenant space. Select an option as required.
    • Keyword for Transfer to Agent: Keywords for switching from chatbot service to manual service. After a customer enters any of the keywords on the Telegram client, chatbot service is switched to manual service.
      NOTE:

      If the intelligent chatbot is disabled, you do not need to set this parameter.

    Last Agent Mode

    This function is disabled by default. For details about how to enable the last agent mode, see How Do I Enable the Last Agent Mode?

    Dialog End Method

    Timeout period for no customer reply. If this function is disabled, the default timeout period is 3 minutes. For details about how to set the dialog end method, see How Do I Set the Dialog End Method?

    Agent Timeout Transfer

    Timeout period for no agent reply. This function is disabled by default. For details about how to set agent timeout transfer, see How Do I Set Agent Timeout Transfer?

    Session Transfer

    Whether to display only skill queues of the corresponding channel type when an agent transfers a session. For details about how to set session transfer, see How Do I Set Session Transfer?

    Offline Message

    This function is disabled by default. For details about how to enable offline messages, see How Do I Enable Offline Messages?

    Agent Work Time

    • Workday: A maximum of four working time segments (from 00:00 to 24:00) can be configured. By default, a time segment is displayed. You can click New to add a time segment.
    • Non-workday: A maximum of four working time segments (from 00:00 to 24:00) can be configured. By default, a time segment is displayed. You can click New to add a time segment.
    • Non-Working Time Notification: Notification displayed when a customer calls in non-working time.

    Chatbot Configuration

    This function is disabled by default, indicating that sessions are directly connected to agents. If it is enabled, you need to configure chatbot information as required. Set the following parameters:

    • Change Avatar: Chatbot avatar.
    • Name: Chatbot name.
    • Gender: Chatbot gender.
    • Chatbot Access Code: Chatbot access code configured in the intelligent IVR.
    • Default reply: Customized reply displayed when the chatbot cannot recognize the intent of a customer.
    • Timeout reply: Customized reply displayed when the session with a customer times out.
    • Prompt for transfer to agent: Customized prompt message indicating that chatbot service is switched to manual service.
    • Silent Agent Skill Queue: The options are all multimedia called routes of the current tenant space. Select an option as required.

    Robot Assistant Configuration

    This function is disabled by default. If it is enabled, the chatbot assistant is enabled on the agent side.

    • Assistant Access Code: Chatbot assistant access code configured in the intelligent IVR.

  4. Click Save And Proceed To The Next Step. The Integration instructions page is displayed.

    View the value of url used to send message to agent.

  5. Use the Telegram software to generate a token.

    1. Use any account to log in to Telegram.
    2. Search for @BotFather and add it as a contact.

    3. Send the /newbot command.
    4. Send the chatbot name AICCCustomize_TWbot.

      The value must end with bot.

    5. Save the generated token.

  6. Set the callback URL for message forwarding.

    Invoke the https://api.telegram.org/botToken/setWebhook API.

    Token: Enter the token generated in 5.

    Request parameter: Enter the value of url used to send message to agent obtained in 4.