Skip to main content
Skip table of contents

S-Drive Connector v1.0

1. General Information

SDrive is a Salesforce-native application that provides enhanced file storage, sharing, and management capabilities. It is designed to overcome Salesforce's native file storage limitations by allowing users to store files in external storage locations like Amazon S3, Google Drive, or SharePoint, while still managing and accessing them directly within Salesforce.

image-20240913-140104.png
image-20240913-140142.png

2. Authentication

Before creating your S-Drive Connection in OneTeg, you’ll need to create an External Client App or a Connected App in Salesforce.

Option 1: Create an External Client App in Salesforce (recommended)

External client apps enable a third-party application to integrate with Salesforce using APIs and security protocols. Salesforce introduced these to replace Salesforce Connected Apps. To use a Connected App instead, see S-Drive Connector v1.0 | Creating-Connected-App in the next section )

  1. Go to Setup->External Client App Manager

  2. Click the New External Client App button

  3. Give the app a name and contact email

  4. On the API (Enable OAuth Settings), check the Enable OAuth box

  5. In the App Settings section

    1. Click Consumer Key and Secret Key. Leave that tab open or copy the values, as you’ll need them later

    2. For the Callback URL, enter https://<tenant name>.oneteg.com/ where <tenant name> is your tenant name

    3. For OAuth Scopes, choose “Full Access (full)

    4. Under Flow Enablement

      1. Check Enable Client Credentials Flow

      2. Check Enable Authorization Code and Credentials Flow

        image-20251006-154941.png
    5. Under Security

      1. Check Require secret for Web Server Flow

      2. Check Require secret for Refresh Token Flow

      3. UNCHECK Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows

      4. Check Enable Refresh Token Rotation

        image-20251006-155138.png

  6. Click Create

  7. In the app, under the Policy Tab, click Edit

    1. Under OAuth Flows and External Client App Enhancements, check Enable Client Credentials Flow

    2. Under App Authorization, choose Refresh token is valid until revoked, and Relax IP Restrictions

    3. Save

Option 2: Creating Connected App

A Connected App in Salesforce is a framework that allows external applications to integrate with Salesforce securely. It facilitates communication between Salesforce and third-party applications by providing a way to authenticate, authorize, and interact with Salesforce data and services. Salesforce recommends using External Client Apps instead. See S-Drive Connector v1.0 | Option-1:-Create-an-External-Client-App-in-Salesforce-(recommended)

  1. Go to Setup

setup.png
  1. In search box on left side search for App Manager and click button New Connected App on the right corner.

connected apps.png
  1. Enter relevant details. Tick mark Enable OAuth Settings button in API (Enable OAuth Settings) to add Callback urls and Scopes.

Note : Do not forget to mark

Enable Client Credentials Flow

1

Enable Authorization Code and Credentials Flow

image-20240913-142042.png
  1. Go to App Manager again and click the drop down button to View clientId and Secret of the app created.

connected apps2.png
  1. Click Manage Consumer Details button to view clientId and Secret

image-20241231-063707.png

3. Create an S-Drive Connection in OneTeg

Create a Connection for S-Drive in your Salesforce org.

  1. In OneTeg, go to Connections

  2. Click +Create Connection

  3. Fill in the fields as shown in the table below

  4. Click Save and follow the prompts to enter your Salesforce credentials and allow access

Settings Parameters

Value

Description

Required (Y/N)

Default Value

Connection Name

The name you want this connector to be called

Connector Name

Y

Connector

S-Drive Connector

The connector used for this connection

Y

Endpoint URL

Endpoint required for performing CRUD
ex: https://cyangate-a-dev-ed.my.salesforce.com/services

Y

Authentication

OAuth

Type of authentication

Y

 Oauth

Flows

Authorization Code

Y

Client Id

{client_id}

Consumer Key from the External Client App or Connected app in Step 2

Y

 

Client Secret

{client_secret}

 Consumer Secret from the External Client App or Connected App in Step 2

Y

 

Token URL

https://login.salesforce.com/services/oauth2/token

 

Y

Authorization Url

https://login.salesforce.com/services/oauth2/authorize

 

Y

Scopes

none

 

 

none

image-20241231-063738.png

4. Connector Actions and Tests

1. Misc: GET Files (GET)

Action Name / Method

Misc: GET Files (GET)

Action Description

This action is used to retrieve all files for an SObject.

 

Test Case

This action is used to retrieve all files for an SObject.

 

Request Body Name

Paramenter

image-20240913-150456.png

 2. Misc: Create Folder as S3Object (POST)

Action Name / Method

Misc: Create Folder as S3Object (POST)

Action Description

This action is used to create a folder on S-Drive Tab (S3Object)

 

Action Settings

Headers

Content Type

application/json

Response Type

application/json

Options:
cg File Name C

Name of folder you’d like to create

cg Lock State C

false or leave blank

cg Checked Out By

leave blank

cg Content Type C

Folder (must be capital F)

cg Is Latest Version C

Toggle on

cg File Size in Bytes C

0

cg Wip C

toggle off

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.