Skip to content

Commit

Permalink
📕 source salesforce: fix broken page anchor in spec.json & add guide …
Browse files Browse the repository at this point in the history
…for adding read only user (#10751)
  • Loading branch information
sherifnada authored Mar 1, 2022
1 parent a4e8417 commit df47987
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
- name: Salesforce
sourceDefinitionId: b117307c-14b6-41aa-9422-947e34922962
dockerRepository: airbyte/source-salesforce
dockerImageTag: 1.0.1
dockerImageTag: 1.0.2
documentationUrl: https://docs.airbyte.io/integrations/sources/salesforce
icon: salesforce.svg
sourceType: api
Expand Down
4 changes: 2 additions & 2 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7064,7 +7064,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-salesforce:1.0.1"
- dockerImage: "airbyte/source-salesforce:1.0.2"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/salesforce"
connectionSpecification:
Expand All @@ -7081,7 +7081,7 @@
title: "Sandbox"
description: "Whether the app is in a Salesforce sandbox or not. If you\
\ do not know what this is, assume it as false. We provide more info on\
\ this field in the <a href=\"https://docs.airbyte.com/integrations/sources/salesforce#is_sandbox\"\
\ this field in the <a href=\"https://docs.airbyte.com/integrations/sources/salesforce#sandbox-accounts\"\
>docs</a>."
type: "boolean"
default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ COPY source_salesforce ./source_salesforce
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=1.0.1
LABEL io.airbyte.version=1.0.2
LABEL io.airbyte.name=airbyte/source-salesforce
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"properties": {
"is_sandbox": {
"title": "Sandbox",
"description": "Whether the app is in a Salesforce sandbox or not. If you do not know what this is, assume it as false. We provide more info on this field in the <a href=\"https://docs.airbyte.com/integrations/sources/salesforce#is_sandbox\">docs</a>.",
"description": "Whether the app is in a Salesforce sandbox or not. If you do not know what this is, assume it as false. We provide more info on this field in the <a href=\"https://docs.airbyte.com/integrations/sources/salesforce#sandbox-accounts\">docs</a>.",
"type": "boolean",
"default": false,
"order": 1
Expand Down
53 changes: 43 additions & 10 deletions docs/integrations/sources/salesforce.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The connector uses as much rate limit as it can every day, then ends the sync ea
Note that, picking up from where it ends will work only for incremental sync.

## Getting Started (Airbyte Cloud)

#### Sandbox accounts

If you log in using at [https://login.salesforce.com](https://login.salesforce.com), then your account is not a sandbox. If you log in at [https://test.salesforce.com](https://test.salesforce.com) then it's a sandbox.
Expand All @@ -33,48 +34,79 @@ If this is Greek to you, then you are likely not using a sandbox account.

### Requirements

* Salesforce Account
* Salesforce Account with Enterprise access or API quota purchased
* Dedicated Salesforce user (optional)

**Note**: In order to tightly scope Airbyte's access to your data, we recommend creating a dedicated read-only Salesforce user that is used for Airbyte syncs. You can also further the user's (and therefore Airbyte's) access to only the data and streams you need Airbyte to replicate by creating a profile in Salesforce and assigning it to the user.

### Setup guide

#### Creating a dedicated read only Salesforce user
While you can setup the Salesforce connector using any user which has read permissions to your account, we recommend creating a dedicated, read-only user for use with Airbyte. This allows you to granularly control the data Airbyte can read.

To create a dedicated read only Salesforce user:
1. Login to Salesforce with an admin account
2. On the top right side of the screen, click the "setup" gear icon then click "Setup"
3. Under the "Administration" section on the left side of the screen, click "Users" > "Profiles"
4. Click the "new profile" button
5. Select "Read only" as the value of the "Existing Profile" field, and `Airbyte Read Only User` (or whatever name you prefer) as the profile name
6. click "Save". This should take you to the profiles page.
7. Click "edit"
8. Scroll down to the "Standard Object Permissions" and "Custom Object Permissions" and enable the "read" checkbox for objects which you would to be able to replicate via Airbyte
9. Scroll to the top and click "Save"
10. Under the "Administration" section on the left side of the screen, click "Users" > "Users".
11. Click "New User"
12. Fill out the required fields
a. In the "License" field, select `Salesforce`
b. In the "Profile" field, select `Airbyte Read Only User`
c. In the "Email" field, make sure to use an email address which you can access (this will be required later to verify the account)
13. Click "save"
14. Copy the "Username" field and keep it handy -- you will use it when setting up Airbyte later
15. Login to the email you set in step 12c above and verify your new Salesforce account user. You'll need to set a password as part of this process. Keep this password handy.
16. With the username and password, you should be ready to setup the Salesforce connector.

#### Configuring the connector in the Airbyte UI
1. Toggle whether your Salesforce account is a Sandbox account or a live account.
2. Click `Authenticate your Salesforce account` to sign in with Salesforce and authorize your account.
3. Fill in the rest of the details.
4. You should be ready to sync data.

## Getting started (Airbyte OSS)
### Requirements
* Salesforce Account
* Salesforce OAuth credentials
* Dedicated Salesforce user (optional)

**Note**: In order to tightly scope Airbyte's access to your data, we recommend creating a dedicated read-only Salesforce user that is used for Airbyte syncs. You can also further the user's (and therefore Airbyte's) access to only the data and streams you need Airbyte to replicate by creating a profile in Salesforce and assigning it to the user.
* Salesforce Account with Enterprise access or API quota purchased
* Dedicated read only Salesforce user (optional)
* Salesforce OAuth credentials

### Setup guide

#### Sandbox accounts
If you log in using at [https://login.salesforce.com](https://login.salesforce.com), then your account is not a sandbox. If you log in at [https://test.salesforce.com](https://test.salesforce.com) then it's a sandbox.

If this is Greek to you, then you are likely not using a sandbox account.

### Setup guide

#### Read only user
See the [section above](#creating-a-dedicated-read-only-salesforce-user) for creating a read only user. This step is optional.

#### Salesforce Oauth Credentials
We recommend the following [walkthrough](https://medium.com/@bpmmendis94/obtain-access-refresh-tokens-from-salesforce-rest-api-a324fe4ccd9b) **while keeping in mind the edits we suggest below** for setting up a Salesforce app that can pull data from Salesforce and locating the credentials you need to provide to Airbyte.

Suggested edits:

1. If your salesforce URL does not take the form `X.salesforce.com`, use your actual Salesforce domain name. For example, if your Salesforce URL is `awesomecompany.force.com` then use that instead of `awesomecompany.salesforce.com`.
2. When running a `curl` command, always run it with the `-L` option to follow any redirects.
3. If you created a read only user, use those credentials when logging in to generate oauth tokens

## Streams

**Note**: The connector supports reading both standard streams and Custom Objects from Salesforce.
**Note**: The connector supports reading both Standard Objects and Custom Objects from Salesforce. Each object is read as a separate stream.

See a list of all Salesforce Standard Objects [here](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm).

We fetch and handle all the possible & available streams dynamically based on:
- User Role & Permissions to read & fetch objects and their data
- Whether or not the stream has the queryable property set to true. Queryable streams are available to be fetched via the API. If you cannot see your object available via Airbyte, please ensure it is API-accessible to the user you used for authenticating into Airbyte

**Note**: Using the BULK API is not possible to receive data from the following streams:
**Note**: Using the BULK API is not possible to receive data from the following streams due to limitations from the Salesforce API. The connector will sync them via the REST API whcih will occasionally cost more of your API quota:

* AcceptedEventRelation
* AssetTokenEvent
Expand All @@ -100,6 +132,7 @@ We fetch and handle all the possible & available streams dynamically based on:

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :--- |:---------------------------------------------------------------------------------------------------------------------------------|
| 1.0.2 | 2022-03-01 | [10751](https://github.com/airbytehq/airbyte/pull/10751) | Fix broken link anchor in connector configuration |
| 1.0.1 | 2022-02-27 | [10679](https://github.com/airbytehq/airbyte/pull/10679) | Reorganize input parameter order on the UI |
| 1.0.0 | 2022-02-27 | [10516](https://github.com/airbytehq/airbyte/pull/10516) | Speed up schema discovery by using parallelism |
| 0.1.23 | 2022-02-10 | [10141](https://github.com/airbytehq/airbyte/pull/10141) | Processing of failed jobs |
Expand Down

0 comments on commit df47987

Please sign in to comment.