Setting Up the ICC Application

This section will walk you through how to import the application and make final configurations for Twilio and Dialogflow.

Please note that the steps in Setting up Twilio is a prerequisite for the application import. Also, now is a good time to check that Agent Conference is set in the parent account to avoid unexpected behavior:

  • Navigate to Programmable Voice -> Conferences -> Settings and select 'Agent Conference'

Importing the Application

If you haven't already, please download the ICC Application zip from the software downloads page.

Properties File Modification

Prior to importing the application, make the following changes to the import customization file:

  1. ICC_VAL_IS_CLOUD_SITE: Uncomment and set to true or false depending on whether the app is being imported on a cloud site. Please note that sentiment analysis will not work for on-premise installations.
  2. ICC_VAL_AI_FEATURE_TOGGLE: Uncomment and set to true or false depending on whether you want to use Dialogflow.
  3. ICC_VAL_CURRENT_ENVIRONMENT_URL: Uncomment and update the value to the site you are importing the app into. Must be in the format of subdomain.appiancloud.com.
  4. ICC_VAL_TWIL_SUBACCOUNT_NAME: Uncomment and update the value to something that will identify this environment in the Twilio console.
  5. ICC_VAL_ISO3166_COUNTRY_TO_FIND_PHONE_NUMBER: Uncomment and set the value to the 2 character country code in which you want to purchase a phone number. Please refer to Twilio's list of supported countries.

If you have an already existing Twilio subaccount that you would like the imported app to use, further modifications to parameters in the properties file can be made.

App Import

After making the appropriate modifications to the properties file, go through the following steps to properly import the app and ensure usability.

  1. Run ICC_Schema_Creation.sql in your Appian environment’s data store*
  2. Import the application using the import customization file
  3. Publish all data stores
  4. (Sample App Only) Run ICC_Sample_Data.sql to populate sample data*

*Please note that this SQL file included in the package is optimized for MySQL. Modifications may need to be made for SQL Server and Oracle.

Creating the Service Account User

An Appian service account user must be created to authenticate requests to Appian. This user will be the means by which Twilio and Dialogflow call Appian web APIs, and is not meant to be used as an agent. Follow the steps below to properly set up the service account user.

  1. Create a basic user to act as a service account. This service account user should have a username and password that is alphanumeric. It is important that no special characters are used in the username or password.
  2. Add this user to the ICC All Users group
  3. Remove the user from the Tempo Users group (may need to modify membership rules)
  4. Log in as this user at least once to change the temporary password
  5. If your ICC site has agent assist enabled, perform the following additional steps:
  6. Return to the Google project created when configuring Dialogflow and add the Google account used by your service account as a member of the project with the Dialogflow API Admin role.
  7. Give the service account designer access by adding them to the Designers system group
  8. As the service account user, open the ICC_AI DialogFlow API Credentials connected system and authorize access to Google Dialogflow using the same Google account.
  9. Return to the Dialogflow console, open the agent created earlier, and select Fullfillment
  10. Set the URL to the endpoint of the ICC_WS_AI_GCC_Fulfillment web API: https://<your Appian ICC site>/suite/webapi/fulfillment
  11. Set the Basic Auth username and password using the credentials of the Appian service account
  12. Remove the service account from the Designers system group

Initialize Twilio Configuration Action

The Initialize Twilio Configuration action in the ICC application is an easy way to set up all of the necessary objects and connections with Twilio to get up and running quickly. This should be done if you want to set up a Twilio subaccount from scratch.

If you would like to change the default names of any of these objects that will be created through the setup, you can modify the constants referred to in this document.

Running the Configuration

Once the service account user is properly set up, the configuration is ready to be run. This section will walk you through each step of the configuration process and the Twilio objects that are created or configured at each step.

Specify Twilio Account

The first step of the configuration is to specify the parent-level Twilio account that will be used for the rest of the setup process.

You can find the Account SID and Auth Token on the main page of your Twilio account. When clicking Next Appian will create the following in Twilio:

/ICC specify twilio account

