Gonexa University
Gonexa University

Gonexa Connect


The Gonexa Connect solution allows you to store your documents on Google Drive Sharepoint or on an SFTP server. Collaborate on a document generated from Word online and store your documents on your own servers.

Setting up Connect for Sharepoint

Allow document collaboration after generation, maintaining a single reference version, synchronized with your context in Salesforce.



We're going to go through 4 steps to achieve this:

  • Setting up Files Connect
  • Activating Gonexa Connect user rights
  • The Salesforce Setup of Files Connect
  • The choice of location by template

Prerequisites

BEFORE STARTING
  • Have installed and set up Gonexa Doc
  • Have subscribed to Gonexa Connect
    Please contact sales if necessary.
  • Have access to an admin account that can grant administrator consent for authorized application APIs. Contact your company's Sharepoint manager to set up Gonexa Connect.
  • Have a Salesforce account that has access to the Sharepoint admin account
  • Have a Sharepoint site created

Azure & Sharepoint Setup

STEP #1

⚠️ These steps require access to your Sharepoint by an administrator.

Creating an application

Access your Sharepoint from the Azure portal (portal.azure.com)

  • Access the “Azure Active Directory” service
  • Go to “Application Registration”
  • Click on “New registration”
  • Enter a Name (e.g. Gonexa).
  • Leave the default settings for now
  • Click on register
Addition of the 3 application permissions
AUTHORIZATION 1
  • Go to the “Authorized APIs” tab
  • Click on “Add authorization”
  • Select Microsoft Graph, then Application Permissions
  • Select the following permissions:
  • Website > site.readwrite.all (Application)
    Website > Site.Selected* (Application)
  • Files > Files.readwrite.all (Application)
AUTHORIZATION 2
  • Click on “Add authorization”
  • Go to the Sharepoint tab
  • Click on Application Authorization
  • Select the following permissions:
  • Sites > sites.readwrite.all (Application)
    Sites > Sites.Selected* (Application)
    User > User.Read.All (Application)

*There are additional steps to be done by the Sharepoint admin if this option is chosen instead of Sites.readWrite.all (How to use).

Then click on Grant Administrator Consent for {Your Business Name}

⚠️ This step requires “Super Admin Sharepoint” rights. If the button is disabled, contact an administrator with the required rights.

Generate a client secret

Go to the Certificates & Secrets tab in the Secret Client tab
Click on “New Customer Secret.”

  • Description : Gonexa Connect
  • Expiry date: (unhindered)
    E.g. 730 day (24 months)


    💡 Please remember to update these items before expiration day.

Click on Add

Retrieve the codes

Access certificates & secrets from the Customer Secrets tab.
Retrieve the following items:

  • Value: It is the secret

⚠️ This value can only be recovered when the key is created. If it is no longer displayed you will need to create another key.

From the Overview tab:

  • Application ID (customer): constitutes the consumer ID
  • Directory ID (tenant): constitutes the tenant ID
Creating a site from Sharepoint

If you don't already have a site set up in Sharepoint, please create one.

💡 You can create a test site to install the Gonexa Connect package in Sandbox.

  • From Sharepoint, go to My Sites
  • Click on “Create a site”
  • Select “Team Site”
  • Site name: {Choose your own} ex. Salesforce
  • Click Next, then Finish

Salesforce Setup

STEP #2
Create an permission set in Salesforce

From your Salesforce setup, go to permission Sets and click New.

  • Tag: filesConnect
  • API name: FilesConnect

Save

In the System section of your permission set

  • Click on System Authorization
  • Click on Edit
  • Search Files connect in the cloud
  • Check the Enabled box and save
  • Record confirmation of authorization changes
  • On the same page, click Manage Assignments
  • Then, click on Add Assignments
  • Change the list view to see all users and check those to whom you should assign rights (and yourself)
  • Click Next and then Assign
Creating an authentication provider

From Salesforce Setup, go to Authentication Providers.

Click on New

Save

