{"id":757,"date":"2020-10-16T11:23:37","date_gmt":"2020-10-16T11:23:37","guid":{"rendered":"https:\/\/www.dhruvsoft.com\/blog\/?p=757"},"modified":"2024-07-26T09:40:36","modified_gmt":"2024-07-26T09:40:36","slug":"connecting-salesforce-to-xero","status":"publish","type":"post","link":"https:\/\/www.dhruvsoft.com\/blog\/connecting-salesforce-to-xero\/","title":{"rendered":"Three Ways to Connect Salesforce with Xero"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Want to see up-to-date invoices, bills, payments, and other accounting information directly within Salesforce? Sick of manually copy-and-pasting sale and product details from Salesforce to Xero? In this blog post, we\u00e2\u20ac&#x2122;ll discuss three ways to connect these two apps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Zapier<\/li><li>Breadwinner<\/li><li>Custom development<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"417\" src=\"https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2020\/10\/Three-Ways-to-Connect-Salesforce-with-Xero.jpg\" alt=\"\" class=\"wp-image-758\" srcset=\"https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2020\/10\/Three-Ways-to-Connect-Salesforce-with-Xero.jpg 1000w, https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2020\/10\/Three-Ways-to-Connect-Salesforce-with-Xero-300x125.jpg 300w, https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2020\/10\/Three-Ways-to-Connect-Salesforce-with-Xero-768x320.jpg 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">If you\u00e2\u20ac&#x2122;re looking to increase visibility into financial info within Salesforce, eliminate errors in Xero invoice creation, or just save time and effort jumping between the two systems, read on!<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 ez-toc-wrap-left-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.dhruvsoft.com\/blog\/connecting-salesforce-to-xero\/#Zapier\" >Zapier<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.dhruvsoft.com\/blog\/connecting-salesforce-to-xero\/#Breadwinner\" >Breadwinner<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.dhruvsoft.com\/blog\/connecting-salesforce-to-xero\/#Custom_development\" >Custom development<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.dhruvsoft.com\/blog\/connecting-salesforce-to-xero\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Zapier\"><\/span>Zapier<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first option we\u00e2\u20ac&#x2122;ll discuss is Zapier, a popular general integration and automation platform. Zapier can connect Salesforce and Xero (along with a huge variety of other apps) without writing a line of code, and instead via an intuitive and easy-to-learn interface which will have you moving data from Salesforce to Xero in no time. Zapier is also highly customizable &#8212; it will work just fine with custom objects or fields, and can move data between the two systems in whichever specific way your business requires.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, since Zapier isn\u00e2\u20ac&#x2122;t specifically built to handle financial information, you\u00e2\u20ac&#x2122;ll need to be extra careful while configuring and testing your integration. Zapier won\u00e2\u20ac&#x2122;t prevent you from overwriting or erasing information in Xero, even after an invoice has been raised &#8212; it doesn\u00e2\u20ac&#x2122;t have any built in safeguards or limitations, and you will need to ensure the integration you configure will protect your financial data (in particular for auditing purposes).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, be aware that while Zapier provides some templates for common integration requirements, it doesn\u00e2\u20ac&#x2122;t provide a truly out-of-the-box solution for connecting Salesforce and Xero. Be prepared to spend some time getting things set up. For example, if you want to see Invoices and Line Items in Salesforce, you\u00e2\u20ac&#x2122;ll first need to create and configure custom objects to store all the data you want to see.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key benefit:<\/strong> simple user interface, flexible<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Drawback:<\/strong> few security measures, careful configuration required<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/zapier.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/zapier.com\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Breadwinner\"><\/span>Breadwinner<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Our second option is <a href=\"https:\/\/breadwinner.com\/xero-salesforce\/\" target=\"_blank\" rel=\"noreferrer noopener\">Breadwinner<\/a>, a Salesforce-native application that focuses exclusively on integrating Salesforce and financial systems like Xero (along with QBO and Netsuite). Breadwinner provides an even easier set-up than Zapier. Just install the package from the <a href=\"https:\/\/appexchange.salesforce.com\/appxListingDetail?listingId=a0N3000000B4dkKEAR\" target=\"_blank\" rel=\"noreferrer noopener\">AppExchange<\/a>, connect it to Xero, match your Xero Companies to your Salesforce Accounts, and you\u00e2\u20ac&#x2122;ll be up and running &#8212; in hours, not days or weeks. Out of the box, Breadwinner will sync your historical Invoices and allow you to create Invoices from Opportunities without any configuration required, all though a clean and straightforward user interface.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Breadwinner also has strong protection for your financial information; you won\u00e2\u20ac&#x2122;t have to worry about existing Invoices being accidentally edited or deleted from within Salesforce. And while Breadwinner is less openly customizable than Zapier, it still works perfectly with custom objects and fields, allowing fine-grained control over the data you push into Xero.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The downside of Breadwinner\u00e2\u20ac&#x2122;s easy set-up and pre-configured process is that if you have especially complex or unusual integration requirements, Breadwinner might not suit: for example, if you want to store your Invoice data on a custom object you\u00e2\u20ac&#x2122;ve already created. But if you simply want to see and<a rel=\"noreferrer noopener\" href=\"https:\/\/breadwinner.com\/xero-salesforce\/\" target=\"_blank\"> create Invoices<\/a> (as well as Bills and POs) from within Salesforce, give Breadwinner a go: the basic version of the application is totally free, so you can try it out without any real commitment or risk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key benefit:<\/strong> fast set-up, easy configuration<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Drawback:<\/strong> less flexible for unusual requirements<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" href=\"https:\/\/breadwinner.com\/\" target=\"_blank\">https:\/\/breadwinner.com\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Custom_development\"><\/span>Custom development<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The last option we\u00e2\u20ac&#x2122;ll discuss is building your own connection between Salesforce and Xero by making use of Apex and the APIs of these two platforms. The benefit of this approach is that it\u00e2\u20ac&#x2122;s extremely configurable: you\u00e2\u20ac&#x2122;re writing the code, and you can build the integration however you\u00e2\u20ac&#x2122;d like.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The downside, of course, is that you have to write the code in the first place! Connecting Salesforce and any financial application containing sensitive data is certainly not simple, and will require a substantial investment in planning, coding, and thorough testing. For a little insight, here\u00e2\u20ac&#x2122;s a snippet of Apex which will create a draft Invoice in Xero:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class Xero{\n    public void createDraftInvoice() {\n        try{\n            XeroAuthorization(); \/\/Which must be configured with Xero OAuth\n\n            String requestBody = getInvoiceXml();\n            String Endpoint = 'https:\/\/api.xero.com\/api.xro\/2.0\/Invoices';\n\n            HttpRequest req = new HttpRequest();\n            req.setMethod('POST');\n            req.setTimeout(120000);\n            req.setHeader('Content-Type','text\/xml');\n            req.setHeader('Accept', 'application\/json');\n            req.setEndpoint(Endpoint);\n            req.setBody(requestBody);\n\n            Http http = new Http();        \n            HttpResponse res =  http.send(req);\n            if(res.getStatusCode() == 200){\n                \/\/ Create a record in SF\n            }else{\n                System.debug('There was a problem while creating the Invoice :: '+res.getStatusCode());\n            }\n        } catch(Exception e){\n            System.debug('Exception '+e);\n        }        \n    }\n    public String getInvoiceXml(){\n        XmlStreamWriter w = new XmlStreamWriter();\n        w.writeStartElement('', 'Invoices', '');\n        w.writeStartElement('', 'Invoice', '');\n\n        w.writeStartElement('', 'Type', '');\n            w.writeCharacters('ACCREC');\n        w.writeEndElement();\n\n        w.writeStartElement('', 'Contact', '');\n            w.writeStartElement('', 'Name', '');\n            w.writeCharacters('Martin Hudson');\n            w.writeEndElement();\n        w.writeEndElement();\n\n        w.writeStartElement('', 'Date', '');\n            w.writeCharacters('2020-08-12T00:00:00');\n        w.writeEndElement();\n\n        w.writeStartElement('', 'LineAmountTypes', '');\n            w.writeCharacters('Exclusive');\n        w.writeEndElement();\n\n        w.writeStartElement('', 'LineItems', '');\n        w.writeStartElement('', 'LineItem', '');\n\n        w.writeStartElement('', 'Description', '');\n            w.writeCharacters('Example description text');\n        w.writeEndElement();\n\n        w.writeStartElement('', 'Quantity', '');\n            w.writeCharacters('4.3400');\n        w.writeEndElement();\n        \n        w.writeStartElement('', 'UnitAmount', '');\n            w.writeCharacters('395.00');\n        w.writeEndElement();\n\n        w.writeEndElement();\/\/end LineItem\n        w.writeEndElement();\/\/end LineItems\n\n        w.writeEndElement();\/\/end Invoice\n        w.writeEndElement();\/\/end Invoices\n\n        String xmlOutput = w.getXmlString();\n        w.close();\n        return xmlOutput;\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, much more than this will be required to build out a robust integration!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While this custom approach means that you won\u00e2\u20ac&#x2122;t have to pay any subscription fees, do keep in mind that you\u00e2\u20ac&#x2122;ll need to commit to maintaining the integration with your own development resources, especially given that Salesforce and Xero are both updated very frequently. But if you want to maintain complete control over your connection, or your requirements are too specific for either Breadwinner or Zapier, writing custom code might be the way to go.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Key benefit:<\/strong> completely customizable, no subscription costs<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Drawbacks:<\/strong> very technically demanding, ongoing maintenance<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Connecting Salesforce to Xero can save you time, annoying manual effort, and therefore money. We hope that this article has helped inform you about a few of the different ways to connect Salesforce and Xero.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to see up-to-date invoices, bills, payments, and other accounting information directly within Salesforce? Sick of manually copy-and-pasting sale and product details from Salesforce to Xero? In this blog post, we\u00e2\u20ac&#x2122;ll discuss three ways to connect these two apps: ZapierBreadwinnerCustom development<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,24],"tags":[],"class_list":["post-757","post","type-post","status-publish","format-standard","hentry","category-crm-products","category-salesforce-com-crm","entry"],"_links":{"self":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts\/757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=757"}],"version-history":[{"count":0,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts\/757\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/categories?post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/tags?post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}