+ Start a Discussion
Sridhar RamamoorthySridhar Ramamoorthy 

QUICKBOOK & SALESFORCE using SALESFORCE CANVAS

Hi all,

I would like to integrate Quickbooks (External App) with the salesforce using the salesforce CANVAS feature. I highly appreicate for all your responses.

Thank you.
Sami ShakithSami Shakith
Hi Sridhar,

Which external application you want to integrate?
VineetKumarVineetKumar
Check out this video tutorial by salesforce
https://www.youtube.com/watch?v=0818vEdUJlQ
Sridhar RamamoorthySridhar Ramamoorthy
Hi Sami,

Thanks for you reply. I want to integrate both the quickbook and salesforce apps together. Yeah! We have so many external tools (Autofy, DBSync, Zapier, etc..) Intially, I used Autofy to integrate both Quickbook and Salesforce.

But now, I would like to use Salesforce Canvas feature to integrate Quickbook API with Salesforce. And my question here is, whether it's possible to use Canvas feature uh?
Sami ShakithSami Shakith
CANVAS APPLICATION USING CONNECTED APP
 
1. To set the end point URL we should configure the Remote Site Settings.
 Go to Setup Security Controls Remote site Settings New Remote Site.
 
2. Create Controller class to call the Wal-Mart API (WalmartController)
Go to Setup Develop Apex Classes New
 
global class WalmartController{
 
public Integer ItemId{get;set;}
public List<Items> dr{get;set;}
 
public WalmartController(){
}
 
public void requestM(){
 
    String url = 'http://api.walmartlabs.com/v1/feeds/specialbuy?apikey=YourApiId&categoryId=3944';
 
    HttpRequest req = new HttpRequest();
    req.setEndpoint(url);
    req.setMethod('GET');
    Http http = new Http();
    HttpResponse res = http.send(req);
    String responseBody = res.getBody();
    system.debug('statuscode: ' + res.getStatusCode());
   
    //system.debug('Response : ' + responseBody);
    ResCls resItem = (ResCls)JSON.deserialize(responseBody, ResCls.class);
    system.debug('Response after deserialization: ' + resItem);
    system.debug('Response Items: ' + resItem.items);
    List<Items> rl = resItem.items;
    dr = new List<Items>();
    for(Items it:rl){
        system.debug('Item Name: ' + it);
        ItemId = it.ItemId;
        system.debug('ItemId: ' + it.ItemId);
        dr.add(it);
    }  
   system.debug('List: ' + dr);
}
 
public class ResCls{
    List<Items> items;
}
   
public class Items{
 
public Integer ItemId{get;set;}
public Integer ParentItemId{get;set;}
public String Name{get;set;}
public Double SalePrice{get;set;}
public String Upc{get;set;}
public String CategoryPath{get;set;}
public Boolean AvailableOnline{get;set;}
public String ShortDescription{get;set;}
public String LongDescription{get;set;}
public String BrandName{get;set;}
public String ThumbnailImage{get;set;}
public String LargeImage{get;set;}
public String ProductTrackingUrl{get;set;}
public Boolean FreeShipping{get;set;}
public Boolean NinetySevenCentShipping{get;set;}
public Double StandardShipRate{get;set;}
public Double TwoThreeDayShippingRate{get;set;}
public Double OvernightShippingRate{get;set;}
public String Size{get;set;}
public String Color{get;set;}
public Boolean Marketplace{get;set;}
public Boolean ShipToStore{get;set;}
public Boolean FreeShipToStore{get;set;}
public String ModelNumber{get;set;}
public String SellerInfo{get;set;}
public String ProductUrl{get;set;}
public List<Integer> Variants{get;set;}
public List<String> Shelves{get;set;}
public String CustomerRating{get;set;}
public String CustomerRatingImage{get;set;}
public Integer NumReviews{get;set;}
public String CategoryNode{get;set;}
public Boolean isRollBack{get;set;}
public Boolean isSpecialBuy{get;set;}
public String Isbn{get;set;}
public Boolean Bundle{get;set;}
public Boolean Clearance{get;set;}
public Boolean PreOrder{get;set;}
public String PreOrderShipsOn{get;set;}
public String Stoc{get;set;}
public Boolean Freight{get;set;}
public Long DealEndTime{get;set;}
public Long DealStartTime{get;set;}
public String Gender{get;set;}
public String Age{get;set;}
}}
 
