live chat,live help,live support Boldchat Web Service
API Reference
 
[ Programmer's Guide | API Reference Home ]


Class CustomerService

The CustomerService class provides access to account data with queries that are functionally similar to those found in Boldchat client grids.

General Method Summary
OperatorsResultgetOperators()
Gets operators belonging to the current account.
OperatorInfogetOperatorByID(Long operatorID)
Looks up an account operator given an ID.
OperatorDiscussionsResultgetOperatorDiscussions(Byte itemType, Long itemID)
Looks up operator discussion messages given and item ID and an item type.
DepartmentsResultgetDepartments()
Gets departments belonging to the current account.
DepartmentInfogetDepartmentByID(Long departmentID)
Looks up a department given an ID.
DepartmentsResultgetOperatorDepartments(Long operatorID)
Gets departments belonging to the operator whose ID is provided.
OperatorsResultgetDepartmentOperators(Long departmentID)
Gets operators belonging to the department whose ID is provided.
OperatorClientsResultgetOperatorClients()
Gets operator clients currently logged in to the server.
FoldersResultgetFolders()
Gets folders associated with the account.
FoldersResultgetChatFolders()
Gets chat folders associated with the account.
FoldersResultgetContactFolders()
Gets contact folders associated with the account.
FoldersResultgetEmailFolders()
Gets email folders associated with the account.
FoldersResultgetTicketFolders()
Gets ticket folders associated with the account.
FoldersResultgetVisitFolders()
Gets visit folders associated with the account.
FolderInfogetFolderByID(Long folderID)
Gets a folder record given its ID.
LoginActivityResultgetLoginActivity(Long serviceTypeID, Calendar fromDate, Calendar toDate)
Gets a summary of login activity.
SetupItemsResultgetSetupItems(Byte folderType)
Gets a collection of setup items with the given folder type.
Chats Method Summary
ChatsResultgetInactiveChats(GetInactiveChatsInfo getChatsInfo)
For a given folder, this method gets chats that are closed.
NetPromoterScoreInfogetNetPromoterScoreInfo(GetInactiveChatsInfo chatsQueryInfo)
Calculates the Net Promoter Score (NPS) for a range of inactive chats.
CustomFieldsResultgetChatCustomFields(Long chatID)
Gets the custom fields of a chat, entered in the pre-chat or post-chat forms.
CustomFieldsResultgetChatOperatorCustomFields(Long chatID)
Gets the custom fields of a chat, entered by the operator as part of the custom wrap-up.
ChatMessagesResultgetChatMessages(GetChatMessagesInfo getChatMessagesInfo)
This method gets all chat messages belonging to a chat.
ChatAssignmentsResultgetChatAssignments(Long chatID)
Looks up the chat assignments of a certain chat.
ChatInfogetChatByID(Long chatID)
Gets a chat given its ID.
Calls Method Summary
CustomFieldsResultgetCallCustomFields(Long callID)
Gets the custom fields of a call.
CallsResultgetInactiveCalls(GetInactiveCallsInfo getCallsInfo)
For a given folder, this method returns a collection of calls that are closed.
CallInfogetCallByID(Long callID)
Gets a call given an ID.
Contacts Method Summary
ContactsResultgetContacts(GetContactsInfo getContactsInfo)
This method gets all contacts in a folder.
ContactInfogetContactByID(Long contactID)
Gets a contact given its ID.
Tickets Method Summary
TicketsResultgetOpenTickets(GetTicketsInfo getTicketsInfo)
For a given folder, this method gets tickets that are not closed.
TicketsResultgetClosedTickets(GetTicketsWithDateRangeInfo getTicketsInfo)
For a given folder, this method gets tickets that are closed.
TicketsResultgetTickets(GetTicketsWithDateRangeInfo getTicketsInfo)
This method gets all tickets in a folder.
TicketInfogetTicketByID(Long ticketID)
Gets a ticket given its ID.
Visits Method Summary
VisitsResultgetInactiveVisits(GetVisitsWithDateRangeInfo getVisitsInfo)
For a given folder, this method gets all visits that are closed.
PageViewsResultgetPageViews(GetPageViewsInfo getPageViewsInfo)
This method gets all page views belonging to a visit.
PageViewsResultgetVisitPageViews(GetVisitPageViewsInfo getPageViewsInfo)
This method gets all page views belonging to a visit.
VisitInfogetVisitByID(Long visitID)
Gets a visit given its ID.
Conversions Method Summary
ConversionsResultgetConversions(GetConversionsWithDateRangeInfo getConversionsInfo)
For a given folder, this method gets all conversions created in the given date range.
Emails Method Summary
EmailThreadsResultgetOpenEmailThreads(GetEmailThreadsInfo getEmailThreadsInfo)
For a given folder, this method gets all email threads that are not closed.
EmailThreadsResultgetClosedEmailThreads(GetEmailThreadsWithDateRangeInfo getEmailThreadsInfo)
For a given folder, this method gets all email threads that are closed.
EmailThreadsResultgetEmailThreads(GetEmailThreadsWithDateRangeInfo getEmailThreadsInfo)
This method gets all email threads in a folder.
EmailAttachmentResultsgetEmailAttachmentEntries(Long emailID)
This method gets a list of email attachment entries belonging to an email.
EmailsResultgetEmails(GetEmailsInfo getEmailsInfo)
This method gets all emails belonging to an email thread.
EmailThreadInfogetEmailThreadByID(Long emailThreadID)
Gets an email thread given its ID.

Method Detail
getOperators

OperatorsResult getOperators()

Gets operators belonging to the current account.
Returns:
An array of OperatorInfo instances.

getOperatorByID

OperatorInfo getOperatorByID(Long operatorID)

Looks up an account operator given an ID.
Parameters:
operatorID - The unique ID of the operator.

Returns:
An instance of OperatorInfo .

getOperatorDiscussions

OperatorDiscussionsResult getOperatorDiscussions(Byte itemType, Long itemID)

Looks up operator discussion messages given and item ID and an item type.
Parameters:
itemID - The ID of the item that owns the operator discussion messages.
itemType - The type of item. It can be one of the following:
  • 2 - Contacts
  • 3 - Tickets
  • 5 - Chats
  • 4 - Email Threads
  • 7 - Reports
  • 57 - Active Assists
  • 73 - SMS
  • 82 - Twitter


getDepartments

DepartmentsResult getDepartments()

Gets departments belonging to the current account.
Returns:
An array of DepartmentInfo instances.

getDepartmentByID

DepartmentInfo getDepartmentByID(Long departmentID)

Looks up a department given an ID.
Parameters:
departmentID - The unique ID of the department.

Returns:
An instance of DepartmentInfo .

getOperatorDepartments

DepartmentsResult getOperatorDepartments(Long operatorID)

Gets departments belonging to the operator whose ID is provided.
Returns:
An array of DepartmentInfo instances.

getDepartmentOperators

OperatorsResult getDepartmentOperators(Long departmentID)

Gets operators belonging to the department whose ID is provided.
Returns:
An array of OperatorInfo instances.

getOperatorClients

OperatorClientsResult getOperatorClients()

Gets operator clients currently logged in to the server.
Returns:
An array of OperatorClientInfo instances.

getFolders

FoldersResult getFolders()

Gets folders associated with the account.
Returns:
An array of FolderInfo records.

getChatFolders

FoldersResult getChatFolders()

Gets chat folders associated with the account.
Returns:
An array of FolderInfo records.

getContactFolders

FoldersResult getContactFolders()

Gets contact folders associated with the account.
Returns:
An array of FolderInfo records.

getEmailFolders

FoldersResult getEmailFolders()

Gets email folders associated with the account.
Returns:
An array of FolderInfo records.

getTicketFolders

FoldersResult getTicketFolders()

Gets ticket folders associated with the account.
Returns:
An array of FolderInfo records.

getVisitFolders

FoldersResult getVisitFolders()

Gets visit folders associated with the account.
Returns:
An array of FolderInfo records.

getInactiveChats

ChatsResult getInactiveChats(GetInactiveChatsInfo getChatsInfo)

For a given folder, this method gets chats that are closed. Account folders can be obtained by invoking getFolders .
Parameters:
getChatsInfo - An instance of GetInactiveChatsInfo containing a folder ID, and optionally start and end dates.

Returns:
An instance of ChatsResult containing an array of chat records.

getNetPromoterScoreInfo

NetPromoterScoreInfo getNetPromoterScoreInfo(GetInactiveChatsInfo chatsQueryInfo)

Calculates the Net Promoter Score (NPS) for a range of inactive chats.
Parameters:
chatsQueryInfo - An instance of GetInactiveChatsInfo containing a folder ID, and optionally start and end dates.

Returns:
An instance of NetPromoterScoreInfo containing the NPS and answer category counts.

getChatCustomFields

CustomFieldsResult getChatCustomFields(Long chatID)

Gets the custom fields of a chat, entered in the pre-chat or post-chat forms.
Parameters:
chatID - A valid chat ID.

getChatOperatorCustomFields

CustomFieldsResult getChatOperatorCustomFields(Long chatID)

Gets the custom fields of a chat, entered by the operator as part of the custom wrap-up.
Parameters:
chatID - A valid chat ID.

getCallCustomFields

CustomFieldsResult getCallCustomFields(Long callID)

Gets the custom fields of a call.
Parameters:
callID - A valid call ID.

getInactiveCalls

CallsResult getInactiveCalls(GetInactiveCallsInfo getCallsInfo)

For a given folder, this method returns a collection of calls that are closed. Account folders can be obtained by invoking getFolders .
Parameters:
getCallsInfo - An object with query parameters.

getContacts

ContactsResult getContacts(GetContactsInfo getContactsInfo)

This method gets all contacts in a folder. Account folders can be obtained by invoking getFolders .
Parameters:
getContactsInfo - An instance of GetContactsInfo containing a folder ID.

Returns:
An instance of ContactsResult containing an array of contact records.

getOpenTickets

TicketsResult getOpenTickets(GetTicketsInfo getTicketsInfo)

For a given folder, this method gets tickets that are not closed. Account folders can be obtained by invoking getFolders .
Parameters:
getTicketsInfo - An instance of GetTicketsInfo containing a folder ID.

Returns:
An instance of TicketsResult containing an array of ticket records.

getClosedTickets

TicketsResult getClosedTickets(GetTicketsWithDateRangeInfo getTicketsInfo)

For a given folder, this method gets tickets that are closed. Account folders can be obtained by invoking getFolders .
Parameters:
getTicketsInfo - An instance of GetTicketsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of TicketsResult containing an array of ticket records.

getTickets

TicketsResult getTickets(GetTicketsWithDateRangeInfo getTicketsInfo)

This method gets all tickets in a folder. Account folders can be obtained by invoking getFolders .
Parameters:
getTicketsInfo - An instance of GetTicketsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of TicketsResult containing an array of ticket records.

getInactiveVisits

VisitsResult getInactiveVisits(GetVisitsWithDateRangeInfo getVisitsInfo)

For a given folder, this method gets all visits that are closed. Account folders can be obtained by invoking getFolders .

Note: This method returns visits in descending order by Closed date.
Parameters:

getVisitsInfo - An instance of GetVisitsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of VisitsResult containing an array of visit records.

getConversions

ConversionsResult getConversions(GetConversionsWithDateRangeInfo getConversionsInfo)

For a given folder, this method gets all conversions created in the given date range. Account folders can be obtained by invoking getFolders .
Parameters:
getConversionsInfo - An instance of GetConversionsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of ConversionsResult containing an array of conversion records.

getOpenEmailThreads

EmailThreadsResult getOpenEmailThreads(GetEmailThreadsInfo getEmailThreadsInfo)

For a given folder, this method gets all email threads that are not closed. Account folders can be obtained by invoking getFolders .
Parameters:
getEmailThreadsInfo - An instance of GetEmailThreadsInfo containing a folder ID.

Returns:
An instance of EmailThreadsResult containing an array of email thread records.

getClosedEmailThreads

EmailThreadsResult getClosedEmailThreads(GetEmailThreadsWithDateRangeInfo getEmailThreadsInfo)

For a given folder, this method gets all email threads that are closed. Account folders can be obtained by invoking getFolders .
Parameters:
getEmailThreadsInfo - An instance of GetEmailThreadsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of EmailThreadsResult containing an array of email thread records.

getEmailThreads

EmailThreadsResult getEmailThreads(GetEmailThreadsWithDateRangeInfo getEmailThreadsInfo)

This method gets all email threads in a folder. Account folders can be obtained by invoking getFolders .
Parameters:
getEmailThreadsInfo - An instance of GetEmailThreadsWithDateRangeInfo containing a folder ID and optionally start and end dates.

Returns:
An instance of EmailThreadsResult containing an array of email thread records.

getChatMessages

ChatMessagesResult getChatMessages(GetChatMessagesInfo getChatMessagesInfo)

This method gets all chat messages belonging to a chat.
Parameters:
getChatMessagesInfo - An instance of GetChatMessageInfo containing a chat identifier.

Returns:
A ChatMessagesResult instance containing an array of chat message records.

getChatAssignments

ChatAssignmentsResult getChatAssignments(Long chatID)

Looks up the chat assignments of a certain chat.
Parameters:
chatID - The ID of the chat.

getEmailAttachmentEntries

EmailAttachmentResults getEmailAttachmentEntries(Long emailID)

This method gets a list of email attachment entries belonging to an email.
Parameters:
emailID - The email ID.

getEmails

EmailsResult getEmails(GetEmailsInfo getEmailsInfo)

This method gets all emails belonging to an email thread.
Parameters:
getEmailsInfo - An instance of GetEmailsInfo containing an email thread identifier.

Returns:
A EmailsResult instance containing an array of email records.

getPageViews

PageViewsResult getPageViews(GetPageViewsInfo getPageViewsInfo)

This method gets all page views belonging to a visit.
Parameters:
getPageViewsInfo - An instance of GetPageViewsInfo containing a visit identifier.

Returns:
A PageViewsResult instance containing an array of page view records.

getVisitPageViews

PageViewsResult getVisitPageViews(GetVisitPageViewsInfo getPageViewsInfo)

This method gets all page views belonging to a visit.
Parameters:
getPageViewsInfo - An instance of GetPageViewsInfo containing a visit identifier.

Returns:
A PageViewsResult instance containing an array of page view records.

getChatByID

ChatInfo getChatByID(Long chatID)

Gets a chat given its ID.
Parameters:
chatID - A valid chat ID.

getCallByID

CallInfo getCallByID(Long callID)

Gets a call given an ID.
Parameters:
callID - The unique ID identifying the call.

getContactByID

ContactInfo getContactByID(Long contactID)

Gets a contact given its ID.
Parameters:
contactID - A valid contact ID.

getTicketByID

TicketInfo getTicketByID(Long ticketID)

Gets a ticket given its ID.
Parameters:
ticketID - A valid ticket ID.

getEmailThreadByID

EmailThreadInfo getEmailThreadByID(Long emailThreadID)

Gets an email thread given its ID.
Parameters:
emailThreadID - A valid email thread ID.

getVisitByID

VisitInfo getVisitByID(Long visitID)

Gets a visit given its ID.
Parameters:
visitID - A valid visit ID.

getFolderByID

FolderInfo getFolderByID(Long folderID)

Gets a folder record given its ID.

getLoginActivity

LoginActivityResult getLoginActivity(Long serviceTypeID, Calendar fromDate, Calendar toDate)

Gets a summary of login activity. Each entry represents an action such as logging in or changing the operator status to Away or Available.
Parameters:
serviceTypeID - The service type ID (1 = Chats, 7 = Calls).
fromDate - The lower bound of the creation range. This may be null.
toDate - The upper bound of the creation range. This may be null.

getSetupItems

SetupItemsResult getSetupItems(Byte folderType)

Gets a collection of setup items with the given folder type.
Parameters:
folderType - The folder type, which may be:
  • 8 - Chat Canned Messages
  • 9 - Email Canned Messages
  • 11 - Contact User Categories
  • 12 - Chat Button Defs
  • 13 - Chat Invitation Defs
  • 14 - Chat Window Defs
  • 16 - Email Accounts
  • 18 - Contact User Statuses
  • 19 - Website Defs
  • 20 - Chat User Categories
  • 21 - Chat User Statuses
  • 22 - Email User Categories
  • 23 - Email User Statuses
  • 24 - Ticket User Categories
  • 25 - Ticket User Statuses
  • 29 - Chat Invitations
  • 30 - Contact Custom Fields 1
  • 31 - Contact Custom Fields 2
  • 32 - Chat Custom Fields 1
  • 33 - Chat Custom Fields 2
  • 34 - Email Custom Fields 1
  • 35 - Email Custom Fields 2
  • 36 - Ticket Custom Fields 1
  • 37 - Ticket Custom Fields 2
  • 42 - Call User Categories
  • 43 - Call User Statuses
  • 44 - Call Custom Fields 1
  • 45 - Call Custom Fields 2
  • 48 - Call Button Defs
  • 49 - Call Window Defs
  • 55 - Salesforce Connectors
  • 65 - Knowledge Bases