Download PDF

Chat Theme Tab in Process Settings

This tab allows the creation of the customized themes for the Web Chat. You have to configure it through the different APIs, which are provided by default within Ameyo Server 4.3. Using the parameters provided here, any API can be called to perform its designated operation.

Chat Theme Tab

Figure: Chat Themes Tab

This tab and the "Default Chat Theme" will remain disable until a Customized theme is added.

Parameters

Before going to the APIs to perform the theme operations, it is required to go through the parameters and their values, which will be required to call the API to perform any option. Here, parameters are given in the following hierarchy.

Theme Configuration → Component → Property → Value

Get Session ID of Voice-Admin Login Session

It is requierd to provide the session ID of the current Voice-Admin's login while using the APIs. Get the access to the server operating system where Ameyo Server is installed and ask your administrator to get the session id from the backend.

Chat Theme APIs

Following operations can be performed through the APIs. Each operation is served by a dedicated API.

  1. Add Theme
  2. Add Property to Theme
  3. Update Theme
  4. Apply Theme
  5. Remove Property from a Configuration of a Theme
  6. Get All Themes
  7. Get Theme Configuration
  8. Remove a Theme
Add Theme API

Following is the URL of the API to be called for adding a theme for Web Chat.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.addWebchatThemeConfiguration&data={sessionId:<SESSION_ID>,themeName:<NAME_OF_THEME>,isEnabled:<boolean>,webchatThemeConfigurationProperties:[{chatScreen:CHAT_SCREEN,component:<COMPONENT_NAME>,property:<PROPERTY_NAME>,value:<VALUE>}]}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<NAME_OF_THEME>

Here, you have to provide a name for this new theme. It should be provided in text format.

<boolean>

true OR false

<COMPONENT_NAME>

Provide a name for the component, of which formatting you want to modify.

<PROPERTY_NAME>

Provide a name for the property of the already provided component, of which formatting you want to modify.

<VALUE>

Provide a value for the already provided property. Common property value formats are given below.

  • COLOR or TEXT_COLOR: 'RGBA(<number>,<number>,<number>,<number>)'
  • TEXT: Text format
  • SHAPE: cornered or rounded.

When you execute the above command, the browser gives you a theme ID. Note it down.

Add Theme API

Figure: Add Theme API

"Chat Themes" tab in "Process Settings" now shows the newly added theme.

Added a New Theme

Figure: Added New Theme through API

Default Theme will also be activated with the addition of this customized theme.

Add Property to Theme API

Following is the URL of the API to be called for adding or modifying a property to any screen in your selected Web Chat Theme.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.addOrUpdateWebchatThemeConfigurationProperty&data={sessionId:<SESSION_ID>,themeId:<THEME_ID>,screen:<SCREEN_NAME>,component:<COMPONENT_NAME>,property:<PROPERTY_NAME>,value:<VALUE>}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<THEME_ID>

Provide the ID of the theme that you want to modify.

<SCREEN_NAME>

Provide the name of the theme configuration that you want to modify.

<COMPONENT_NAME>

Provide a name for the component, of which formatting you want to modify.

<PROPERTY_NAME>

Provide a name for the property of the already provided component, of which formatting you want to modify.

<VALUE>

Provide a value for the already provided property. Common property value formats are given below.

  • COLOR or TEXT_COLOR: 'RGBA(<number>,<number>,<number>,<number>)'
  • TEXT: Text format
  • SHAPE: cornered or rounded.

Add Property to a Screen API

Figure: Add Property to Theme API

After executing the API, browse "Chat Theme" tab and check the theme in which you have modified the property. Press "Refresh" to update the changes, if required. Here, in this test case, the color of header of Default Online Registration Form has been changed to "Green".

Modified Header of Registration Form

Figure: Modified Header of Registration Form

Rename Theme API

Following is the URL of the API to be called for renaming a selected theme.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.updateWebchatThemeConfiguration&data={sessionId:<SESSION_ID>,themeId:<THEME_ID>,themeName:<NAME_OF_THEME>,enabled:<BOOLEAN>}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<THEME_ID>

Provide the ID of the theme that you want to modify.

<NAME_OF_THEME>

Provide the Name of the theme that you want to modify such as 'THEME_NAME'. (Add single quote).

<BOOLEAN>

true or false

Apply Theme API

Following is the URL of the API to be called for applying a selected theme on the Web Chat.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/ameyochatjs/test.html?campaignId=<CAMPAIGN_ID>&nodeflowId=<NODEFLOW_ID>&themeId=<THEME_ID>

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<CAMPAIGN_ID>

You have to provide the ID of the campaign, which you can get from the campaign settings.

<NODEFLOW_ID>

Provide the ID of the nodeflow where the selected Chat Theme will be applied. Execute the following commands at the server operating system where Ameyo Server is installed.

psql -U postgres: to enter the PostgreSQL console.
\c ameyodb: to enter the database.
select * from acd_node_to_aq_mapping;: to get the information on nodeflow along with its ID.

<THEME_ID>

Provide the ID of the theme that you want to apply on the selected nodeflow in the selected campaign.

Get Theme Configuration API

Following is the URL of the API to be called for getting Theme Configuration.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.getWebchatThemeConfigurationPropertiesForThemeId&data={<SESSION_ID>,themeId:<THEME_ID>}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<THEME_ID>

Provide the ID of the theme that you want to modify.

Remove Theme Configuration API

Following is the URL of the API to be called for removing a theme configuration.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.removeWebchatThemeConfigurationProperty&data={sessionId:<SESSION_ID>,themePropertyId:<THEME_PROPERTY_ID>}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<THEME_PROPERTY_ID>

Provide the ID of the theme configuration (also called Property ID) that you want to delete. Execute the following commands at the server operating system where Ameyo Server is installed.

psql -U postgres: to enter the PostgreSQL console.
\c ameyodb: to enter the database.
select * from webchat_theme_configuration_properties;: to get the ID of theme configuration.

Remove Theme API

Following is the URL of the API to be called for removing a theme.

You have to replace the values in the following URL, copy it, and browse it in the same Web browser where you are logged on to Ameyo Application.

<protocol>://<IP_OR_DOMAIN_OF_APPSERVER>:<PORT_NUMBER>/dacx/jsonCommand?command=remote.processor.webchatThemeConfigurationService.removeWebchatThemeConfiguration&data={sessionId:<SESSION_ID>,themeId:<THEME_ID>}

Replace the following variables.

Variable

Required Value

<protocol>

HTTP or HTTPS

<IP_OR_DOMAIN_OF_APPSERVER>

IP Address or Domain Name of the Site where Ameyo Application is running.

<PORT_NUMBER>

8888 for HTTP or 8443 for HTTPS

<SESSION_ID>

Session ID of the Voice-Admin's current login session, which you have obtained through the command given above.

<THEME_ID>

Provide the ID of the theme that you want to delete.