{"id":1944,"date":"2018-10-22T11:34:49","date_gmt":"2018-10-22T15:34:49","guid":{"rendered":"http:\/\/www.thatsoftwareguy.com\/blog\/?p=1944"},"modified":"2018-10-22T11:34:49","modified_gmt":"2018-10-22T15:34:49","slug":"from-zen-cart-to-salesforce-handling-accounts","status":"publish","type":"post","link":"https:\/\/www.thatsoftwareguy.com\/blog\/2018\/10\/22\/from-zen-cart-to-salesforce-handling-accounts\/","title":{"rendered":"From Zen Cart to Salesforce &#8211; Handling Accounts"},"content":{"rendered":"<p>Unlike most B2C e-commerce systems, Salesforce makes a distinction between Contacts, which are identified by an email address, and Accounts, which are identified by a name and site.\u00a0 Contacts belong to an Account, and an Account may have many Contacts.<\/p>\n<p>The way I handled this relationship in the first version of\u00a0 <a href=\"https:\/\/github.com\/scottcwilson\/zencart_to_salesforce\">Zen Cart to Salesforce<\/a> was simply use the email address as the Account name. This has a significant advantage, since the email address for a shopping cart account is an immutable field.<\/p>\n<p>However, some larger customers have multiple email addresses associated with a single account.\u00a0 \u00a0Also, some customers had e-mail address changes over the life of their relationship with me.<\/p>\n<p>For these reasons,\u00a0I decided to add a &#8220;salesforce_account_name&#8221; \u00a0field to the <code>customers<\/code> table.\u00a0 I populate this only in cases where the email address is not sufficient.\u00a0 \u00a0I also had to modify the customer export script to export that field rather than the email address in the Account column of the CSV when it was set.<\/p>\n<p>This new way of handling Accounts is reflected in the <a href=\"https:\/\/github.com\/scottcwilson\/zencart_360_sales_reporting\">360 Sales Reporting<\/a> modification I did, to get more accurate per-account sales data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unlike most B2C e-commerce systems, Salesforce makes a distinction between Contacts, which are identified by an email address, and Accounts, which are identified by a name and site.\u00a0 Contacts belong to an Account, and an Account may have many Contacts. The way I handled this relationship in the first version of\u00a0 Zen Cart to Salesforce &hellip; <a href=\"https:\/\/www.thatsoftwareguy.com\/blog\/2018\/10\/22\/from-zen-cart-to-salesforce-handling-accounts\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">From Zen Cart to Salesforce &#8211; Handling Accounts<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90,58,78],"tags":[],"class_list":["post-1944","post","type-post","status-publish","format-standard","hentry","category-salesforce","category-that-software-guy","category-zen-cart"],"_links":{"self":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/1944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/comments?post=1944"}],"version-history":[{"count":3,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/1944\/revisions"}],"predecessor-version":[{"id":1963,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/posts\/1944\/revisions\/1963"}],"wp:attachment":[{"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/media?parent=1944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/categories?post=1944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thatsoftwareguy.com\/blog\/wp-json\/wp\/v2\/tags?post=1944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}