Salesforce Account Management


Process description

Account Management allows users to centralize all customer data, as well as all key interactions and customer service cases in order to streamline the sales process and give a clearer detail of the relationship with the client.

Account generation

Accounts are generated into Salesforce, either on demand or through an associated lead. The account is rated and qualified in order to gain a better understanding about future needs it could require.

Account relationship management

Once the account has been properly identified, tasks will be set up by the sales team in order to nurture the relationship with said Account. This is achieved through various methods of communication including meetings, calls, emails and others. The goal of this stage is to understand the clients need in order to generate proper opportunities.

Opportunity generation

The objective of this process is the generation of new opportunities. Once the client's requirements have been properly grasped and the prep work has been done, a sales opportunity is created. A properly managed Account should be generating a continuous amount of new Opportunities.

Available tags & due dates

The following tags are available by default.

Tag Description Business Value
Account owner changed multiple times Tags a case when there is more than 1 Owner Field change in the Account History object Applies for the Account entity. Reflects that the owner of that entity has been changed multiple times, which may be justified or may require attention.
Parent Account changed multiple times Tags a case when there is more than 1 Parent Field change in the Account History object Applies for the Account entity. Reflects that the ParentId of that entity has been changed multiple times, which may be a result of an improper account set up process, or could signal a possible merger of accounts.
Account without Opportunity Tags a case when no Opportunities are associated to the Account A properly handled account should be generating new Opportunities as a result of the relation development process, if this isn't the case, it could signal issues in the work done on said Account.
Account without Contact Tags a case when no Contacts are associated to the Account An Account without Contacts doesn't have a clear touch-point to develop the working relationship with, and generate Opportunities. This could signal an error in the setup of the account, or a change in the Accounts structure which led to the loss of said Contact.
Exceeding overdue tasks Tags a case when more than 20% of the case's Tasks aren't being completed in time Highlights cases where a large amount of Task aren't being completed in the proper time frame, which may require attention from the Business.
Exceeding overdue close opportunities Tags a case when more than 20% of the case's Opportunities aren't being completed in time Highlights cases were a significant amount of Opportunities are being postponed past their initial close date.

The following due dates are available by default.

Due date Description Business Value
Original Opportunity Close Date Due date calculated based on the first Expected Close date set in Salesforce for the Opportunity. Analysis on both, success cases when Opportunities were closed before expected and also when they went beyond the original close date.
Task Completion Date Due date calculated based on the expected date for finishing the task vs the actual date Used for both analysis, success cases when tasks are closed before expected date and also when they're not.

Extraction

System configuration

The data extraction is developed for Salesforce Sales Cloud.

Field history tracking

Depending on which fields have field history tracked, different change events will be recorded. Field history tracking can be configured from each object within Salesforce setup. Recommended minimal setup is having the following object and fields tracked:

By default, Field History is disabled per object. In order to setup Field History Tracking for an object, the following Salesforce manual contains a step by step instruction: Salesforce - Track Field History for Standard Objects. Please note that if a field is activated for tracking, the values will be tracked from that moment onwards. Any changes before that point in time will not be saved. As of February 2022, Salesforce retains field history data for up to 18 months through the org and up to 24 months via the API, and Field history tracking data doesn’t count towards Salesforce org’s data storage limits.

In case the history needs to be stored for a longer period of time, Field Audit Trail must be activated. This allows copying of history data into a separate big data object and allows storage for up to 10 years.

API Access

In order to connect via CData, the user establishing the connection must be API Enabled, and must have appropriate read permissions on each of the objects which are being extracted. All fields included in the input tables must be visible for the user extracting the data. In case any fields are not visible, and may not be made visible, permissions should be granted to the user, or a profile with permissions should be used to extract the data.

In order to calculate amounts using historical exchange rates, Effective dated currency should be enabled in the Salesforce org, and historical exchange rates should be loaded into the system.

System specific settings

The Salesforce Account Management app template works on the process starting with the Lead Acquisition and Account generation up to the generation of Opportunities for said account. It is a continuos process which highlights Account relationship interactions.

This includes processing of the following Salesforce transactional objects:

The following additional objects which are used to add additional attribute information into the model:

In case they are used, the following tables add Currency conversion to the model:

*CurrencyType, DatedConversionRate objects are by default disabled in Salesforce orgs. By default, these will not be considered in the transformations. If these are used, the transformation and related logic can be enabled by using DBT variables.

