CB Sugar to SharePoint Stubbing
Online Documentation


1. Introduction

CB Sugar to SharePoint Stubbing enables you to minimize your storage space in Sugar by automatically moving your files from your Sugar to your SharePoint document library, while retaining links on the Sugar side pointing to the physical files on SharePoint. This process is called ‘Stubbing’.

The service is customizable – you decide which files to exclude from the process and how often you want to check for new files on Sugar.

Key Features
   Automatically stub files from SugarCRM to SharePoint
  Event-based service
  Configurable
  Provided as a cloud service (no need to install)

Watch the service in action:

2. How It Works

The CB Sugar to SharePoint Stubbing service consists of two basic components:

  Connecting Software SaaS Portal (https://saas.connecting-software.com/)
  CB SugarCRM to SharePoint Stubbing cloud service

Connecting Software SaaS portal takes care about configuration, subscription management and monitoring.
CB Sugar to SharePoint Stubbing cloud service
 is responsible for the stubbing process and the regular check for new files on Sugar.

3. System Requirements

  • Internet access to our portal (https://saas.connecting-software.com/)
  • Sugar user with sufficient access rights (login and password)
  • Single SharePoint user – Site collection administrator (login and password)
  • SharePoint must be accessible to our SaaS portal

4. Purchase

After you purchase the trial or one of the plans for the CB Sugar to SharePoint Stubbing service, you will get 2 emails from us. An order confirmation email and a guidelines email.

5. Logging in to SaaS portal

After clicking the link shown before in figure 6 pointing to our SaaS portal [https://saas.connecting-software.com/], you need to login to your SaaS portal account if you have one already or create a new one.

Now, you need to configure “CB Sugar to SharePoint Stubbing” service.

6. Configuration

The following chapter describes the configuration process of “CB Sugar to SharePoint Stubbing

6.1 Creating a New Configuration

To create a new configuration, click “Configuration -> CB Sugar to SharePoint Stubbing” to open the main configuration page

If you have any previous configurations, they will be listed on that page. To create a new configuration click “Create New” as shown in the figure below

6.2 Configuration Settings

Fill in the new configuration settings form with your Sugar and SharePoint details.
General Settings:

Name: Name for this configuration for easier identification.

Sugar Settings:

  • URL: The URL of your Sugar REST endpoint. It should be in this form “https://contoso.sugaropencloud.eu/rest/v10/”
  • User: The username of the Sugar user with sufficient access rights. The service would need to access your Sugar account to check for new files on behalf of that user.
  • Password: The password of the Sugar user.
  • Client ID: Client ID is a Sugar OAuth Key “consumer key” which can be obtained from Sugar. Please check the next section for more details on how to obtain this ID.
  • Client Secret: Client Secret is the “consumer secret” associated with the “consumer key” obtained from Sugar in the previous step. Please check the next section for more details on how to obtain this Secret.

How to Obtain Client ID & Secret from Sugar

  • Navigate to your Sugar installation
  • Login to your Sugar account
  • Click the small arrow next to your profile picture
  • Click Admin

  • Click “OAuth Keys”

  • Choose one of the keys there or create a new key. To create a new key, expand the OAuth Keys menu and click Create OAuth Key

  • Type the Consumer Key Name, Consumer Key and Secret, Choose OAuth 2.0 for OAuth version and you could also provide some description.

  • Save your key by clicking the “Save” button.
  • Copy your Consumer Key and paste it to the Client ID field
  • Copy your Consumer Secret and paste it to the Client Secret field

Once you fill in Sugar details, click “Test Connection” button to ensure that you can connect to your Sugar successfully.

SharePoint Settings:

  • URL: The address of your SharePoint site. It could be an online or on-prem SharePoint server, however on-prem SharePoint servers must allow connections from our SaaS Portal. For on-prem SharePoint servers please contact your administrator or contact us for assistance.
    Examples:
    https://OrganizationName.sharepoint.com
    https://SharePointName.contoso.com/sites/MySubsite
  • User: The SharePoint user. Site Collection Administrator is required.
    Examples:
    User@OrganizationName.onmicrosoft.com
    contoso\user
  • Password: The password of the SharePoint user.

Once you fill in the SharePoint details, click “Test Connection” button to ensure that you can connect to your SharePoint successfully.

Stubbing Schedule Settings:

From here you can set how often or when the service should check for new files on Sugar. Please note that smaller interval is better for faster and better synchronization but it increases the traffic. You have the following options:

  1. Every specific number of seconds. Accepted values are between 60 and 10,000 seconds.
  2. Every day at a specific time for daily synchronization. Accepted values range is from 00:00 to 23:59
  3. Every specific day at a specific time for weekly synchronization. Accepted values for day are provided in the options list and for time is from 00:00 to 23:59.

By default the service will check for new documents every 60 seconds.

Once you setup your configuration and your connections succeed, click “Create” to save the configuration. Now your configuration is saved as shown in the figure below.

6.3 Editing a configuration

If you would like to make any changes to the configuration settings, you can click the burger menu icon and choose “Edit Configuration” as shown in the figure below

The configuration will be loaded to the form and you are able to edit all the settings that you provided earlier. While editing a configuration, the password fields are hidden. To display them, click the checkbox “Change password” placed above them. For security reasons the password field is left blank and will have to be typed in again if the checkbox “Change password” is checked.

If you made changes and want to save them, then click “Save” otherwise click “Back to List”.

6.4 SugarCRM and SharePoint Mapping

Once you confirm your configuration settings, you need to create a mapping configuration between your Sugar Entities and your SharePoint Document Library. To do that click the burger menu icon and click “Edit Mapping” as shown in the figure below

The mapping page will be displayed. The page contains the following sections.

Mapping Configuration Section:

From this section you are able to map each Sugar entity and the document path where files attached to that entity will be moved. At the time of publishing this documentation, only 2 entities were supported; Sugar Notes and Sugar Documents.

You have to ensure that the document library is already created on SharePoint. My document library name is called “Documents” as shown below.

To map Sugar Notes to a folder called SugarCrmNotes, you need to select “Notes” from the options list. Type the path where files attached to the notes should be moved. Click “Add”. In the same manner you could map Sugar Documents to a folder called SugarCrmDocs.

You don’t have to create those folders manually on SharePoint as the service will create the folders if they don’t exist, but you have to ensure that the Shared Document Library exists. After clicking the “Add” button the system will try to access the Shared document library. If the shared document library does not exists, an error message will be displayed.

The figure shown below shows the Mapping Configuration Section after mapping Sugar Notes and Documents to the SharePoint document library.

As shown above, you can delete any mapping by clicking the “Delete” link next to it.

The option “Create folder structure automatically” will result in creating a subfolder called “Notes” for the notes entity and a subfolder called “Documents” for the “Documents” entity. This option is handy when you want the service to create those folder for you using the standard names “notes” and “documents”.

To better understand the effect of this option please refer to the following table to see the difference in the SharePoint Document Location when this option is OFF and when it’s ON:

Difference in the SharePoint Document Location
SharePoint Path Create Folders option (OFF) Create Folders option (ON)
/Documents /Documents /Documents/Notes
/Documents/MyNotes /Documents/MyNotes /Documents/MyNotes/Notes

Flie Naming Model:

File naming model allows you to define the naming model of the files being created. Each entity created on Sugar is assigned a unique ID. We use that unique ID as part of the file name so you don’t have to worry about having multiple files with the same name. The way the ID is inserted to the file name depends on the File Naming model you choose. The following table explains the currently supported models and the expected file name on SharePoint for a file called research.docx which was assigned an ID 05467 on Sugar.

Currently Supported File Naming Models
File Naming Model “Case Sensitve” File Name on SugarCRM File Name on SharePoint
[ENTITYNAME]_[ID] research.docx research_Notes_05467.docx
[ID] research_05467.docx /Documents/MyNotes/Notes
randomtext_[ID] research.docx research_Mynotes_05467.docx

File Exclusions:

File exclusions section allows you to exclude certain files from the stubbing process. This could become handy when you need certain files to physically reside on Sugar side like for example video files. By default *.url files need to stay on the Sugar side. You are able to use expressions like

  • man* or man*.*: excludes all files starting with the letters “man” and with any extension
  • *man*.*: excludes all files containing the letters “man” and with any extension
  • *man.ext: excludes all files ending with the letters “man” and with extension “ext”
  • *.ext: excludes all files with extension “ext”
  • *serv*nual.ext: excludes all files containing the letters “serv”, ending by the letters “nual” and with extension “ext”
  • *serv*nual.*: excludes all files containing the letters “serv”, ending by the letters “nual” and with any extension

To add a file exclusion expression, just type it in the field and press the “Add” button as shown in the figure above.

Once done with the mapping settings, click “Save”.

6.5 Deleting a Configuration

You can also delete the configuration by clicking the burger menu icon and selecting “Delete” option and confirming your action by clicking “Delete” from the “Delete Confirmation” dialog as shown in the figure below

Warning: By deleting a configuration the configuration will be permanently deleted with all activated subscriptions (even paid ones). These subscriptions are not transferable to other configurations.

7. Service Activation

In order to be able to use the service, the configuration has to be activated by a service activation code. To activate the service, click the burger menu icon next to your service and choose “Activate Service” as shown in the figure below.

Head back to the guidelines email that you received after your purchase and copy the activation code and paste it in the “Service Activation” window. Once you activate the service, you can close the dialog. Steps are shown in the figure below

8. Starting and Stopping Service

You can start your service by clicking the “Start” button as shown in the figure below.

Please note that once you start the service, files and/or folders might be added to your SharePoint. Modifications will depend on your mapping settings as discussed earlier in section 5.5 of this document.

Note: Data traffic will be consumed once the service starts. It’s not possible to modify the stubbing configuration or mapping while the service is running. This is to prevent inconsistency in the stubbing configuration. To modify the configuration, the stubbing process has to be stopped first.

You can stop the service any time to pause the stubbing process by clicking the stop button and confirming your action as shown below.

9. Logs

During the stubbing process, several logs are being recorded to provide additional information to the user about the stubbing process. To display the list of logs, click the “Activity log” button next to the configuration.

Log entries have colored background to easily identify the type of log being displayed. The logs can be filtered by checking/unchecking the options at the top of the page.

10. Conclusion

In this document we described how to configure and run the “CB Sugar to SharePoint Stubbing” service. Shall you need any assistance or have further questions please contact the support team at our email address office@connecting-software.com or via the support form https://saas.connecting-software.com/Support/Create. We will get back to you as soon as we can.