dominoGuru.com

Your Development & Design Resource

DIY Skype Integration

DIY Skype IntegrationIt's amazing the products that are coming to the marketplace for Skype lately. From D-Link's USB rig to the Sony mouse-phone. And while product adoption is rampant in the development community, I honestly haven't seen it's adoption in the Lotus Notes Development Communities. Clearframe is integrating Skype-functionality into their Lotus Notes client-based CRM solution, and after talking with Derik, I thought I'd share with the gang just how it's done and how easy it can be incorporated into your current Lotus Notes-based applications.

(Domino-based applications, mind you... it's even easier to do, and something we'll address later in the week. For right now, we're sticking with a Lotus Notes client-based integration!)

First, some quick references/links!

From the above tutorial, you can find the basic scheme of the Skype URL syntax:

Skype:echo123?call
- or -
protocol:username?action

With the syntax of the URL now clearly defined, we'll proceed with it's integration into the Lotus Notes client... by talking about a particular feature requirement that a lot of applications have, but a method that not a lot of application developers utilize.

Say your application needs the ability to create a new memo, preset the To field as well as the Subject field. Now, with this requirement, a typical Lotus Notes developer would create an Agent or Action with the following LotusScript:

Sub SendToMe ( fromStr As String, subjectStr As String )

   Dim ws As New NotesUIWorkspace
   Dim maildb As notesdatabase
   Dim profile As NotesDocument
   Dim mailnote As NotesDocument

   Set maildb = New NotesDatabase("","")
   maildb.OpenMail

   Set profile = maildb.GetProfileDocument ( "CalendarProfile" )

   Set mailnote = New NotesDocument(maildb)
   mailnote.Form = "Memo"
   mailnote.Logo = profile.DefaultLogo(0)
   mailnote.Principal = profile.Owner(0)
   mailnote.SendTo = ( fromStr )
   mailnote.Subject = ( subjectStr )

Call ws.EditDocument ( True, mailnote )

End Sub

I've even stayed away from what I've seen a lot of developers do, which is to try and check the location document to see what database they're supposed to generate the new Memo in... you get th e idea. All of this work, when something as simple as the following URL could accomplish the same feat:

mailto:ctoohey@dominoguru.com? subject=Test

Blindingly simple. Since the Lotus Notes client is our current mail client (I'm, of course, taking this as a given), we're simply telling it to create an email and pre-populate some values - in this example, the To and Subject fields.

To do this, that is - call this function - we would typically use the following @Function:

@URLOpen("mailto:ctoohey@dominoguru.com?subject=Test")

The Lotus Notes client let's the system interpret this URL. The system, of course (as previously discussed) tells the current default mail client (which handles the mailto: protocol) to do what it does. The result is a perfectly working solution, with one line of code!

It's using this technique that we've integrated Skype functionality with a Lotus Notes client-based application: we simply use the @URLopen() @Function to tell the system to do what it does with Skype:-protocol URLs. And now that we have that working, we've got to build the Skype:-protocol URL! To do that, let's take a look at the URL again, only this time, I've emphasized our target areas:

protocol:username?action

In each Contact document in the Revolution CRM product, there is a field called IMAddress_Skype. username, will thus pull it's value from this field on a given document.

action, however, can depend on the button you press in your application. Revolution CRM has a button per each action (although you'd have to see the UI to fully appreciate it). Our action value, for this example however, we'll stick with ?call

@URLOpen("Skype:" + IMAddress_Skype + "?call")

Simple isn't it? Simple, yet when combined with all of the other actions, extremely effective.

Now, for those of you who do not have Revolution CRM, I though that I would give you something that you can use in your Personal Address Books - two Smart Icons that do the same!

The first button, we'll use as our faux-IMAddress_Skype content manager, while the second does all of the work! Simply copy the code below (make changes as you see fit), and create your SmartIcons accordingly!

Skype Manager
FIELD IMAddress_Skype := @Prompt([OkCancelEdit];"Skype Manager";"Skype ID:";IMAddress_Skype)

Skype Call Function
@URLOpen("Skype:" + IMAddress_Skype + "?call")

Skype - Testing DIY Skype 
Integration with echo123


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.