Extraction tool configuration

Below is a description on how to use CData Sync to set up a source connection and load data into Process Mining.

In general, you should follow the steps as described in Loading data using CData Sync (Automation Cloud) to set up data loading using CData Sync. Note: If you are using Automation Suite, make sure to select AUTOMATION SUITE as the DELIVERY option on the documentation page. In addition, select the Automation Suite version you are using to open the appropriate Loading data using CData Sync page.

Source Connection

Step Action
1 Define a New Connection of type Salesforce
2 Select Property List, Basic Auth Scheme and enter User, Password and Security Token. Use Sandbox should be setup depending on the Salesforce Org Type.
3 Under the Advanced tab, select API version to be at least 52.0.
4 Click on Connect to Salesforce to verify the connection works correctly.

Destination Connection

Step Action
1 Define a New Connection of type SQL Server or Azure blob storage
2 Setup connection details as required.

Job Configuration

Step Action
1 Create a new job using the Source and Destination connections. Name the job Salesforce_to_Destination_Connection where Destination_Connection is the type of database you will use.
2 Click on Create to save the new Job.
3 Click on the job to enter configuration specifics.
4 Click on the Advanced tab.
5 Under Destination Schema, setup the target data schema in the SQL Server or Snowflake database.
6 Enable the checkboxes Alter Schema and Drop Table and disable the other checkboxes.
7 Save all changes

Set up Environment Variables

CData allows the use of environment variables in order to drive specific extraction logic in each query.

Variable Description Comment
start_extraction_date Defines first date for which data will be extracted. Mandatory
end_extraction_date Last date for which data will be extracted.

Because the Salesforce Account Management app template uses the Account as the main case ID, consideration should be made when choosing an extraction date, as it will be used across all objects.

In order to setup the environment variables:

Step Action
1 Access the job created in the previous step.
2 Click on the Events tab.
3 Add the following lines to the Pre-Job Event script.
<!-- Modify environment variables here. --> <!-- Variable start_extraction_date must be populated.--> <api:set attr="out.env:start_extraction_date" value="2018-01-01" /> <!-- In case a specific end date is needed, replace the value string with the required date in yyyy-MM-dd format. --> <!-- i.e api:set attr="out.env:end_extraction_date" value="2022-02-01" --> <api:set attr="out.env:end_extraction_date" value="[null | now() | todate('yyyy-MM-dd')]" /> <api:push item="out" />

Important: Do not modify the api:info details that are shown by default.

In order to modify the environment variables, modify the values within the Events tab. By default, end_extraction_date will default to today's date. start_extraction_date must always be populated.

Table Replication

Once the job is correctly setup, click on Add Custom Query under the Tables tab and paste the following queries (each query needs to maintain the semicolon at the end). Make sure you save all changes.

Default Extraction

The following script is prepared for scenarios where Currency Conversions and Person Accounts are not used and are disabled. In case any of these are used, please add the scripts in the Alternative Scenarios section.

REPLICATE [Account] SELECT [Id], [AccountSource], [BillingCountry], [BillingState], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [Industry], [IsDeleted], [Name], [OwnerId], [Ownership], [ParentId], [Rating], [Type] FROM [Account] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}'); REPLICATE [AccountHistory] WITH ReplicateStartDate = '{env:start_extraction_date}', replicateenddate = '{env:end_extraction_date}' SELECT [Id], [AccountId], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [DataType], [Field], [NewValue], [OldValue] FROM [AccountHistory] WHERE (([Field] IN ('accountMerged', 'Rating', 'Type', 'Owner', 'Ownership', 'Parent')) AND ([DataType] != 'EntityId')); REPLICATE [Contact] SELECT [Id], [AccountId], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [Name], [OwnerId], [ReportsToId] FROM [Contact] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}'); REPLICATE [Lead] SELECT [Id], [ConvertedAccountId], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [Name], [OwnerId] FROM [Lead] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}'); REPLICATE [Opportunity] SELECT [Id], [AccountId], [Amount], [CloseDate], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [IsClosed], [IsWon], [LastStageChangeDate], [Name], [OwnerId] FROM [Opportunity] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}'); REPLICATE [Task] SELECT [Id], [AccountId], [ActivityDate], [CompletedDateTime], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [OwnerId], [Status], [Subject], [TaskSubtype], [Type] FROM [Task] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}') AND ([Type] IN ('Meeting', 'Call', 'Prep', 'Other', 'Email')); REPLICATE [Event] SELECT [Id], [AccountId], [CreatedById], FORMAT([EndDateTime], 'yyyy-MM-dd hh:mm:ss'), [Subject], [Type] FROM [Event] WHERE ([EndDateTime] >= '{env:start_extraction_date}') AND ([EndDateTime] <= '{env:end_extraction_date}') AND ([Type] IN ('Meeting', 'Call', 'Prep', 'Other') AND [AccountId] IS NOT NULL); REPLICATE [ContactHistory] WITH ReplicateStartDate = '{env:start_extraction_date}', replicateenddate = '{env:end_extraction_date}' SELECT [Id], [ContactId], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [DataType], [Field], [NewValue], [OldValue] FROM [ContactHistory] WHERE (([Field] IN ('Account', 'ReportsTo', 'Owner')) AND ([DataType] != 'EntityId')); REPLICATE [User] SELECT [Id], [Department], [Name], [UserType] FROM [User]; REPLICATE [OpportunityFieldHistory] WITH ReplicateStartDate = '{env:start_extraction_date}', replicateenddate = '{env:end_extraction_date}' SELECT [Id], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [CreatedById], [DataType], [Field], [NewValue], [OldValue], [OpportunityId] FROM [OpportunityFieldHistory] WHERE (([Field] = 'CloseDate' OR ([Field] = 'StageName' AND [NewValue] like 'Closed%')) AND ([DataType] != 'EntityId'));

