Issue #[1198780] by EvanDonovan, longwave: Export Ubercart order button does nothing...
[project/uc_salesforce.git] / README.txt
1 This module allows for the export of Ubercart customer and order data to 
2 the Salesforce.com Customer Relationship Management system (using the 
3 Salesforce API module). 
4
5 It currently includes support for: 
6
7 * Exporting Ubercart orders to Salesforce
8 * Exporting Ubercart order 
9 line items to Salesforce (if a Salesforce custom object exists)
10 * Creating Salesforce OpportunityContactRole objects, which map Ubercart 
11 orders to Contacts 
12
13 Import functionality is not currently available, but may be added later. 
14
15 See "Setup", below, for a description of how to configure this module. 
16
17 Notes on Features: 
18 ================== 
19
20 * Order Line Items:
21 ------------------- 
22 If an Ubercart order has multiple line items (multiple purchased products), 
23 a mapping can be set up for these so they will be associated with the exported
24 order in Salesforce. 
25
26 Furthermore, a mapping can be set up using the core Salesforce API 
27 module for the product nodes themselves, so that the line items can be 
28 linked in Salesforce to the products purchased. 
29
30 * OpportunityContactRole Mapping: 
31 --------------------------------- 
32 In Salesforce, OpportunityContactRole objects connect Opportunities 
33 (Donations) to Contacts. If a proper OpportunityContactRole 
34 synchronization is enabled, then when viewing the Contact record, the 
35 Opportunities (or Donations) related list for the Contact will include 
36 the contact's Ubercart order(s) in the list. 
37
38 In order for OpportunityContactRole mapping to work, the module creates 
39 a custom node type. This node type contains a field to track the order's 
40 Salesforce ID. This node type is required since the Salesforce API 
41 module currently does not allow multiple objects to be mapped based on a 
42 single Drupal object (in this case, the Ubercart order). 
43
44 Setup: 
45 ====== 
46
47 1) As a prerequisite, install the Salesforce API module, and configure 
48 it according to the instructions provided with it. Also, ensure that 
49 Ubercart is configured correctly. 
50 2) Install and enable the Ubercart/Salesforce Integration module. 
51 3) Enable the Contact, Opportunity, and 
52 OpportunityContactRole objects on the SF API "Object Setup" tab. 
53 4) Create field mappings similar to those suggested in the "Recommended 
54 Field Mappings" section. Do *not* set them to "sync on create". 
55 Synchronization is handled through the Ubercart Conditional Actions 
56 module. 
57 5) Go to the Salesforce API Settings tab (at 
58 admin/settings/salesforce), and make the field mappings from step 4 the 
59 Default Export Settings, under Ubercart Integration. 
60 6) Check the "attempt to sync" checkbox for each type of object you wish
61 to sync. 
62 7) Click "Save configuration" at the bottom of the Settings tab. Now your 
63 integration should be set to work. Test it with both anonymous and 
64 authenticated users. 
65
66 Recommended Field Mappings: 
67 =========================== 
68
69 a) User account -> Contact (or Lead) 
70   i) This is how users will be added to Salesforce. This is required. 
71   ii) Fields (SF name on left): 
72     1) Last Name -> Username 
73        OR Last Name -> [profile category]: Last Name (recommended) 
74     2) Email -> E-mail address 
75     3) (optional) First Name -> [profile category]: First Name 
76   iii) Note: To use profile categories, you 
77        will need to enable the core Profile module, then use the 
78        uc_profile.module to add them to the checkout form (at least if you have 
79        anonymous checkout enabled). I have created a patched version of that 
80        module, available at http://drupal.org/node/606366#comment-3803144, 
81        which allows you to use user profile fields from multiple categories. 
82        This module does not yet support using Content Profile for user data, 
83        but that may be added in a later release. 
84 b) Ubercart order -> Opportunity (or Donation, if using Nonprofit Starter Pack) 
85   i) This is where the purchase data from Ubercart is added, and is required. 
86   ii) Fields: 
87     1) Donation Name -> Order ID 
88     2) Stage -> Order Status (Title) 
89     3) Close Date -> Created date (as XSD:Date) 
90     4) Amount -> Order Total 
91   iii) You can also map most of the other order information, except 
92        for Attributes. Those will be added in a later release. 
93 c) Opportunity Contact Role node -> OpportunityContactRole 
94   i) This makes the link between an individual Contact and an Opportunity. 
95      The OCR node only stores a field containing the Contact's Salesforce ID. 
96      It is necessary since currently you can't do one-to-many mapping using
97      the Salesforce API module. Normally, in Salesforce, 
98      Opportunities/Donations are linked with Accounts/Organizations, but the
99      Ubercart Salesforce Integration module, in its current state, links only
100      to individual Contacts. Linkage with Accounts will be added in a later 
101      version as an optional add-on module. 
102   ii) Fields: 
103     1) Contact ID -> Order User's Salesforce UserID [for OCR] 
104     2) Donation -> Order Salesforce ID [for OCR] 
105 d) (optional) Ubercart order line item -> Line Item 
106   i) If you want to store the data for the individual order line 
107     items (the products ordered) in Salesforce, you will need to create a 
108     custom object that will show on the related list for the Opportunity 
109     object. This can be very simple - just a price numeric field, and a 
110     master-detail field for linking to the Opportunity. However, it is also 
111     possible to have this object link to a Product object which contains the 
112     details about the product ordered, exported from the Ubercart product 
113     node. If you add this after you have already installed the Salesforce 
114     API module, make sure to download and re-upload the Enterprise WSDL so 
115     that this object and its fields will be recognized. Note: Currently this 
116     module does not integrate with the Pricebook. That will be added in a 
117     later version. 
118   ii) Fields: 
119     1) Product Name -> Title 
120     2) Purchase Name -> Order Salesforce ID 
121     3) Cost -> Price 
122
123 Release Acknowledgements: 
124 ========================= 
125
126 alpha3 Release:
127 ~~~~~~~~~~~~~~~ 
128 Documentation, testing, and bug fixes were done by EvanDonovan, the 
129 module's new maintainer, for TechMission. 
130
131 If you have particular integration needs and wish to sponsor further 
132 development, you may contact him at evan@evandonovan.org. 
133
134 alpha2 Release: 
135 ~~~~~~~~~~~~~~~ 
136
137 Most of the development of the alpha2 release was done by aaronbauman, 
138 the creator of the Salesforce API module. 
139
140 Some documentation, testing, and bug fixes were done by EvanDonovan for 
141 TechMission. 
142
143 alpha1 Release: 
144 ~~~~~~~~~~~~~~~ 
145
146 Ryan Jacobs (with support from Lumity.org) provided testing and 
147 suggestions. 
148
149 Support for this work provided by Trees for Life. 
150
151 This module was originally developed by Bibek Sahu 
152 (bibek@sahuconsulting.com). 
153