keyspace-agent(1) -- stores all the information for the agent application
=============================================

## SYNOPSIS


`Name` Agent
`ReplicaPlacementStrategy` org.apache.cassandra.locator.RackUnawareStrategy
`ReplicationFactor` 1
`EndPointSnitch` org.apache.cassandra.locator.EndPointSnitch

## DESCRIPTION

**Agent** keyspace is where all the information needed for the operation of the Agent
application for working properly is stored.

That includes not only application configuration but also data used by different services,
campaigns, and routing algorithms.

## COLUMN FAMILIES

The following column families are part of this keyspace:

* `Settings`:
	column-family-settings(1) stores the application settings for each user.

* `Timezones`:
	column-family-timezones(1) stores the available timezones in the application
	with its corresponding offsets.

* `Users`:
	column-family-users(1) stores the users allowed to log-in into the system with
	its corresponding basic data.

* `AgentStates`:
	column-family-agentstates(1) stores the available custom states a user can switch
	to, for example: bathroom, smoking, etc.

* `AgentAddresses`:
	Super column-family-agentaddresses(1) stores all the addresses known for a
	user grouped by interaction type.

* `AgentSkills`:
	column-family-agentskills(1) stores the skills for each user.

* `UsersByPeer`:
	column-family-usersbypeer(1) serves as a reverse index, in order to find out which
	user owns a telephone number once a new call is seen.
	
* `Campaigns`:
	column-family-campaigns(1) stores the basic data for all the campaigns existing in 
	the cluster.

* `CampaignAccounts`:
	Super column-family-campaignaccounts(1) stores all the accounts a campaign is 
	receiving interactions from, grouped by a special formed account id.

* `CampaignSchedulers`:
	column-family-campaignschedulers(1) stores daily and hourly schedules when a campaign
	is valid.

* `CampaignMembers`:
	column-family-campaignmembers(1) serves as an index in order to know all users belonging
	to a specific campaign.

* `UserCampaigns`:
	column-family-usercampaigns(1) serves as an index in order to know all campaigns a user
	belongs to.

* `RolePermissions`:
	column-family-rolepermissions(1) stores which actions are allowed for a specific role.

* `InteractionTypes`:
	column-family-interactiontypes(1) stores the existing interaction types with its corresponding
	assignment limits when being delivered to users.

* `UserAttentionStatistics`:
	column-family-agentstates(1) stores statistic information about user attentions.

* `CampaignAttentionTimes`:
	column-family-campaignattentiontimes(1) stores how many attentions took X seconds or more, 
	per campaign/type.

* `EstimatedWaitingTimeStatistics`:
	column-family-agentstates(1) stores the available custom states a user can switch
	to, for example: bathroom, smoking, etc.

* `VCCs`:
	column-family-vccs(1) stores name and data of the existing vccs.

* `VCCCampaigns`:
	column-family-vcccampaigns(1) serves as an index in order to know all the campaigns 
	belonging to a specific vcc.

* `VCCUsers`:
	column-family-vccusers(1) serves as an index in order to know all the users 
	belonging to a specific vcc.
	
	
## KNOWN PLACES TO BE USED

These keyspace is known to be accesed from the following applications and modules

  * `Web Application agent`:
    Located inside the web application directory inside /inconcert/apps/agent,
	this application exposes all the APIs needed for the desktop application.
	Uses Campaign, Permissions, Users and others. Uses lua_cassandra(1)
	
  * `Agent Service`:
    Daemon responsible for assigning interactions to agents, keep track of queued
	and pending requests, statistically prioritize and assign interactions to agents.
	Uses Campaigns, Users, VCCs, UserAttentionStatistics and others.
	Uses lib_cassandra(1) and thrift(1) directly.
	
  * `Interaction Router`:
    Daemon responsible for routing interactions once they arrive to the contact center.
	Uses Campaigns, UsersByPeer, CampaignSchedulers and all CF useful
	to decide what to do when a new interaction arrives.
	Uses lib_cassandra(1) and thrift(1) directly.

	
## SEE ALSO
