Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

HttpMethod

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

SalesforceAddress

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

SalesforceId: string

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

SalesforceObject

SalesforceObject<T>: T extends Account ? SalesforceAccount : T extends Contact ? SalesforceContact : T extends Opportunity ? SalesforceOpportunity : T extends Task ? SalesforceTask : SalesforceObjectBase<T>

Conditional type for selecting the most relevant type for the provided Salesforce object type.

Type parameters

  • T: string = string

    The type of the Salesforce object (e.g. Account/Contact/etc. Prefer SalesforceObjectType enum to string for known types).

SalesforceRelatedSourceObject

SalesforceRelatedSourceObject: { getRelatedOpportunities: any; getRelatedTasks: any }

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

Type declaration

SalesforceRestApiAccountSObject

SalesforceRestApiAccountSObject: SalesforceRestApiSObjectBase & { AccountNumber: string | null; AccountSource: string | null; AnnualRevenue: number | null; BillingAddress: SalesforceAddress | null; BillingCity: string | null; BillingCountry: string | null; BillingGeocodeAccuracy: string | null; BillingLatitude: number | null; BillingLongitude: number | null; BillingPostalCode: string | null; BillingState: string | null; BillingStreet: string | null; CleanStatus: SalesforceCleanStatus | null; CreatedDate: string | null; Description: string | null; DunsNumber: string | null; Fax: string | null; Industry: string | null; IsDeleted: boolean; Jigsaw: string | null; LastActivityDate: string | null; LastReferencedDate: string | null; LastViewedDate: string | null; MasterRecordId: SalesforceId | null; NaicsCode: string | null; NaicsDesc: string | null; Name: string; NumberOfEmployees: number | null; OperatingHoursId: SalesforceId | null; OwnerId: SalesforceId; Ownership: string; ParentId: SalesforceId | null; Phone: string; PhotoUrl: string | null; Rating: string; ShippingAddress: SalesforceAddress | null; ShippingCity: string | null; ShippingCountry: string | null; ShippingGeocodeAccuracy: string | null; ShippingLatitude: number | null; ShippingLongitude: number | null; ShippingPostalCode: string | null; ShippingState: string | null; ShippingStreet: string | null; Sic: string | null; SicDesc: string | null; Site: string | null; SystemModstamp: string | null; TickerSymbol: string | null; Tradestyle: string | null; Type: string | null; Website: string | null; YearStarted: string | null }

SalesforceRestApiBatchRequest

SalesforceRestApiBatchRequest: { batchRequests: SalesforceRestApiBatchSubrequest[] }

Type declaration

SalesforceRestApiBatchResponse

SalesforceRestApiBatchResponse: { hasErrors: boolean; results: SalesforceRestApiBatchSubrequestResponse[] }

Type declaration

SalesforceRestApiBatchSubrequest

SalesforceRestApiBatchSubrequest: { method: HttpMethod; url: string }

Type declaration

SalesforceRestApiBatchSubrequestResponse

SalesforceRestApiBatchSubrequestResponse: { result: any; statusCode: number }

Type declaration

  • result: any
  • statusCode: number

SalesforceRestApiContactSObject

SalesforceRestApiContactSObject: SalesforceRestApiSObjectBase & { AccountId: SalesforceId | null; AssistantName: string | null; AssistantPhone: string | null; Birthdate: string | null; CleanStatus: SalesforceCleanStatus | null; Department: string | null; Description: string | null; Email: string | null; EmailBouncedDate: string | null; EmailBouncedReason: string | null; Fax: string | null; FirstName: string; HomePhone: string | null; IndividualId: SalesforceId | null; IsDeleted: boolean; IsEmailBounced: boolean; Jigsaw: string; LastActivityDate: string | null; LastName: string; LastReferencedDate: string | null; LastViewedDate: string | null; LeadSource: string | null; MailingAddress: SalesforceAddress | null; MailingCity: string | null; MailingCountry: string | null; MailingGeocodeAccuracy: string | null; MailingLatitude: number | null; MailingLongitude: number | null; MailingPostalCode: string | null; MailingState: string | null; MailingStreet: string | null; MasterRecordId: SalesforceId | null; MobilePhone: string | null; Name: string; OtherAddress: SalesforceAddress | null; OtherCity: string | null; OtherCountry: string | null; OtherGeocodeAccuracy: string | null; OtherLatitude: number | null; OtherLongitude: number | null; OtherPhone: string | null; OtherPostalCode: string | null; OtherState: string | null; OtherStreet: string | null; OwnerId: SalesforceId; Phone: string | null; PhotoUrl: string | null; ReportsToId: SalesforceId | null; Salutation: string; Title: string | null }

