I run into Salesforce a lot these days, if you happen to be their customer, listen in. The next question then is how can Apigee help enable delightful & consumable APIs on top of Salesforce & API enable back-end systems to be accessible from Salesforce.
The question then is more importantly what are some of the benefits of doing that. Some of those benefits include providing end-to-end visibility into your Salesforce API usage, controlling and managing the several Salesforce Platform Limits and providing consistent security / transformation to support a variety of apps in your enterprise that need access to Salesforce data.
As you may be aware, Salesforce has a lot of different APIs, REST API, SOAP API, Chatter REST API, Bulk API etc.
There are fundamentally 2 different approaches to integrating with Salesforce from Apigee:
Issue a POST request to <a href="https://api.enterprise.apigee.com/v1/organizations/{your-org-name}/environments/{your-env-name}/keyvaluemaps">https://api.enterprise.apigee.com/v1/organizations/{your-org-name}/environments/{your-env-name}/keyvaluemaps</a> { "name" : "sfdc_creds", "entry" : [ { "name" : "username", "value" : "---your salesforce user name---" }, { "name" : "password", "value" : "---your salesforce password + security token (without any spaces)---" } , { "name" : "client_id", "value" : "---your client id from the connected app you create in sfdc---" } , { "name" : "client-secret", "value" : "---your client secret from the connected app you create in sfdc--" } ] }
You need to create a connected app in Salesforce.
The module maps Salesforce SOQL queries to RESTful API resources and query parameters. For example, a properly configured Salesforce connector might map a SOQL query like this:
SELECT id, Owner.Name FROM Opportunity WHERE Owner.Email='jdoe@example.com'
to a RESTful API that you could call like this:
curl <a href="http://localhost:9009/opportunity?ownerEmail=jdoe@example.com">http://localhost:9009/opportunity?ownerEmail=jdoe@example.com</a>
and which might generate a JSON response like this:
{ "action": "GET", "params": { "qp": {} }, "path": "/opportunity", "url": "/opportunity", "data": [ { "attributes": { "type": "Opportunity", "url": "/services/data/v2.0/sobjects/Opportunity/05555555XcYHJ3" }, "Id": "00670000XcYHJ3", "Owner": { "attributes": { "type": "User", "url": "/services/data/v2.0/sobjects/User/0057555555J12" }, "Name": "John Doe" } }, ... ], "targetMetadata": {}, "timestamp": 1406156417290, "duration": 2888, "applicationName": "volos-salesforce", "count": 100, "sql": "SELECT id, Owner.Name FROM Opportunity LIMIT 100" }
The SOQL-to-REST mapping is enabled by simple JSON configuration. Here is a sample:
'opportunity': { queryStringBasic: 'SELECT id, Owner.Name FROM Opportunity', queryStringExpanded: 'SELECT id, AccountId, Account.Name, RecordType.Name, Owner.Name, Owner.Email FROM Opportunity', idName: 'id', queryParameters: { lastDays: 'lastmodifieddate=LAST_N_DAYS: {lastDays}', accountName: 'Account.Name = \'{accountName}\'', ownerName: 'Owner.Name = \'{ownerName}\'', ownerEmail: 'Owner.Email = \'{ownerEmail}\'' } }
This is modeled in the SalesforceQuery Proxy API bundle.
I have attached the 2 API bundles.
salesforceaccount-rev1-2015-04-29.zipsalesforceaccount-rev1-2015-04-29.zip
Check out this end-to-end video recording of the demo if interested.
Here is the link to the end-to-end video recording of the demo if interested.
Hi,
Both bundles are of SalesforceAccount only. Could you please share bundle of SalesforceQuery.
Thanks,
Hi ,
I tried SalesforceAccount bundle. But I have error : Invalid cache resource reference sf-token-cache in Step definition LookupCacheCheckIfAccessTokenExists. Context Revision:1;APIProxy:SalesforceAccount;
Do you know why ?
what is difference between 2 bundle ?
thanks.
@Prithpal Bhogill Can you please also add the SalesforceQuery bundle. It seems both the links are for the SalesforceAccount bundle. Thanks!
There is a wide interest on the SalesforceQuery, can you add or point to the SalesforceQuery bundle.
Much Appreciated!
There is this image from Egypt that you can see here. It is some sort of building or fort but I cannot figure it out with such information. I needed assignment help uk. At least the uploaded added a few things about it so people would find it easy to travel and visit it.
Can you please share the SalesforceQuery bundle. as well as am facing chalnges to deploy the provided bundle.
error is :
Invalid cache resource reference sf-token-cache in Step definition LookupCacheCheckIfAccessTokenExists. Context
For making Salesforce APIs more consumable with Apigee you need to contact with Masters Dissertation Help for best making salesforce.