Redirect URL

Retrieve the Reminder URL available in the Salesforce Configuration block after validation of the Sharepoint Authentication Provider.

Ex https://gonexa.my.salesforce.com/services/authcallback/Sharepoint

In the Redirect URL category, from the Overview in the Azure Portal, click Add a Redirect URL.

  • Click on + Add a platform
  • Select WEB
  • In the Redirect URL part, paste the callback URL that you retrieved from the Sharepoint authentication provider.
  • Click on Configure
Creating an external data source

⚠️ This step must be performed by a Salesforce user who has access to the Sharepoint application that was created, that is, for example, the owner. Upon validation of the configuration, he must connect to Sharepoint with his username and password.

From the Salesforce Setup, go to External Data Sources. Click New External Data Source.

  • External data source : Sharepoint
  • Name : Sharepoint
  • Type: Files connect > Microsoft SharePoint Online
  • Site URL: From Sharepoint, copy the first part of the URL (ex: https://gonexa.sharepoint.com/sites/MonSite/) name of the site and paste it here.
  • Identity type: By user
  • Authentication protocol: OAuth 2.0
  • Authentication provider: Select Sharepoint
  • Extent: (empty)
  • Administrative authentication status: pending
  • Start the registration authentication flow: tick

Save and connect to your Sharepoint with your username and password to validate this step.

⚠️ This step cannot be bypassed. If administrator approval is required, refer to authorization step #Ajout. Your Sharepoint Administrator should grant you administrator consent in the Authorized APIs tab.

Validate and synchronize the Sharepoint data source

From Salesforce Setup

  • Access the external data source: Sharepoint
  • Click on Validate and Synchronize on the external data source
  • From the page: Validate the external data source: Sharepoint.
  • Select the Items_SharePoint table
  • Click on Synchronize
Enable access to the external Sharepoint data source
  • Go to Authorization Sets and select Files Connect
  • In the Application Settings section, go to Object Settings
  • Search for Items-SharePoint, and open it
  • In the Field Permissions section, check all Read Access boxes.
  • In the Object Permissions section, check the Enabled check box
  • From the Files Connect permission set configuration page, in the application settings section, go to External Data Source Access
  • Click on Edit
  • Pass Sharepoint to the activated external data sources and save.
Create a custom setting

From Salesforce Setup, go to Custom Settings.
Find the Sharepoint line, and click Manage.
Click New in the first section, to create the default custom setting at the organization level.

  • Customer Id : {Paste the consumer Id found from the Sharepoint Overview tab into application ID (client)}
  • Secret Customer: (previously found in Sharepoint. In the Certificates & Secrets category, in the Customer Secrets tab. From the Gonexa Connect line. Copy the code from the Value column.)
  • Default path : This is the Sharepoint path in which to drop the generated file

    This field thus controls the storage location of all documents stored on the platform's Sharepoint. You can leave it empty if you want to set up a path per template. If not, fill in the path as it is: /foldername

    Ex. Quote/2022/Customer

    💡 This is the storage location of the file generated by default, but you can control it from the template or the flow box
  • Site id : SharePoint id (required)

    💡 The Sharepoint Id is found in the URL of your Sharepoint site /_api/site/id
    Ex. gonexa.sharepoint.com/sites/salesforce/_api/site/id
    From the displayed XML code, retrieve the Id.
  • Tenant id : Previously found in Sharepoint. This is the directory ID (tenant), found in the overview
  • Library : Enter the name of the library in which to store the document if there is one, otherwise leave empty in which case the documents will be stored in Document.

    e.g. gonexaConnect

Save

Choice of location by template

STEP #4
Set the storage location of the generated files

From Salesforce, access document templates (Document template).

  • Open the template (s) from which you want to generate on Sharepoint.
  • Go to the Storage Location field, click on the edit symbol.
  • Select the desired storage location.

    💡 Tip, choose to store documents on Sharepoint or Salesforce and Sharepoint.
  • Click Save.