keyspace-interactions(1) -- it's the archive of all the past interactions
=============================================

## SYNOPSIS


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

## DESCRIPTION

**Interactions** keyspace is where all the information related to past interactions is stord.

Everytime a user clicks `Archive` in the agent application the interactions stops being treated as
a real-time piece of data, and is sent directly to cassandra interactions keyspace column families.

One would assume all data analisys and reporting will always be done against this keyspace and CFs.

## COLUMN FAMILIES

The following column families are part of this keyspace:

* `Interactions`:
	column-family-interactions(1) stores all the interaction data as it existed when it was active.
	That meaning it's the <same> information that existed in redis(1) being sent <as-is> to the
	archive.

* `InteractionsByDate`:
	column-family-interactionsbydate(1) serves as an ordered index, in order to retrieve all the
	interactions ordered by date when the user is not searching for a particular interaction.
	
* `InteractionsByAgentDate`:
	Super column-family-interactionsbyagentdate(1) serves as an ordered index, in order to retrieve
	all the interactions for a particular agent sorted by date of ocurrence.
	
* `InteractionsByCampaignDate`:
	Super column-family-interactionsbycampaigndate(1) serves as an ordered index, in order to retrieve
	all the interactions for a particular campaign sorted by date of ocurrence.

* `InteractionsByContactDate`:
	Super column-family-interactionsbycontactdate(1) serves as an ordered index, in order to retrieve
	all the interactions for a particular contact sorted by date of ocurrence.


## 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 all the column families listed. Uses lua_cassandra(1)
	
  * `Interaction Router`:
    Daemon responsible for routing interactions once they arrive to the contact center.
	Uses all the CF listed, is the service who does the <archiving> itself.
	Uses lib_cassandra(1) and thrift(1) directly.

## SEE ALSO
