```markdown
![](RackMultipart20210922-4-1lag0jl_html_7cfcc0e883f91cf.png) ![](RackMultipart20210922-4-1lag0jl_html_f8aaa488af7ece8.gif)

# **Salesforce**

# Table of Contents

[Overview 3](#_Toc72841279)

[Sub Level 3](#_Toc72841280)

[Tertiary Level 3](#_Toc72841281)

# Salesforce Documentation

## Additional Documentation

1. [https://resources.docs.salesforce.com/234/latest/en-us/sfdc/pdf/api\_rest.pdf](https://resources.docs.salesforce.com/234/latest/en-us/sfdc/pdf/api_rest.pdf)

## Authentication

1. Salesforce uses Auth2 to get authentication
  1. Example

| &quot;SalesforceOptions&quot;: {&quot;TokenEndpoint&quot;: &quot;https://test.salesforce.com/services/oauth2/token&quot;, //////LIVE URL: &quot;https://login.salesforce.com/services/oauth2/token&quot;&quot;Username&quot;: &quot;{Admin}&quot;,&quot;Password&quot;: &quot;{Password}&quot;,&quot;SecurityToken&quot;: &quot;3hrpwhxzsPUxVuWk3KURw86X&quot;,&quot;ClientId&quot;: &quot;{Client ID}&quot;,&quot;ClientSecret&quot;: &quot;{Client Secret}&quot;,&quot;Url&quot;: &quot;https://{StoreName}.my.salesforce.com&quot;,&quot;access\_type&quot;: &quot;offline&quot;}, |
| --- |

2. The Connector will take care of logging into the TokenEndpoint and retrieving a session ID
  1. ![](RackMultipart20210922-4-1lag0jl_html_3f434a25168c3dff.png)
  2. ![](RackMultipart20210922-4-1lag0jl_html_6b2dfda6a9e5ecaf.png)
3. Client will need to setup a Connected app for Clarity Connect
  1. ![](RackMultipart20210922-4-1lag0jl_html_4e0539843065b52a.png)
  2. Once this is setup you will have access to the Client ID and Secret

## Salesforce

1. The Connector can be found in the Evolve QA [Here](https://dev.azure.com/clarity-ventures/CEF-Product/_git/Connect-v3?path=%2FClarityConnect.Utilities&amp;version=GBsupport%2Fclients%2Fevolve%2Fqa&amp;_a=contents)
2. Everything is accessible from the rest API
3. Salesforce uses filters to refine searches for list requests
  1. Filters can be found in the Object
4. Connector is currently configured to go to this /services/data/v51.0/sobjects/
  1. ![](RackMultipart20210922-4-1lag0jl_html_cb44732b9299aa9d.png)
  2. We may want to make this Dynamic or may need to be changed if Client is using different version of the API
5. Any field that is followed by &quot;\_\_c&quot; is custom field
  1. Anything followed by &quot;\_\_r&quot; is a custom object
6. Salesforce requires that fields you wish to be returned are entered into the URL
  1. Connect is configured to do this for every field in a model

| /services/data/v51.0/sobjects/Account/1?fields=id,Name,Description |
| --- |

## Jobs

### Accounts

1. Accounts will primarily be using &quot;Where LastModifiedDate \&gt; {CompareDate}&quot; Filter to find recently updated accounts
  1. ![](RackMultipart20210922-4-1lag0jl_html_84a16c3d0935356f.png)
2. Here is an example of updating a Salesforce account
  1. ![](RackMultipart20210922-4-1lag0jl_html_b30ef608a8b8852e.png)

### Invoices/Sales Orders

1. Salesforce generally doesn&#39;t have support for invoices
  1. An Opportunity can be used as both an Invoice and a Sales Order inside of Salesforce
2. Invoices may require more specific filter depending on Client requests
  1. ![](RackMultipart20210922-4-1lag0jl_html_a62183e20804af4e.png)

## Salesforce UI

1. The most important tool will be the Object Manager
  1. This is found by clicking on setup
  2. ![](RackMultipart20210922-4-1lag0jl_html_28c08d460ba133ca.png)
  3. Then Followed by clicking on Object Manager
  4. ![](RackMultipart20210922-4-1lag0jl_html_9bfd55cc85221b5a.png)
  5. ![](RackMultipart20210922-4-1lag0jl_html_c10fad17dd680c19.png)
  6. Now this will show all objects available
2. Once you click on the label of the object you can then see the details
3. Click on Fields &amp; Relationships will give you a detailed list of all the property in that object
  1. ![](RackMultipart20210922-4-1lag0jl_html_dbb81238289a7830.png)
4. If problems occur getting back data from the endpoint for the field, check the field level security
  1. Click field level security inside the field length
  2. You should see the set field level security button
  3. Be sure that the system administrator checkbox is visible
  4. ![](RackMultipart20210922-4-1lag0jl_html_a7e1be472cb9c3cd.png)

###

![](RackMultipart20210922-4-1lag0jl_html_e88609ec417d0bb8.jpg)©Clarity Ventures, Inc. Confidential- Page | 3
```