Note regarding CData Salesforce Provider Version 21.0.8097.0 When a table has an Incremental Check Column field predefined in CData Sync, the SQL query cannot use the same date field in both statements (WITH and WHERE) at the same time. If version 21.0.8097.0 (or an older version) of CData is used, the date filtering should be done in the WHERE clause and should be removed from the WITH statement.

Alternative Scenarios

The following scenarios can be used in combination of each other:

Multi Currency and Dated Conversion Rates are enabled in Salesforce Org

In case multi currency is used in the Salesforce org, add the following queries:

REPLICATE [CurrencyType] SELECT [Id], [IsCorporate], [IsoCode] FROM [CurrencyType] WHERE [IsCorporate] = 1; REPLICATE [DatedConversionRate] SELECT [Id], [IsoCode], FORMAT([NextStartDate], 'yyyy-MM-dd hh:mm:ss') as [NextStartDate], [StartDate], [ConversionRate] FROM [DatedConversionRate];

Additionally, the Opportunity query must be changed to the following to add the CurrencyIsoCode field in the query.

REPLICATE [Opportunity] SELECT [Id], [AccountId], [Amount], [CloseDate], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate], [CurrencyIsoCode], [IsClosed], [IsWon], [LastStageChangeDate], [Name], [OwnerId] FROM [Opportunity] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}');

Person Accounts enabled in Salesforce Org

In Case Person Accounts (field IsPersonAccount) is used - replace the Accounts query with the following query. This query will add the field IsPersonAccount in the Accounts extraction.

REPLICATE [Account] SELECT [Id], [AccountSource], [BillingCountry], [BillingState], [CreatedById], FORMAT([CreatedDate], 'yyyy-MM-dd hh:mm:ss') as [CreatedDate] as CreatedDate, [Industry], [IsPersonAccount], [IsDeleted], [Name], [OwnerId], [Ownership], [ParentId], [Rating], [Type] FROM [Account] WHERE ([CreatedDate] >= '{env:start_extraction_date}') AND ([CreatedDate] <= '{env:end_extraction_date}');

Input data

Input types

The following table provides an overview of the different field types and their default format settings.

Field type Description
boolean true, false, 1, 0
date yyyy-mm-dd
datetime yyyy-mm-dd hh:mm:ss[.ms], where [.ms] is optional
double Decimal separator: . (dot); thousand separator: none
integer Thousand separator: none
text N/A

Input tables & fields

The following tables are extracted from the source system:

Account

Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).

