An example of integrating Talking Caller ID with a separate database application using DDE
This documentation shows how to achieve this kind of integration using
Commence (www.commence.com) as an example.
Commence is a highly-flexible and easily customized single or multi-user
relational database that can operate in a stand-alone, networked or distributed
environment for work group computing.
The following example from Commence will operate in the following way: When a phone call comes in, Talking Caller ID will display and speak the incoming call information as usual, according to the configuration options that you have selected. In addition, it will pass the number of the incoming call to Commence in the %phone% variable substituted in Talking Caller ID's DDE Execute configuration. On receiving the DDE Execute command, in this example, Commence will add a new item called %phone% to
its Journal category, where %phone% is the actual phone number. (Talking Caller ID passes the data as one long number, stripped of spaces or other characters.)
A Commence Agent (not to be confused with the Microsoft Agent used by Talking Caller ID to enable speech) will be triggered by the addition of the item to the Journal category. The example Agent shown in this documentation looks up the phone number in the Work phone and Home phone fields of the Person record and displays any matching Person records on the screen. It also edits the Journal entry to rename it something more meaningful than the incoming phone number. Finally the Agent connects the Journal entry to the Person records and displays the Journal entry too for the user to make additional notes about the content of the call.
Setting up DDE in Talking Caller ID to pass information to Commence: In Talking Caller ID's Settings turn to the DDE options page and tick Enable DDE Support. The following parameters have been found to work: DDE Application "C:\Program Files\Commence Workgroup\Commence.exe"
DDE Topic Commence|GetData
DDE Execute [AddItem(Journal, %phone%)]
Tick "Start DDE Application Automatically when Talking Caller ID Starts"
Leave all other options blank.
Notes: The DDE Application parameter points to the executable file that Talking Caller ID must start. (It was necessary to remove Commence from the Windows Startup folder, otherwise we would have two instances of the program attempting to run on the same machine!) An optional second parameter, also surrounded by quotation marks, could force the opening of a particular database rather than defaulting to the last one opened.
DDE Topic here actually contains two parameters, separated by the standard 'piping' character (Shift+\ on most keyboards). The first parameter is normally referred to in DDE documentation as the DDE Application. Convention is that it is the name of the application executable without the .EXE extension (e.g. "WINWORD" or "EXCEL"). All DDE-enabled applications also support "System" as an option here. After the piping character comes the DDE Topic variable. Refer to the documentation for your target application to find out what this must be. Commence requires the entry "GetData".
DDE Item is here shown blank. This variable is only used if the target DDE application is going to receive a DDE Poke command rather than, as here, a DDE Execute command. Refer to the Microsoft Excel example for a demonstration of how to use DDE Poke.
DDE Execute contains the parameter details that really do the work in this example with Commence. Commence does not support DDE Poke, but it has three options with DDE Execute: FireTrigger passes a string and some variables which will enable a Commence Agent (not to be confused with the Microsoft Agent used by Talking Caller ID to enable speech) to run on the Receive DDE trigger. e.g. [FireTrigger(TCID, %phone%)] enables a Commence Agent triggered on Receive DDE and expecting to receive the string "TCID" to be able to access the phone number.
Alternatively there's the AddItem option which is used in this example. e.g. [AddItem(Journal, %phone%)] will add a new record to the Commence Journal category named with the contents of the phone number substituted by Talking Caller ID for the string %phone%. Finally, Commence can also receive the EditItem command with a syntax similar to the last example. Setting up DDE in Commence to receive information from Talking Caller ID:
Commence uses Agents (not to be confused with the Microsoft Agent used by Talking Caller ID to enable speech) to enable its automation facilities. An Agent has a name, a trigger, optional conditions and at least one resulting action. Let's take each of these in turn as an example, bearing in mind that much of this will be difficult to follow for those who don't know Commence! The following documentation assumes that the Commence database contains a Person category with a "Work phone" and "Home phone" and
"Relates to Journal field", amongst the others. Also a Journal category with a name, type and other fields as appropriate to your requirements.
Name Caller ID
Trigger Item Saved in Journal.
The Commence trigger is here the Save Item option where an item is added (but not edited) to the Journal category. Click the Options button and make sure that "Fire Agent if item is added/edited via DDE" is checked.
Conditions Item Count is Greater Than 0
In the Edit Condition dialogue make sure that it requires the Item Count for Category Person to be more than 0. Click the Filter button for the category and set up Filter 1 as Work phone Contains (-TrigItemName-);
Filter 2 as Home phone Contains (-TrigItemName-); and so on. On the Summary page for the "Filter for Category: Person" dialogue ensure that the 'Or' condition is checked rather than the 'And' condition.
Action Action A
Edit Item using values from Condition 1. Make sure that the Display item(s) box is checked and click the Field values button to carry out automatic editing of the Person record. e.g. Entering (-TrigItemName-) against the "Relates to Journal field" will automatically link this new Journal entry to the Person.
Edit Item using values from Trigger. Make sure that the Display item(s) box is checked and click the Field values button to carry out automatic editing of the Journal record. e.g. Have the Agent automatically edit
the item name so that it is no longer the phone number passed from Talking Caller ID, but something more meaningful like "Call from (%Relates to%%Person%% First name%) (%Relates to%%Person%%Surname%)". You will want to make other automatic edits, such as ensuring that the
Journal Type field reads "Phone call" for example.
Create additional Commence Agent actions as required, Save the Agent and try it!
Back to FAQ's