Update Connected Systems

Appian will now display the credentials of the objects created to the user. This is the only time you will be able to copy these credentials. For security reasons, the setup process does NOT persist these values as constants or in the process model. It is highly recommended that you store these credentials outside of Appian in a secure manner. If you navigate away from this page prior to storing these credentials, you can navigate to your Twilio subaccount to retrieve them.

In addition to storing these credentials outside of Appian, you must also copy these values into the appropriate connected systems at this step to properly establish the connection to this newly created subaccount. On a separate tab, open Appian Designer. Navigate to the ICC Twilio Subaccount Credentials connected system and copy the username and password for the newly created subaccount into the credentials.

/ICC subaccount connected system

Repeat this process for the REST API credentials in the ICC Twilio REST API Credentials connected system.

/ICC API connected system

Once these values have been correctly entered into the connected systems, navigate back to the setup and proceed to the next page. If the connected systems are not properly set up, an error will display, as the rest of the setup process depends on the connected systems being configured properly. If this occurs, please retrieve these credentials from the Twilio console and enter them into the connected systems before proceeding.

Specify Service Account Credentials

In this step, you must enter the credentials from the service account user that was created earlier. This will provide Twilio with the credentials to talk to this instance of Appian.

/ICC service account credentials

Once the credential are properly entered and the user clicks Create Twilio Objects, the following Twilio objects are created. As mentioned previously, you can modify the constants referred to below to change the default name of any of the objects that are created.

  • TwiML App for voice and messaging (constant name referenced: ICC_VAL_TWIL_TWIML_APPLICATION_NAME)
  • Workspace (constant name referenced: ICC_VAL_TWIL_WORKSPACE_NAME)
  • Task Queue #1 (constant name referenced: ICC_VAL_TWIL_TASKQUEUE_NAME_ONE)
  • Task Queue #2 (constant name referenced: ICC_VAL_TWIL_TASKQUEUE_NAME_TWO)
  • Workflow (constant name referenced: ICC_VAL_TWIL_WORKFLOW_NAME)
  • Chat Service (constant name referenced: ICC_VAL_TWIL_CHAT_SERVICE_NAME)
  • Phone Number Purchase (will always purchase the next phone number available in the country specified)
Add Workers

Following creation of these objects, you can now create workers in Twilio, which need to be associated with Appian users. These workers can also now be assigned queues in which to receive calls and chats.

When clicking Next, the following occurs with the users specified on this screen:

  • Added to associated Appian groups for security purposes
  • Created as workers in Twilio (except for Managers)
  • Added to the associated queues in Twilio (except for Managers)

Only Agents are created as Twilio workers since they require integration with Twilio for telephony capabilities. Any users added as Managers are not created as workers in Twilio, but rather just placed in the managers group in Appian for permissions to view the Manager Dashboard.

Following completion of this step, the Appian users which are associated with Twilio workers can be found in the ICC_WORKER table.

Review

This screen will allow you to review all of the Twilio objects and IDs that were created (without exposing any sensitive information). If any part of the configuration process failed, you will receive an error on this page. If any errors are displayed, please ensure that your Twilio account is properly set up. You can also find this information in the "Twilio Identifiers" report.

If you would like to test your configuration to make sure it is set up properly, follow the steps below.

  1. Log in as a user that was added to the queues
  2. Open the Twilio Tester report
  3. Set the Twilio component to Calls or SMS
  4. Call/text the number displayed on the screen

If the Twilio component dynamically updates, you are properly configured! If this test was not successful, please see below for some possible troubleshooting steps.

  • If the Twilio component is not visible, make sure your user was added as a worker. Run the Update Twilio Workers action to add more workers.
  • If the Twilio component still does not load, make sure the subaccount and API key credentials are properly stored in the connected systems.
  • If the call was not routed to your user, log into Twilio to make sure the call was routed to a queue in which your worker is available and that the call was not picked up by another worker.
  • If the Twilio component does not update, make sure your browser is set up to allow access to the microphone.
FEEDBACK