Field Type Description
Id text Account Identifier (Primary Key)
AccountSource text The source of the account record. For example, Advertisement, Data.com, or Trade Show. The source is selected from a picklist of available values, which are set by an administrator.
BillingCountry text Details for the billing address of this account.
BillingState text Details for the billing address of this account.
CreatedById text User ID who created the account.
CreatedDate datetime Date in which the account was created.
Industry text An industry associated with this account.
IsDeleted boolean Indicates whether this account has been deleted.
IsPersonAccount boolean Indicates whether this account has a record type of Person Account (true) or not (false). This field is not available by default in Salesforce, but is setup by Salesforce when requested for B2C environments. This attribute can be enabled / disabled using the use_is_person_account DBT variable .
Name text Name of the account. If the account has a record type of Person Account: This value is the concatenation of the FirstName, MiddleName, LastName, and Suffix of the associated person contact.
OwnerId text The ID of the user who currently owns this account.
Ownership text Ownership type for the account, for example Private, Public, or subsidiary.
ParentId text ID of the parent object, if any.
Rating text The account's prospect rating, for example Hot, Warm, or Cold.
Type text Type of account, for example, Customer, Competitor, or Partner.

Filtering: CreatedDate is used for date range filtering.

AccountHistory

Represents the history of changes to the Account object.

Field Type Description
Id text Account Identifier (Primary Key)
AccountId text ID of the account associated with this account.
CreatedById text User ID who created the account.
CreatedDate datetime Date in which the account was created.
DataType text Type of change that occurred to the account.
Field text Field that changed on the account.
NewValue text New value of the field that changed on the account.
OldValue text Old value of the field that changed on the account.

Filtering: CreatedDate is used for date range filtering. Furthermore Field in ('accountMerged', 'Rating', 'Type', 'Owner', 'Ownership', 'Parent') AND ([DataType] != 'EntityId').

Contact

Represents a contact, which is a person associated with an account.

Field Type Description
Id text Contact Identifier (Primary Key)
AccountId text ID of the account associated with this contact.
CreatedById text User ID who created the contact.
CreatedDate datetime Date in which the contact was created.
Name text Name of the contact.
OwnerId text The ID of the user who currently owns this contact.
ReportsToId text ID of the contact's manager.

Filtering: CreatedDate is used for date range filtering.

ContactHistory

Represents the history of changes to the Contact object.

Field Type Description
Id text Contact Identifier (Primary Key)
ContactId text ID of the contact associated with this contact.
CreatedById text User ID who created the contact.
CreatedDate datetime Date in which the contact was created.
DataType text Type of change that occurred to the contact.
Field text Field that changed on the contact.
NewValue text New value of the field that changed on the contact.
OldValue text Old value of the field that changed on the contact.

Filtering: CreatedDate is used for date range filtering. Furthermore Field in ('Account', 'ReportsTo', 'Owner') AND (DataType != 'EntityId').

CurrencyType

Represents the currencies used by an organization for which the multicurrency feature is enabled.

Field Type Description
Id text Currency Identifier (Primary Key)
IsoCode text ISO code for the currency.
IsCorporate boolean Indicates whether this currency is a corporate currency.

Filtering: IsCorporate = 1.

DatedConversionRate

Represents the dated exchange rates used by an organization for which the multicurrency and the effective dated currency features are enabled.

Field Type Description
Id text Dated Conversion Rate Identifier (Primary Key)
ConversionRate double Conversion rate of this currency type against the corporate currency.
IsoCode text ISO code for the currency.
NextStartDate date The date on which the next effective dated exchange rate will start. Effectively the day after the end date for this exchange rate.
StartDate date The date on which the effective dated exchange rate starts.

Filtering: No filtering has to be applied.

Event

Represents an event, which is an occurrence with a duration time that you want to track, such as a meeting or a conference call.

Field Type Description
Id text Event Identifier (Primary Key)
AccountId text ID of the account associated with this event.
CreatedById text User ID who created the event.
EndDateTime datetime End date and time of the event.
Subject text Subject of the event.
Type text Type of event, for example, Meeting or Call.

Filtering: EndDateTime is used for date range filtering. Furthermore Type in ('Meeting', 'Call', 'Prep', 'Other') AND AccountId != null.

Lead

Rerpesents a prospect or potential opportunity.

Field Type Description
Id text Lead Identifier (Primary Key)
ConvertedAccountId text ID of the account that is created when the lead is converted.
CreatedById text User ID who created the lead.
CreatedDate datetime Date in which the lead was created.
Name text Name of the lead.
OwnerId text The ID of the user who currently owns this lead.

Filtering: CreatedDate is used for date range filtering.

Opportunity

Represents an opportunity, which is a sale or pending deal.

