Try WSO2 Cloud for Free
Sign in

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to WSO2 Cloud and sign up if you haven't done so already. The UI guides you through the signup process.
  2. Sign in to WSO2 Cloud and go to the Integration Cloud tab. Then, click ESB Compsite Application.
    Image Modified
  3. Select the Local File System option and click Continue.
  4. Give an application name (e.g., SalesforceToGoogleApp) and upload this CAR file

    Tip

    What is a CAR file? A Composite Application (CAR) is an archive file that has the collection of artifacts that you want to deploy in a WSO2 product instance. These artifacts are usually JAVA-based or XML configurations, designed differently for each product in the WSO2 Carbon platform. You can deploy these artifacts to generate services.

     

  5. You link to the Google spreadsheet and the Gmail account that you use in this scenario using environment variables. Download this file and change the values of the variables according to your requirements.

    Tip
    Expand
    titleClick here to read more information about the environment variables used in this file...
    Code Block
    languagexml
    titleenv.json file
    {
    	"salesforce_lead_username":"test@wso2.com",
    	"salesforce_lead_password":"##################",
    	"salesforce_lead_loginurl":"https://login.salesforce.com/services/Soap/u/37.0",
    	"salesforce_lead_blocking":"false",
    	"salesforce_lead_interval" : 120 ,
     	"spreadsheet_lead_accessToken":"ya29.Glu",
    	"spreadsheet_lead_clientId":"###############################",
    	"spreadsheet_lead_clientSecret":"#####################",
    	"spreadsheet_lead_refreshToken":"####################",
    	"spreadsheet_lead_apiUrl":"https://sheets.googleapis.com/v4/spreadsheets",
    	"spreadsheet_lead_spreadsheetId":"1Q-RVgeVy3BxdQIGC6qSEftG1mW8wE2DUYOhnWq4of2s",
    	"spreadsheet_lead_spreadsheetRange":"Sheet1!A1",
    	"gmail_lead_userId":"hmrajas1990@gmail.com",
    	"gmail_lead_refreshToken":"##########################",
    	"gmail_lead_clientSecret":"############################",
    	"gmail_lead_clientId":"############################",
    	"gmail_lead_accessToken":"ya2i",
    	"gmail_lead_apiUrl":"https://www.googleapis.com/gmail",
    	"gmail_lead_managerEmailId":"hmrajas1990@gmail.com"
    }

    Here's a description of the properties:

      • salesforce_lead_username: user name of the salesforce account.
      • salesforce_lead_password : The password provided here is a concatenation of the user password and the security token provided by Salesforce. here 
      • salesforce_lead_loginurl : The login URL to access the Salesforce account.
      • salesforce_lead_blocking :  Indicated whether the connector needs to perform blocking invocations to Salesforce. (Supported in ESB 4.9.0 and later) 
      • salesforce_lead_interval : The interval time of the scheduled task in seconds(default 120 seconds). 
      • spreadsheet_lead_accessToken : Access token through the OAuth2 playground.
      • spreadsheet_lead_clientId :  Value of your client id, which can be obtained at Google developer console.
      • spreadsheet_lead_clientSecret : Value of your client secret, which can be obtained at Google developer console.
      • spreadsheet_lead_refreshToken : Value of the refresh token, which gets a new access token when the previous token has expired.
      • spreadsheet_lead_apiUrl : The application URL of Google Sheet version v4. 
      • spreadsheet_lead_spreadsheetId : the Unique value of the spreadsheet
      • spreadsheet_lead_spreadsheetRange : The A1 notation of the values to retrieve.
      • gmail_lead_userId : The Mail ID.
      • gmail_lead_refreshToken : Value of the refresh token, which gets a new access token when the previous token has expired.
      • gmail_lead_clientSecret : Value of your client secret, which can be obtained at Google developer console.
      • gmail_lead_clientId : Value of your client id, which can be obtained at Google developer console.
      • gmail_lead_accessToken : Value of the access token to access the Gmail REST API.
      • gmail_lead_apiUrl : The API URL of Gmail (https://www.googleapis.com/gmail).
      • gmail_lead_managerEmailId : The email ID of the regional manager.
  6. Click the Advanced Setting... link, expand the Environment Variables section, and upload the JSON file that you created in the previous step.
  7. Click the Create button at the end of the form to complete creating the application.
  8. Note that you see the application's Overview page once the application is deployed in the Cloud.

    You have now created an application in WSO2 Integration Cloud. Let's see how to test the scenario.
  9. Go to Salesforce, and create a new lead and note the following recorded in the Google spreadsheet and the Gmail you linked to in step 7 above:
    • Your spreadsheet gets updated with the information you provided when creating the new lead:
    • You get an email notification regarding the new lead:

...