Salesforce Google Calendar Integration

Google Calendar provides API to integrate third party clients to retrieve or manage the Calendar data. Most complicated part of the integration is understanding, choosing right pattern and implementing the Authentication.

To integrate Salesforce with Google Calendar to retrieve details without having to require user go through the OAuth authorization, you would have to use Service Account scenario. This scenario requires Salesforce create a JWT token using RSA-256 encryption. Fortunately Salesforce added support for RSA-256 bit encryption in Summer 14 release. So it is possible to connect to Google Calendar API and retrieve the free/body information for users.

One caveat with implementation is that, Google requires to use URL Safe Base64 encoding (similar to what Commons Codec has done). This mode requires to replace + with – and / with _. If you forget to do this, the signature that your code generates will not match what Google creates for verification and it would return “invalid_grant” error message.

Hope this helps.

Go Mom Go!

Today is one of the defining moment for India, which may bring it into group of select few, who can manage interplanetary missions.

India’s first Mars mission, Mars Orbiter Mission (MOM), is scheduled at 2:38 PM IST (1:08 Am PST).

Wish mission control all the luck for successful mission.

I will be awake to root for it. Hope you are too.

Update: Even though lunch is just one step of many before MOM is successful, it has been a perfect launch. Congratulations Launch team.

WSC jar Generation for Salesforce APIs

WSC (Web Service Connector) is a wsdl2java library from Salesforce which makes it easier to interact with Salesforce using various APIs (viz Partner, Apex, Metadata) etc. General workflow is to download the wsc jar, invoke the wsdlc compiler for a given wsdl, which generates the jar file. Then if you are using Maven, then install the generated jar into Maven local repository or your enterprise repository. Doing this for all the wsdls rather tedious and laborious.

I came across this situation and thought about automating the process and the result is force-wsdl2jar. It is maven project which generates the required jars and installs to local Maven repository.

Give it a try and let me know what you think.