Field Type Description
Id text Opportunity Identifier (Primary Key)
AccountId text ID of the account associated with this opportunity.
Amount double Total value of the opportunity.
CloseDate date Date on which the opportunity is expected to close.
CreatedById text User ID who created the opportunity.
CreatedDate datetime Date in which the opportunity was created.
CurrencyIsoCode text ISO code for the currency.
IsClosed boolean Indicates whether the opportunity is closed.
IsWon boolean Indicates whether the opportunity is won.
LastStageChangeDate datetime Date on which the opportunity's stage was last changed.
Name text Name of the opportunity.
OwnerId text The ID of the user who currently owns this opportunity.

Filtering: CreatedDate is used for date range filtering.

OpportunityFieldHistory

Represents the history of changes to the Opportunity object.

Field Type Description
Id text Opportunity Identifier (Primary Key)
CreatedById text User ID who created the opportunity.
CreatedDate datetime Date in which the opportunity was created.
DataType text Type of change that occurred to the opportunity.
Field text Field that changed on the opportunity.
NewValue text New value of the field that changed on the opportunity.
OldValue text Old value of the field that changed on the opportunity.
OpportunityId text ID of the opportunity associated with this opportunity.

Filtering: CreatedDate is used for date range filtering. Furthermore: (Field = 'CloseDate' OR (Field = 'StageName' AND NewValue like 'Closed%')) AND DataType != 'EntityId').

Task

Represents a task, which is a single unit of work that must be done.

Field Type Description
Id text Task Identifier (Primary Key)
AccountId text ID of the account associated with this task.
ActivityDate date Date on which the task occurs.
CompletedDateTime datetime Date on which the task was completed.
CreatedById text User ID who created the task.
CreatedDate datetime Date in which the task was created.
OwnerId text The ID of the user who currently owns this task.
Status text Status of the task
Subject text Subject of the task.
TaskSubtype text Subtype of the task, for example, Call or Email.
Type text Type of task, for example, Meeting or Call.

Filtering: CreatedDate is used for date range filtering. Furthermore Type in ('Meeting', 'Call', 'Prep', 'Other', 'Email').

User

Represents each user in the organization.

Field Type Description
Id text Record Type Identifier (Primary Key).
Department text The company department associated with the user.
Name text Concatenation of FirstName and LastName.
UserType text The category of user license.

Filtering: No filtering has to be applied.


Configuring transformations

Seed files

Activity_names

In order to create the Events and Task events, an additional file, Activity_names, is added into the model which will be used for selecting the proper name of the activities. This file comes pre-populated with standard values, however, any modification must be added by the customer.

The Activity_names file includes the Activity name based on the Type and Source of the Event. Type field must match the values coming from the Type field in Task or Event tables. Source field must be populated with either 'Event' or 'Task' values, based upon the table that is used for creating that activity (Event or Task). Activity field must be populated with the desired name of the activity. The fields Type and Source are the primary keys, therefore their combination needs to be unique.

Field Type Description
Type Text Type of the event
Activity Text Name of the activity
Source Text Source of the event

Automated_users

In order to determine which activities are automated, this seed file can be used to define a list of users for which the events are automated.

Field Type Description
Automated_users Text ID of the automated user

CurrencyType

In case the multiple currency feature is not enabled, this seed file will be used to define the currencies which can be converted. This seed file is used when the dbt_variable use_currency_conversion is set to false.

Field Type Description
Id text Currency Identifier (Primary Key)
IsoCode text ISO code for the currency.
IsCorporate boolean Indicates whether this currency is a corporate currency.

DateConversionRate

In case the multiple currency feature is not enabled, this seed file will be used to define the currency conversion rates. This seed file is used when the dbt_variable use_currency_conversion is set to false.

Field Type Description
Id text Dated Conversion Rate Identifier (Primary Key)
ConversionRate double Conversion rate of this currency type against the corporate currency.
IsoCode text ISO code for the currency.
NextStartDate date The date on which the next effective dated exchange rate will start. Effectively the day after the end date for this exchange rate.
StartDate date The date on which the effective dated exchange rate starts.

Dbt variables

The connector includes a series of variables that must be configured based on the Salesforce configuration. These variables are defined in the dbt_project.yml file.

Variable Type Description
schema_sources string Specifies the schema in the database where the source tables will be located.
datetime_format string This variable is commented as default. Only uncomment when running Snowflake transformations direct from the source system.
conversion_rate_start_date string Specifies the starting date for currency conversions, when there are no prior historic exchange rates. This replaces the null value that is used in Salesforce.
use_currency_conversion boolean Defines whether the multi currency conversion will be used. This should be disabled in Salesforce Orgs where multi currency is not used. Setting this to true will enable currency conversion. Default is false.
use_is_person_account boolean Defines whether the IsPersonAccount attribute will be used. This should be disabled in Salesforce Orgs where there are no Person Accounts. Setting this to true will enable the attribute to being queried in the transformations, and will enable associated tests. Default is false.

