Sending Additional Data Types (Tickets, Transactions, etc)

The first thing you need to do when setting up Akita is send us data about your Accounts and Contacts. It is easy to do with the Javascript SDK, Segment.com or using our REST API.

In addition to attributes of Accounts and Contact (names, emails, etc) and their behavior (page views and actions), you may also want to send what we call "Interactions". These can be:

  • Items that belong to Accounts and Contacts (ex. support tickets, invoices, subscription data); or
  • Records of communication between your business and your Accounts and Contacts (chats, email threads).

NOTE: With our Connect Plan, Akita will sync this data from your 3rd-party integrations automatically!

You can send your own Interactions to Akita if you store data internally and want to make it available to your Customer Success team using Akita. These Interactions will be available in Akita under the History tab for each Account and Contact.

NOTE: When you submit an interaction, you will receive a 202 Accepted response indicating your data has been queued for insertion. The response will be accompanied with an interaction. This represents the interaction before your update has been applied. If new, a placeholder interaction will be returned. before it is processed. If the interaction already exists, it will not show new changes.

The following request will add a ticket interaction:

curl --request POST \
     --header 'Authorization: Bearer YOUR-API-KEY' \
     --header 'Content-Type: application/json' \
     --data '{
    		"interaction_type_id": 3,
   	 	"provider_interaction_id": "ticket-234",
        	"submitted_by_email": "john.doe@breslersicecream.example.com",
    		"attributes": {
        		"subject": "Unable to login to my account",
       	 		"number": "234"
    		}
     }' \
    'https://api.akitaapp.com/v1/interactions'

NOTE: Be sure you substitute a valid API Key for the YOUR-API-KEY placeholder.

In the call above:

  • interaction_type_id specifies the type of Interaction you are creating and must be one of the values from the list below.
  • provider_interaction_id is an identifier that must be unique across all Interactions of a specific type (ie. no other ticket can use this ID).
  • submitted_by_email lets you associate an email with an Akita contact with a specific email address. You can also associate the Interaction with an Account or a Person by explicit Id (see below).
  • attributes can be numeric or text. There are some defined attributes with special meanings (see table below) but you can also add your own.

The following request submits the same Ticket (Interaction Type 3) but associates it with an existing Contact (Interaction Type 2) using an internal contact id ("user-123"):

curl --request POST \
     --header 'Authorization: Bearer YOUR-API-KEY' \
     --header 'Content-Type: application/json' \
     --data '{
    		"interaction_type_id": 3,
   	 	"provider_interaction_id": "ticket-234",
        	"parent_provider_interaction_id": "user-123",
		"parent_interaction_type_id": 2,
    		"attributes": {
        		"name": "Unable to login to my account",
       	 		"number": "234"
    		}
     }' \
    'https://api.akitaapp.com/v1/interactions'

In the call above:

  • parent_provider_interaction_id specifies the unique Id of the Interaction you would like this Interaction to be associated with. If you wish to associate it with an Account, provide your unique identifier for the desired account.
  • parent_interaction_type_id specifies the type of Interaction you wish to associate this Interaction with. It should correspond to the id provided with parent_provider_interaction_id.

The following request submits a Transaction (Interaction Type 24) and associates it with an existing Account (Interaction Type 1) using an internal account id ("account-abc123"):

curl --request POST \
     --header 'Authorization: Bearer YOUR-API-KEY' \
     --header 'Content-Type: application/json' \
     --data '{
    		"interaction_type_id": 24,
   	 	"provider_interaction_id": "txn-234",
        	"parent_provider_interaction_id": "account-abc123",
		"parent_interaction_type_id": 1,
    		"attributes": {
        		"subject": "Jan 2021 Subscription",
       	 		"amount": 135999,
			"currency": "USD"
    		}
     }' \
    'https://api.akitaapp.com/v1/interactions'

Interaction Types

The following table describes the Interactions you can create in Akita, the Id of each type to be used in API calls, and pre-defined Attributes of each. Unless indicated, you can provide any value you wish for the attributes and they are all optional. The more pre-defined attributes you provide, the richer the display in Akita. 

Id Type Description Pre-defined Attributes
1 Organization A group of individuals. Not Applicable. Use /v1/accounts
2 Person An individual belonging to an Organization. Not Applicable. Use /v1/contacts
3 Ticket A support request.
  • subject - Short description of the issue.
  • description - Longer description.
  • number - A more descriptive number (not necessarily unique)
  • priority - Importance of the ticket (format is up to you)
  • rating - Rating provided by end-user (typically after ticket is closed)
  • source - Where the ticket was created (web, phone, etc)
  • status - Current state of ticket (open, closed, won't fix, etc)
  • type - Classification of the ticket (bug, billing issue, etc)
  • closed_at - (ISO Date-time) - Date the ticket was resolved (YYYY-MM-DD H:I:S)
24 Transaction A financial transaction (typically a payment).
  • subject - Short description of the transaction.
  • description - Longer description.
  • amount - (Integer) -  The total amount of the transaction in cents or equivalent. Do not include decimal points or commas.
  • currency - 3 digit ISO currency code (ex. USD, GBP, EUR)
25 NPS Survey A Net Promotor Score survey response
  • subject - The subject line of an email sent (if applicable).
  • comment - Comments provided with the score.
  • score - (Integer) - The score provided with the survey on a scale of 0-10.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us