3. Create VisualForce Page to disply Item details.
  • Go to  Setup Develop Pages New Name (CanWalEx) click on Save
 
<apex:page Controller="WalmartController" action="{!requestM}" sidebar="false" showHeader="false">
<apex:pageBlock>
<apex:pageblockSection >
<apex:pageblockTable value="{!dr}" var="dd">
        <apex:column headerValue="Item id"><apex:outputText value="{!dd.ItemId}"/></apex:column>
        <apex:column headerValue="Name"><apex:outputText value="{!dd.name}"/></apex:column>
        <apex:column headerValue="upc"><apex:outputText value="{!dd.Upc}"/></apex:column>
        <apex:column headerValue="SalePrice"><apex:outputText value="{!dd.SalePrice}"/></apex:column>
        <apex:column headerValue="AvailableOnline"><apex:outputText value="{!dd.AvailableOnline}"/></apex:column>
        <apex:column headerValue="BrandName"><apex:outputText value="{!dd.BrandName}"/></apex:column>
</apex:pageblockTable>
</apex:pageblockSection></apex:pageBlock></apex:page>
 
  • Give Preview to this page and Copy the URL
 
4. Create the Canvas Application.
Go to setupàCreateàAppsàConnected AppsàNew
 
  • In Basic Information section
            Give the Application name, API Name and Contact Email.
 
  • API (Enable Outh Settings)àEnable outh settings
  • Give the Callback URL (Domain name of the organization)
  • Select the Outh Scope Settings
  • Give the Canvas App Settings
  • Enable Force.com Canvas
  • Give the Canvas app URL
Use the copied CanWalEx VF Page preview page URL and mention as a Canvas app URL.
  • Access Method as Single Request (POST).
  • Add the Chatter Tab in Locations.
  • Click on the Save.
 
5. Click on the Chatter Tab
            Sidebar clicks on the Application name (WalmartApp).
 
 
 
 
 
 
 
Sami ShakithSami Shakith
This is the eg. of integrating waltmat products. Before you start get Walmart API key and add the site into remote site settings .
Sridhar RamamoorthySridhar Ramamoorthy
Hi Sami,

Instead of Walmart, I'm trying to use QuickBooks has my example here. By following the above steps, I created an connected apps. Now  it generated the consumer key and consumer secret credentials. I'm kinda of struck here, where should I use this creds, to integrate quickbooks with salesforce?
Johan KretJohan Kret
Instead of Walmart https://walmartone.onl, I'm trying to use QuickBooks has my example here. By following the above steps, I created an connected apps. Now  it generated the consumer key and consumer secret credentials. I'm kinda of struck here, where should I use this creds, to integrate quickbooks with salesforce?
Sami ShakithSami Shakith
Hi

Try the below links

https://github.com/amitastreait/Salesforce-Quickbooks-Integration
https://sfdcpanther.wordpress.com/2018/01/17/salesforce-quickbooks-online-integration-oauth-2-o/
Naudine MosimeNaudine Mosime
Hi

If you are still on the market for an integration solution, I would recommend you check out Commercient integration app for Salesforce and Quickbooks  (https://www.commercient.com/product/sync-integration-for-quickbooks-and-salesforce/).
Deepika Chauhan 17Deepika Chauhan 17
Hey,
Check out this application from  eShopSync, eShopSync for Quickbooks acts as a bridge between Salesforce &  Quickbooks to import all the data from Quickbooks to Salesforce.
Check out this solution here:   https://eshopsync.com/quickbooks/ (https://eshopsync.com/quickbooks/)