Design specifications

Entities

The following diagram shows all entities that are used for the process.

Entity Input Data
Lead Lead
Account Account
Contact Contact
Opportunity Opportunity

Activities

Entity Activity Description
Lead Create Lead Lead is generated in the system. Identified based on the CreateDate field on the Lead object.
Account Create Account Account is generated in the system. Identified based on the CreateDate field on the Account object.
Account Merge Duplicate Account Record Indicates that two duplicate Account records were merged into a single one.
Account Change Account Owner Indicates a change in Owners of the Account.
Account Change Account Type Indicates a change in the classification or type of the Account (Enterprise, Mid-Market, etc).
Account Change Account Rating Indicates a change in the rating (Hot, Warm, Cool) of the Account.
Account Change Account Ownership Indicates a change in the Ownership classification of the Account (Private, Public, Subsidiary).
Account Update Parent account Indicates a change in the Parent account of a Subsidiary Account.
Contact Create Contact Contact is generated in the system. Identified based on the CreateDate field on the Contact object.
Contact Add Contact to Account Indicates a change in the Contact Account, implying that the contact wis now a part of this Account.
Contact Change Contact Owner Indicates a change in the Contact's Owner
Contact Update Contact relationship Indicates a change of a Contact's reporting superior, this helps to illustrate the Accounts Organization Chart.
Event Activity+Type Concatenation of the Activity name set in the seed file Activity_names.csv, and the Type field from Event table. Examples of Types: Meeting, Call, Prep, Other.
Task Create Task: Subtype Concatenation of "Create task" and the subtype of the task.
Task Complete Task: Subtype Concatenation of "Complete task" and the subtype of the task.
Opportunity Create Opportunity Opportunity is generated in the system. Identified based on the CreateDate field on the Opportunity object.
Opportunity Change Opportunity Stage to New_value Concatenation of "Change Opportunity Stage to" with the New_value field from the Opportunity Field History table.

Design details

Known limitations

CDATA Sync - Salesforce Connector Regarding CData Salesforce Provider Version 21.0.8097.0 When a table has an Incremental Check Column field predefined in CData, the SQL query cannot have both statements (WITH and WHERE) at the same time. If this is the version of CData that is being used, please remove the entire WHERE statement so the date filter done in the WITH statement works properly.

No Event Start

Salesforce does not store the start time for each change activity.

No flag to identify automated users

Salesforce does not have a field or special license for automated users. It does however have a default user named Automated Process which is used for automated processing for Salesforce changes, however any additional users such as interfaces or RPA will use normal licenses and are not differentiated by user type.

Salesforce Retention Policy

As of February 2022, Salesforce retains field history data for up to 18 months through the org and up to 24 months via the API.

In case the history needs to be stored for a longer period of time, Field Audit Trail must be activated. This allows copying of history data into a separate big data object and allows storage for up to 10 years. However, the app template needs to be adapted to use these new objects.

Troubleshooting

There are no known issues for this app template. Below is a list of common problems and their solutions.

General

Field not available in object during data extraction

Check Field Level Security in order to confirm the field is available and visible for the user profile extracting data. For CurrencyISOCode, IsPersonAccount, LastStageChangeDate check the specific issues in the following section.

Object not available during data extraction

The user profile might not have read access to the object. This can be corrected on the user profile or a different user should extract the data.

Object Specific

CurrencyIsoCode is not available when extracting data from the Opportunity object

Multi-currency is not enabled within the Salesforce org. In case this happens, the conversions should be removed from the data model. This can be achieved by adjusting the variable use_currency_conversion in the dbt_project.yml to false.

CurrencyType object is not available when extracting data

Multi-currency is not enabled within the Salesforce org. In case this happens, the conversions should be removed from the data model. This can be achieved by adjusting the variable use_currency_conversion in the dbt_project.yml to false.

DatedConversionRate object is not available when extracting data

Effective currency rate management is not enabled within the Salesforce org. In case this happens, the conversions should be removed from the data model. This can be achieved by adjusting the variable use_currency_conversion in the dbt_project.yml to false.