You need to sign in to do that
Don't have an account?

CTI Toolkit call related searches
I have successfully got my CTI adapter running and talking to our CTI system and everything is working well. The one thing I am having difficulty with however is searching based on attached call data.
What I want to be able to do is specify which field I wish to be matching on within Salesforce and then match the data I specify (which we obtain in out CTI system when we receive an incoming call).
I can't figure out how I need to specify the search data in the mapAttachedData that is passed into the CCTIUserInterface::OnCallRinging function.
I have been reading the developers guide on page 47, Displaying Call-Related Records, but this doesn't really show how exactly to do it in code. The Demo code only searches based on ANI (which does work fine in my app).
Can someone please show me a code example of how you set up the key value pairs please?
Also what is the easiest way to find out what the object and field names are? Are they the same as you see if you look at App Setup, Customize, (object), Fields in the web interface?
Thanks.
Simon
What I want to be able to do is specify which field I wish to be matching on within Salesforce and then match the data I specify (which we obtain in out CTI system when we receive an incoming call).
I can't figure out how I need to specify the search data in the mapAttachedData that is passed into the CCTIUserInterface::OnCallRinging function.
I have been reading the developers guide on page 47, Displaying Call-Related Records, but this doesn't really show how exactly to do it in code. The Demo code only searches based on ANI (which does work fine in my app).
Can someone please show me a code example of how you set up the key value pairs please?
Also what is the easiest way to find out what the object and field names are? Are they the same as you see if you look at App Setup, Customize, (object), Fields in the web interface?
Thanks.
Simon
If you want to specify data to search on, make a key-value pair in your mapAttachedData parameter where the key is a Salesforce object name, a period, and a Salesforce field name, and the value is the value you want to search. For example:
Key: "Account.AccountNumber"
Value: "12345"
Provided you actually have an account with that AccountNumber, and Account is in your Inbound softphone layout (this one is a common source of errors), the Account will pop instead of whatever came of the ANI. If that search returns no results, it automatically falls back on the ANI search.
The easiest way to find out the object and field names is to use Force.com Explorer: http://wiki.apexdevnet.com/index.php/Apex_Explorer
I think I now need to work out the soft phone layout to include the fields I need. Hopefully I can figure that out from the demo code.
Thanks for directing me to the Apex Explorer too. That is VERY handy!
Thanks!
Simon
Oops, I do actually have a valid description value in my code. I pasted the wrong bit of the log file above.
Message Edited by SimonZeacom on 04-02-2008 06:57 PM
Thanks for the tip. I don't actually want to search on Description. I just chose that at random as a field to test my screen popping with.
Simon
The one problem I still have though is it is displaying it all twice! So I make an inbound call and I see:
Once I get that one worked out I think I am there.
Simon
mapAttachedData[L"Case.CaseNumber"] = L"00001026";
mapAttachedData[L"Account.AccountNumber"] = L"CD355119-A";
I don't think it is specific to my searches anyway since it was doing it for CallerID when I wasn't doing the custom searches as well.
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::OnEventFiringObjectInvoke. Event: OnCallInfoChange
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call Reference >13577<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Phone Status >Ring<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call State >0x2<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::LogCallState: Call State: LINECALLSTATE_OFFERING
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. CLI >89634<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call type >Direct<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. CalledID >49104<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. CallerID >(null)<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Queue >(null)<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Pilot >(null)<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Query >(null)<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. DNIS >(null)<
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Switching on call state: 0x2
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Calling is offering
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::PopOrNot.
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::PopOrNot. Direct call. Pop on direct calls is true. Popping!
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::GetCallInfo. Calling OnCallRinging.....
04/04/2008 08:44:04 a.m.: CZeacomSfAdapterUI::OnCallRinging
04/04/2008 08:44:04 a.m.: CCTIUserInterface::OnCallRinging: Call ID 13577, line 1.
04/04/2008 08:44:04 a.m.: CCTIUserInterface::CreateParty: Party already exists. Using existing party.
04/04/2008 08:44:04 a.m.: CCTIUserInterface::OnCallRinging: Performing search.
04/04/2008 08:44:04 a.m.: Generated query Select Type,AccountNumber,Name,Id From ACCOUNT Where AccountNumber='CD355119-A'.
04/04/2008 08:44:04 a.m.: Generated query Select CaseNumber,Status,Priority,Id From CASE Where CaseNumber='00001026'.
04/04/2008 08:44:04 a.m.: Generated query FIND {89634} IN PHONE FIELDS RETURNING ACCOUNT(Type,AccountNumber,Name,Id),CASE(CaseNumber,Status,Priority,Id),CONTACT(Title,Name,Id),LEAD(Company,Title,LeadSource,Name,Id).
04/04/2008 08:44:04 a.m.: CCTIUserInterface::OnAgentStateChange: BUSY.
04/04/2008 08:44:05 a.m.: CCTIAppExchange::PopulateQueryResults: ANI query found 1 results.
04/04/2008 08:44:06 a.m.: CCTIAppExchange::PopulateQueryResults: ANI query found 1 results.
04/04/2008 08:44:06 a.m.: CCTIAppExchangeSearchThread::ThreadSearch: Asynchronous search complete.
04/04/2008 08:44:06 a.m.: CCTIAppExchangeSearchThread::ThreadSearch: Asynchronous search started.
04/04/2008 08:44:06 a.m.: CCTIUserInterface::GetLineByCallId: Call ID 13577 is on line 1.
04/04/2008 08:44:06 a.m.: CCTICallLog::AddRelatedObjects: There are more related objects than can be associated with this call log. Leaving call log blank.
04/04/2008 08:44:06 a.m.: CCTIAppExchange::PopulateQueryResults: ANI query found 1 results.
04/04/2008 08:44:06 a.m.: CCTIAppExchange::PopulateQueryResults: ANI query found 1 results.
04/04/2008 08:44:06 a.m.: CCTIAppExchangeSearchThread::ThreadSearch: Asynchronous search complete.
04/04/2008 08:44:06 a.m.: CCTIUserInterface::GetLineByCallId: Call ID 13577 is on line 1.
04/04/2008 08:44:06 a.m.: CCTICallLog::AddRelatedObjects: There are more related objects than can be associated with this call log. Leaving call log blank.
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::UIHandleMessage(). Message: ANSWER
04/04/2008 08:44:09 a.m.: CCTIUserInterface::UIHandleMessage: Message received: ANSWER.
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::CallAnswer
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::CallAnswer: Answer succeeded!
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::OnEventFiringObjectInvoke. Event: OnPhoneStatusChange
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call Reference >13577<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Phone Status >OffHook<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call State >0x100<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::LogCallState: Call State: LINECALLSTATE_CONNECTED
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. CLI >89634<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Call type >Direct<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. CalledID >49104<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. CallerID >(null)<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Queue >(null)<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Pilot >(null)<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Query >(null)<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. DNIS >(null)<
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::GetCallInfo. Switching on call state: 0x100
04/04/2008 08:44:09 a.m.: CZeacomSfAdapterUI::OnCallEstablished
04/04/2008 08:44:09 a.m.: CCTIUserInterface::OnCallEstablished: Call ID 13577.
04/04/2008 08:44:09 a.m.: CCTIUserInterface::GetLineByCallId: Call ID 13577 is on line 1.
Simon
Did you ever figure this out? I still think the search thread is somehow returning its information twice, although I can't imagine what might cause that.
Simon
Simon
Simon