Date: 22/10/12
www.sugarpshop.com
Version: 3.2Table of Contents
1 SUGARPSHOP: SCHEMA ... 3
2 WHAT CAN SUGARPSHOP INTERFACE DO FOR YOU?... 4
3 GENERAL FUNCTIONS ... 5
4 SUPPORT MODULE ... 6
5 DATA TRANSFER ... 7
6 MATRIX OF DIFFERENT VERSIONS ... 8
7 INSTALLATION ... 9
7.1 SYSTEM REQUIREMENTS ... 9
7.2 MODULE INSTALLATION IN SUGARCRM ... 9
7.3 MODULE INSTALLATION IN PRESTASHOP ... 10
7.4 MODULE CONFIGURATION IN PRESTASHOP ... 11
7.4.1 Connection to the SugarCRM database ... 11
7.4.2 Complete installation ... 11
7.4.3 Basic settings ... 12
7.4.4 Contact/order synchronisation in SugarCRM ... 13
7.4.5 Interface mode (synchronous/asynchronous) ... 14
7.4.6 Log settings ... 15
7.4.7 Support module (Presatshop 1.4 et +) ... 15
7.4.8 Quick Update Sugarpshop ... 16
Date: 22/10/12
www.sugarpshop.com
Version: 3.21
SugarPshop: schema
Synchronous or Asynchronous Mode Means of communication:
Web services
PRESTA
SHOP
SUGAR
CRM
Client Order Newsletter/ Support ticket Synchronization with account/contact/lead Synchronization with order/pportunity
Subscribe Unsubscribe to newsletters /create modify support ticket Administrator Warning if error occurs Client Lead Prospecting campaign Newsletters Shop purchases
Leader / Salesperson Shop statistics: Turnover, visits, orders… Client statistics, newsletters and prospecting campaigns (e.g.: Turnover brought in
by each compaign)
Customer relationship management (telephone calls, emails, meetings…)
Date: 22/10/12
www.sugarpshop.com
Version: 3.22
What can SugarPshop Interface do for you?
This interface allows you to synchronize data between the CRM solution, SugarCRM, and the online-sales solution, Prestashop.
• You are already using an online shop with Prestashop and you would like to have a real interaction with your clients?
• You are already using SugarCRM and you would like to set up an online shop?
• You are currently using neither of these solutions but you would like to sell products or services online, and at the same time have a truly interactive relationship with your clients?
SugarPshop partnered with SugarCRM and PrestaShop is the
solution for you.
A client who registers in your shop will be copied into SugarCRM. You will then be able to set up and maintain your relationship with this client:
• Send your newsletters: SugarCRM allows you to follow the statistics of your mailings (who opened the mail, who clicked on a given link from the mail…) This way, you willl be able to evaluate the real interests of your clients regarding the newsletter.
• Receive incoming email: You will also be able to receive clients’ emails in SugarCRM if you wish.
• Create incident tickets: For example, in the case that a client contacts you to indicate that a package has not arrived.
• Make calls/receive telephone calls…
If one of your online clients is already saved in SugarCRM, data from your shop (addresses, telephone number…) will be updated in the SugarCRM data.
The boutique data always takes priority over SugarCRM data as it is directly entered by the client and is therefore more reliable.
When your client makes an order, it will be copied in SugarCRM. If the order is validated, an opportunity will also be created at that time for the client.
The possibility to manage your leads and opportunities will enable you to obtain statistics regarding your marketing campaigns. In fact, when a lead (in SugarCRM) buys from your shop, this lead will be changed into a contact in SugarCRM.
The marketing campaign that allowed the creation of the lead will be linked to the contact. All of the contact’s purchases will therefore be assigned to the lead’s marketing campaign. You will then be able to evaluate the turnover associated with each campaign and to monitor the return on investment. SugarCRM makes these statistics available to you. You will also be able to directly target your clients. For example you will have the possibility to communicate (by mail, telephone, email…) with:
• all clients who have previously bought a particular product in your shop
• all clients who made a purchase last year but have not made any this year
• all clients who have a birthday this month…
Note: It is possible to connect several Prestashop shops to one SugarCRM solution (for information: 1 SugarPshop license = 1 shop using SugarPshop).
Date: 22/10/12
www.sugarpshop.com
Version: 3.23
General Functions
Clients from online shops of PrestaShop are called Contacts in SugarCRM. Actions in PrestaShop General management rules of SugarCRM
Create a new client
If no current contact has the same email of the new client, a new contact and account will automatically be created in SugarCRM.
If a current contact has the same email as the new client, the latter will be linked to that contact in SugarCRM (=update of contact information in SugarCRM).
If a current lead has the same email as the new client, a contact and account will be created in SugarCRM. The contact and the lead will be linked.
If a current account has the same email as the client, a contact will be created in SugarCRM. The contact and the account will be linked.
Subscription / Unsubscription to Newsletters
Subscription / unsubscription to SugarCRM newsletter if there is a modification in PrestaShop.
Subscription / unsubscription to PrestaShop newsletter if there is a modification in SugarCRM.
Subscription to Newsletters via newsletter module
A new lead will automatically be created in SugarCRM (subscription to PrestaShop newsletter in SugarCRM). Update client’s personal
data Update of client’s personal data in SugarCRM.
Order
creation/modification
Creation/modification of order (with its products and discounts) in SugarCRM.
Possibility to update contact’s billing and delivery addresses in SugarCRM if they have been modified (record-keeping of former addresses).
Order validation (e.g. status ‘payment accepted’)
Order modification in SugarCRM.
Creation of an opportunity, linked to the account and the contact. This allows you to obtain statistics on your marketing campaigns.
Support ticket
Date: 22/10/12
www.sugarpshop.com
Version: 3.24
Support module
The support module is compatible Prestashop 1.4 and +. It allows your customers to create, edit and list their tickets from their account in Prestashop:
It is possible to add a comment to the support ticket if it is still open.
You can manage these tickets in SugarCRM:
Date: 22/10/12
www.sugarpshop.com
Version: 3.25
Data transfer
Data transfer between PrestaShop and SugarCRM is done via web services (new characteristic of SugarPshop version 2.0).
Advantages of using web services:
• PrestaShop and SugarCRM can communicate without sharing the same host.
• Functions used in SugarCRM (creating contacts, accounts...) are the standard functions of SugarCRM. The data created in SugarCRM is therefore reliable.
Disadvantages of using web services:
• Data transfer time is longer than when using requests to communicate between the databases. The time needed to create a client or an order lasts about 5-10 seconds on average.
The solution in order to avoid this delay, which directly affects the client, is the asynchronous mode of the SugarPshop Interface.
Using the asynchronous mode, it is no longer the action of the client in your online shop (making an order, for example) that launches the synchronization of the data by an independent process launched on the server. Therefore, the client is no longer slowed down by the data transfer in SugarCRM.
SugarPshop allows data transfer using the asynchronous mode in 2 ways:
1. Process is launched via the configuration screen of the SugarPshop module in PrestaShop (see chapter 6.4.4)
2. Process is regularly launched, thanks to the assistance of a task scheduler. The programs enabling data synchronization are provided in the interface (file: “job”). The contrab method allows a frequent update of SugarCRM and also provides fresh data in SugarCRM without slowing down the client in your shop.
It is possible to configure this mode by:
• Setting your task scheduler (to launch programs every 2 minutes, for example)
• Using a Time Out setting (chapter 6.4.3). This setting tells the program to stop its action after the time indicated in the Time Out. With a crontab job set for 2 minutes, we can set the time_out at 100 seconds, for example. For your information: The duration of the time_out must be less than your server’s, by at least 20 seconds, in order to avoid interrupting a program without generating a log.
Date: 22/10/12
www.sugarpshop.com
Version: 3.26
Matrix of different versions
Functionality Free
Version
Pro Version Contact synchronization :
• The free version only creates contact in SugarCRM
• The pro version creates and updates contact in SugarCRM
Update contact’s personal information. Update addresses and telephone numbers. Newsletters synchronization:
• The free version only subscribes to newsletters at time of contact creation in SugarCRM
• The pro version creates and updates subscriptions and unsubscriptions to newsletters (SugarCRM to Prestashop and Prestashop to SugarCRM)
Creating a lead in SugarCRM for all subscriptions to the newsletter via the newsletter module of Prestashop. Transformation of SugarCRM leads into contacts if a lead registers in the PrestaShop online shop
Order synchronization (including details of products and discounts)
Account management in SugarCRM (account creation at time of contact creation)
Opportunities management in SugarCRM (opportunity = validated order).
Statistics on prospecting campaigns in SugarCRM (E.g.: Turnover brought in from each campaign)
Mass synchronization of contacts function (useful for initialization while installing)
Interface functioning in synchronous mode (instant copy of data)
Interface functioning in asynchronous mode (data copy at request of administrator)
Log text of all actions done by the interface
Email alerts to administrator in the case of data transfer error Alert to administrator when creating a task (in SugarCRM) in the case of data transfer error
Compatible whith multi-store feature (Prestashop 1.5) Module of support ticket
Add custom code in folder sugarpshop/classes/custom (upgrade safe)
Multi-store feature (Prestashop 1.5) Acces to SugarPshop assistance
To summarize, the free version is useful for copying shop clients to SugarCRM when creating account in PrestaShop or during mass synchronization. This version manages neither leads/accounts nor updating contacts.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27
Installation
7.1
System Requirements
In order to install SugarPshop, you must first have installed SugarCRM and PrestShop. Sugarpshop 3.2 works with SugarCRM 6.1 to 6.5; Prestashop 1.4.x and 1.5.x.
Sugarpshop is compatible with PHP 5.2 and PHP 5.3.
You must enable soap library and set the variable allow_url_fopen to true.
7.2
Module installation in SugarCRM
Find the SugarCRM module in SugarPshop and install it as you would any other module, using the Manager Module of SugarCRM:
This module is only useful for the pro SugarPshop version. The free version does not manage orders, products or discounts. Therefore, this module is not useful for the free version.
Once the module is installed, rebuild the relationships using the “repair” button in the administrative section of SugarCRM:
Next click on “Quick Repair and Rebuild”:
Configure permissions 705 on the folder <sugarcrm>/custom/service and all its subfolders and files:
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.3
Module installation in PrestaShop
Find the PrestaShop module of SugarPshop and install it as you would any other module using the Manager Module of Prestashop:
Next click on “configure” in order to configure the interface.
If you downloaded Sugarpshop from the site addons.prestashop.com or sugarforge.com, you must download the module Sugarpshop for SugarCRM:
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4
Module configuration in Prestashop
7.4.1
Connection to the SugarCRM database
Connection to SugarCRM is done via web services. All that’s needed in order to sign on is to enter the SugarCRMhost address, a login and a valid password.
When you click on “Update SugarCRM connection”, the program will inform you whether the settings are correct or not.
7.4.2
Complete installation
It is essential to click on “Complete installation” for the interface to function correctly. This allows:
• The creation of tables to synchronize contacts and order between SugarCRM and PrestaShop. These tables store the SugarCRM IDs and their corresponding PrestaShop IDs. Without these tables, synchronization will not be possible.
• The creation of newsletters in SugarCRM.
• The creation of shops in SugarCRM. It is necessary to click this button after each created shop in Prestashop 1.5. It will create the store in SugarCRM.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4.3
Basic settings
These basic settings allow you to configure:
• The language used for the data transfer between SugarCRM and PrestaShop. All the data under this language (order status, product description…) can be transferred to SugarCRM in both French and English.
• The method used to copy contacts’ mailing and telephone information: Contact information is not managed exactly the same in PrestaShop and SugarCRM. In PrestaShop the information is attached to orders whereas, in SugarCRM, it is attached directly to the contacts. It is therefore possible to have a maximum of 2 addresses per contact in SugarCRM while in PrestaShop it is possible to store several addresses per contact. In order to manage these differences between the 2 systems, SugarPshop provides 3 modes of copying contacts’ mailing and telephone information:
o Copy made at the time of creating a contact in SugarCRM: A contact’s address and telephone numbers are copied only when a contact is created in SugarCRM. No copy is made when an order is made.
o Copy made if contact’s first and last name are found in both systems: The mailing and telephone contact information in SugarCRM is updated at each order made in PrestaShop in the case where the information has been modified and if the first and last names are identical in both SugarCRM and PrestaShop (this avoids copying a delivery address of someone receiving a gift, for example). In this mode, a copy is also made when a contact is created in SugarCRM.
o Copy in all cases: The address is copied/updated each time the information is modified in PrestaShop. Note that if the contact’s first or last name is not the same in SugarCRM and PrestaShop, the first or last name will be copied onto the first line of the address. No modification will be made to the first or last name in PrestaShop following an order, unless the personal contact information has been modified.
Only available in the complete version.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4.4
Contact/order synchronisation in SugarCRM
Contact synchronization will allow you to update one of your clients in SugarCRM. If you go into the “ALL” setting, this SugarCRM update will be effective on all your shop clients until time_out (see Chapter 6.4.5).
Order synchronization will allow you to update one of your client’s orders in SugarCRM. If you go into the “ALL” setting, this SugarCRM update will be effective on all of the orders in your shop until time_out (see Chapter 6.4.5).
Be careful: This function is always active, even when the interface is deactivated (see the following point in the text). Therefore, it is possible to use the interface in asynchronous mode by deactivating the interface and by synchronizing your clients with “ALL” whenever you like. You can find more information about this in the following paragraph.
Only available in the complete version.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4.5
Interface mode (synchronous/asynchronous)
You can modify the interface mode:
• Synchronous mode: the data is transferred when a client performs an action in the shop (e.g., makes an order) or when an employee performs an action (e.g., modifies an order status).
• Asynchronous mode: data is transferred by a server process launched manually or by a task scheduler.
By clicking on the square, you will deactivate the interface. This is also useful if you do not wish to transfer the data for a certain period of time.
For example: this is useful if you want to finish importing leads from a marketing campaign into SugarCRM so that they can be identified as leads when they make their first order. The turnover brought in by your campaign will be updated in SugarCRM at the same time. The time_out is the setting that stops the data synchronization programs when the number of seconds (in the time_out) runs out. It is only useful in asynchronous mode.
If you wish to synchronize your data using a task scheduler, the instructions of the programs to launch are indicated under “Validate”.
Only available in the pro version.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4.6
Log settings
7.4.7
Support module (Presatshop 1.4 et +)
You can enable the support module to enable your customers to create tickets in their account in Prestashop. You can then manage these tickets in SugarCRM.
You can change the image displayed in your shop:
Only available in the complete version.
Only available in the complete version.
Date: 22/10/12
www.sugarpshop.com
Version: 3.27.4.8
Quick Update Sugarpshop
When an update is available, you can easily install it by importing the file directly into sugarpshop.
7.5
Add custom code
Since version 3.0 of sugarpshop it is possible to add custom code without changing the standard sugarpshop (upgrade safe).
It is possible to extend standard classes of Sugarpshop by creating folder “custom” in <prestashop>\modules\sugarpshop\classes.
Then you must create a custom class. For example if you want to redefine the constructor of class sgps_customer, create the file sgps_customer.php and insert the following code:
<?php
class sgps_customer_cstm extends sgps_customer {
public function __construct($customer = NULL, $connexion = NULL) { // Your custom code
} }