View source | Discuss this page | Page history | Printable version   

Modules:Google Apps Integration/Configuration

Back button.png   Back to Modules:Google Apps Integration


Contents

Summary

This document explains the common configuration required for all integrations with Google APIs.

It is divided in two main sections Google API Project which is required in order to make accessible Google API from Openbravo, and Error Handling which is strongly recommended to have a proper tracking of possible errors occurred during the integration.

Google API Project

Openbravo accesses Google through a Google API Project. The first step is to create a Project associated to a Google account. Note this account is not necessarily the one that will be associated to retrieve elements (i.e. calendars) from, but it will be used for API purposes, for example, Google has different quotas for each API accessible from each project.

Create a New Project

In Google APIs Console click on Create...

Create Google API Project.png

Open Services for different Google Apps

In Services tab select the APIs that will be usable from this project. For example, Calendar API.

Google API Add Service.png


Authorize API

In API Access, click on Create an OAuth2 Client ID... and set it up. It is important to select Web Application in Application Type dialog.

Google API OAuth2.png

Define Redirect URIs

In the new Client ID for web applications, click on Edit Settings...====. In the dialog enter the URI(s) that will be accessed your Openbravo instance from, you can have multiple each on a new line, they must be in the following way [yourOpenbravoServer/openbravoContext]/org.openbravo.integration.google.common/OAuth2Callback, for example http://www.yourCompany.com/openbravo/org.openbravo.integration.google.common/OAuth2Callback. No Authorized JavaScript Origins are required.

Google Client Settings.png

Get Client Secrets

Finally download "Client Secrets" by clicking on Download JSON link, this will download a file.

Configure Google API Project in Openbravo

Log in Openbravo as System Administrator and open Google Integration Configuration window, create a new record and in Client Secrets field paste the contents of the file downloaded in the previous step.

Google Client Secrets.png

Error Handling

During the integration with Google APIs may occur errors due to different reasons such as incorrect configuration, unavailability of the service, reached quotas, etc.

The following sections explain how to deal with these errors when they happen.

Integration Log

All integration events are logged in Openbravo within Google Integration Log window.

Google Integration Log.png

The most relevant information available in this window is:

From this window, it is possible to select one or several rows within an status different to Success or Fixed and manually retry execution by executing the Retry Execution action button.


Automated Log Maintenance

In addition to manually retry failed executions it is possible to automatically maintain Integration Log. This is achieved by scheduling Google Integration Log Background Process.

Bulbgraph.png   Google Integration Log Background Process is not scheduled by default. Optimum frequency of this schedule might vary depending on the instance, type of synchronization it has with Google APIs, volume, etc.

This process is in charge of two actions, both of them can be configured as System Administrator from Google Integration Configuration window:


Alert

Synchronization events in Error or Given Up status can be shown as alerts. To visualize it Google Integration Problems alert needs to be configured.

Bulbgraph.png   Google Integration Problems alert is not configured by default, so if it is not set up, no alerts for failed events will be shown.

Instances of this alert link to the Google Integration Configuration window to manually try to fix the synchronization.

Google Syn Alert.png
Back button.png   Back to Modules:Google Apps Integration

Retrieved from "http://wiki.openbravo.com/wiki/Modules:Google_Apps_Integration/Configuration"

This page has been accessed 11,923 times. This page was last modified on 24 September 2013, at 08:03. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.