• Public
  • Public/Protected
  • All


Type aliases


HttpMethod: "get" | "GET" | "post" | "POST" | "patch" | "PATCH" | "delete" | "DELETE" | "head" | "HEAD"


SalesforceAddress: { city: string | null; country: string | null; geocodeAccuracy: null; latitude: number | null; longitude: number | null; postalCode: string | null; state: string | null; street: string | null }

Type declaration

  • city: string | null
  • country: string | null
  • geocodeAccuracy: null
  • latitude: number | null
  • longitude: number | null
  • postalCode: string | null
  • state: string | null
  • street: string | null


SalesforceId: string

A helper type to inform when a string is expected to be a valid Salesforce ID.


SalesforceRelatedSourceObject: { getRelatedOpportunities: any; getRelatedTasks: any }

A Salesforce object that has a parent-child relationship to Opportunity and Task objects.

Type declaration


SalesforceRestApiResponse<T>: { data: T; status: number }

Response type for REST API requests.

Type parameters

  • T = unknown

    The type of REST API data being retrieved.

Type declaration

  • data: T

    Response data.

  • status: number

    Response HTTP status code.


SalesforceSearchQuery: { emailAddress?: string; limit?: number; objectType?: SearchableObjectType; phoneNumber?: string; text?: string }

Defines a search query.

Type declaration

  • Optional emailAddress?: string

    When provided, specifies that the query search email fields.

  • Optional limit?: number

    Specifies the maximum number of results returned (defaults to 10).

  • Optional objectType?: SearchableObjectType

    Restricts the query to search only the provided Salesforce object type (defaults to searching both Account and Contact objects).

  • Optional phoneNumber?: string

    When provided, specifies that the query search phone number fields.

  • Optional text?: string

    Free text value that when provided, specifies that the query search all fields.


Return type for search queries. The objectType property is the discriminator for the union.


SearchableObjectType: Account | Contact

Defines the types of Salesforce objects that can be searched for.


Const connect

  • connect(salesforceOrgUrl: string, consumerKey: string, isSandbox?: boolean): Promise<SalesforceConnection>
  • Establishes a connection with a Salesforce org. Requires that a Connected App has been registered with the Salesforce org.

    In order for the user to authorize the app, a window is opened to the auth endpoint of the Salesforce org. The user logs in and then authorizes the app to access their Salesforce data, at which point the promise resolves with a connection object.

    If an existing connection exists that is still valid, that connection will be returned without the user having to re-auth.

    If the authorization process is not completed successfully for any reason, or if a connection cannot be established to the Salesforce org, an error will be thrown.


    AuthorizationError Thrown if the authorization process does not complete successfully.


    ConnectionError Thrown if a connection cannot be established to the Salesforce org after authorization.


    ParameterError Thrown if invalid function parameter values are detected.


    • salesforceOrgUrl: string

      The URL of the Salesforce org to connect to (ending in "salesforce.com").

    • consumerKey: string

      The Consumer Key of the Connected App to use for authorization.

    • isSandbox: boolean = false

      Set to true if the Salesforce org is a sandbox.

    Returns Promise<SalesforceConnection>

    A promise resolving to a connection which can be used to retrieve data and execute requests against the Salesforce org.

Const disableLogging

  • disableLogging(): void
  • Disables module logging if it has been enabled by a call to enableLogging.

    Note: this function is also registered globally at window.fin.Integrations.Salesforce.disableLogging.

    Returns void

Const enableLogging

  • enableLogging(): void
  • Enables module logging to the console for debugging/troubleshooting purposes. This is off by default.

    Note: this function is also registered globally at window.fin.Integrations.Salesforce.enableLogging.

    Returns void

Const getConnection

  • getConnection(salesforceOrgUrl: string, consumerKey: string): Promise<null | SalesforceConnection>
  • Retrieves an existing connection with a Salesforce org, created using the connect function.

    The same org URL and consumer key values must be specified as was used when the connection was established, otherwise the connection will not be found.


    • salesforceOrgUrl: string

      The URL of the connected Salesforce org.

    • consumerKey: string

      The consumer key of the Connected App used to connect.

    Returns Promise<null | SalesforceConnection>

    A promise resolving to the existing connection, or null if no existing connection is found.


  • Function
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Enumeration
  • Class

Generated using TypeDoc