SalesforceRestApiOpportunitySObject

SalesforceRestApiOpportunitySObject: SalesforceRestApiSObjectBase & { AccountId: SalesforceId | null; Amount: number | null; CampaignId: SalesforceId | null; CloseDate: string; ContactId: SalesforceId | null; Description: string | null; ExpectedRevenue: number | null; Fiscal: string | null; FiscalQuarter: number | null; FiscalYear: number | null; ForecastCategory: string; ForecastCategoryName: string | null; HasOpenActivity: boolean; HasOpportunityLineItem: boolean; HasOverdueTask: boolean; IsClosed: boolean; IsDeleted: boolean; IsWon: boolean; LastActivityDate: string | null; LastAmountChangedHistoryId: SalesforceId | null; LastCloseDateChangedHistoryId: SalesforceId | null; LastReferencedDate: string | null; LastStageChangeDate: string | null; LastViewedDate: string | null; LeadSource: string | null; Name: string; NextStep: string | null; OwnerId: SalesforceId | null; Pricebook2Id: SalesforceId | null; Probability: number | null; StageName: string; TotalOpportunityQuantity: number | null; Type: string | null }

SalesforceRestApiQueryResults

SalesforceRestApiQueryResults<T>: { done: boolean; records: SalesforceRestApiSObject<T>[]; totalSize: number }

Type parameters

  • T: string

Type declaration

SalesforceRestApiResponse

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.

SalesforceRestApiSObject

Type parameters

  • T: string = string

SalesforceRestApiSObjectAttributes

SalesforceRestApiSObjectAttributes: { type: string; url: string }

Type declaration

  • type: string
  • url: string

SalesforceRestApiSObjectBase

SalesforceRestApiSObjectBase: { Id: string; attributes: SalesforceRestApiSObjectAttributes }

Type declaration

SalesforceRestApiSearchResults

SalesforceRestApiSearchResults: { searchRecords: SalesforceRestApiSObjectBase[] }

Type declaration

SalesforceRestApiTaskSObject

SalesforceRestApiTaskSObject: SalesforceRestApiSObjectBase & { AccountId: SalesforceId | null; ActivityDate: string | null; CallDisposition: string | null; CallDurationInSeconds: number | null; CallObject: string | null; CallType: string | null; CompletedDateTime: string | null; Description: string | null; IsArchived: boolean; IsClosed: boolean; IsHighPriority: boolean; IsRecurrence: boolean; IsReminderSet: boolean; OwnerId: SalesforceId; Priority: string; RecurrenceActivityId: SalesforceId | null; RecurrenceDayOfMonth: number | null; RecurrenceDayOfWeekMask: number | null; RecurrenceEndDateOnly: string | null; RecurrenceInstance: SalesforceRecurrenceInstance | null; RecurrenceInterval: number | null; RecurrenceMonthOfYear: string | null; RecurrenceRegeneratedType: SalesforceRecurrenceRegeneratedType | null; RecurrenceStartDateOnly: string | null; RecurrenceTimeZoneSidKey: string | null; RecurrenceType: string | null; ReminderDateTime: string | null; Status: string; Subject: string | null; TaskSubtype: SalesforceTaskSubtype | null; WhatId: SalesforceId | null; WhoId: SalesforceId | null }

Functions

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.

    throws

    AuthorizationError Thrown if the authorization process does not complete successfully.

    throws

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

    throws

    ParameterError Thrown if invalid function parameter values are detected.

    Parameters

    • 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

  • 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.

    Parameters

    • 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.

Const getObjectUrl

  • Gets the URL to an object's detail page.

    Parameters

    Returns string

    Object detail page URL.

Generated using TypeDoc