0% found this document useful (0 votes)
8 views

Saleaforce Admin IQA

The document outlines key concepts in Salesforce, including the differences between Roles and Profiles, the purpose of Permission Sets, and the use of Sharing Rules. It also describes a complex scenario involving Apex and Visualforce for a travel package customization solution, strategies for handling large data volumes, troubleshooting data issues, and implementing automated features to improve business operations. Additionally, it provides a step-by-step guide for creating a Workflow Rule to send email alerts for high-value opportunities.

Uploaded by

sudheer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Saleaforce Admin IQA

The document outlines key concepts in Salesforce, including the differences between Roles and Profiles, the purpose of Permission Sets, and the use of Sharing Rules. It also describes a complex scenario involving Apex and Visualforce for a travel package customization solution, strategies for handling large data volumes, troubleshooting data issues, and implementing automated features to improve business operations. Additionally, it provides a step-by-step guide for creating a Workflow Rule to send email alerts for high-value opportunities.

Uploaded by

sudheer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 12

Salesforce Admin:-

1. Explain the difference between Roles and Profiles in Salesforce.


Roles
Purpose: Roles primarily control the level of visibility and access users have to the organization’s data.
They are used to create a hierarchy for data access.
Hierarchy: Roles define the user's position in the role hierarchy, which determines the data they can view
and edit based on their position relative to other users in the hierarchy. Users higher up in the hierarchy
can see the data owned by users lower down.
Data Sharing: Roles affect record-level access through sharing rules and the role hierarchy.
Usage Example: If a sales manager should see all opportunities owned by their sales representatives, you
would set up a role hierarchy where the sales manager role is above the sales representative role.
Profiles
Purpose: Profiles control what users can do within Salesforce. They determine the permissions and
settings that are specific to the functionality and data users can access.
Permissions: Profiles govern permissions such as what apps, tabs, and objects users can access, as well
as what actions they can perform on those objects (create, read, edit, delete).
Field-Level Security: Profiles also control field-level security, which specifies the visibility and editability
of individual fields within objects.
Page Layouts: Profiles can determine the page layouts that users see, which affects how information is
presented to them.
Usage Example: If a user should have the ability to create, read, and edit opportunities but not delete
them, these permissions would be set in their profile.

2. What are Permission Sets and why are they used?


Permission Sets are used to grant additional permissions to users on top of what is defined in their
profile. They are a way to extend user access without needing to create new profiles.
A Permission Set includes permissions related to apps, objects, fields, and system settings. They can be
assigned to one or multiple users.
Permission Sets allow for more granular control of user permissions. Instead of creating multiple profiles
for slight variations in permissions, you can use Permission Sets to handle specific needs.
Managing permissions through profiles alone can become cumbersome as the number of roles and
variations in permissions increases. Permission Sets simplify this by allowing you to layer permissions on
top of existing profiles.
They can be used to grant temporary access to certain features or objects. For example, if a user needs
temporary access to a particular object for a specific project, you can assign a Permission Set and then
remove it once the project is completed.
When users change roles or are assigned to special projects, Permission Sets can quickly grant the
necessary permissions without altering their primary profile.
Permission Sets help in maintaining compliance and security by giving only the necessary permissions to
users and keeping the base profile permissions minimal.
3. Can you explain the concept of Sharing Rules and their use cases?
Sharing Rules are used to grant additional record access to users or groups of users who wouldn’t have
access through their roles or profiles. This is particularly useful in cases where certain data needs to be
shared across departments, teams, or user groups.
Sharing Rules determine which records users can view or edit, without changing the baseline
permissions set by profiles. They provide record-level access, adding another layer to Salesforce's
security model.
Types of Sharing Rules
Owner-Based Sharing Rules: These rules grant access to records based on record ownership
Criteria-Based Sharing Rules: These rules grant access based on field values in records.

4. Describe a complex scenario where you used Apex and Visualforce


to solve a business problem.
Business Problem
 Customization: Customers needed a way to customize their travel packages online.
 Real-Time Pricing and Availability: The system needed to provide real-time pricing and
availability information for flights, hotels, car rentals, and activities.
 Booking and Payment: The platform needed to handle bookings and integrate with payment
gateways.
 Backend Integration: The solution required integration with third-party services for real-time
data and an internal CRM for managing customer data and bookings.
Solution
 To address these challenges, we used Apex and Visualforce to create a dynamic, user-friendly
solution. Here’s how it was implemented:

Solution Design
Custom Objects and Fields:
 Created custom objects for Travel Package, Flight, Hotel, Car Rental, Activity, and Booking.
 Each object had fields to store relevant information like pricing, availability, and customer
preferences.
Visualforce Pages:
 Package Customization Page: A Visualforce page allowed customers to select and customize their
travel package. This page dynamically displayed options for flights, hotels, car rentals, and
activities based on real-time data.
 Pricing and Availability: Embedded Apex controllers fetched real-time pricing and availability
data from third-party APIs.
 Booking Page: A Visualforce page to handle the booking process, collecting customer
information, and processing payments.
Apex Controllers:
 Real-Time Data Fetching: Apex controllers were used to integrate with third-party APIs to fetch
real-time data for flights, hotels, car rentals, and activities. This data was displayed on the
Visualforce pages.
 Custom Business Logic: Implemented custom logic in Apex to calculate total package costs, apply
discounts, and handle special requests.
 Booking Management: Apex code to create booking records, update availability, and send
confirmation emails to customers.
Integration with Payment Gateway:
 Used Apex to integrate with a payment gateway API. The Booking page collected payment details
and processed payments securely.
 Implemented error handling to manage payment failures and provide feedback to customers.
Data Sync with CRM:
 Developed scheduled Apex jobs to synchronize booking and customer data between the travel
platform and the internal CRM system.
 Ensured data consistency and real-time updates for travel agents to manage and track bookings.
Implementation Steps
 Custom Object Creation: Defined custom objects and fields in Salesforce to store travel package
details.
 Visualforce Page Development: Designed and developed Visualforce pages for package
customization and booking, ensuring they were user-friendly and responsive.
 Apex Controller Development: Wrote Apex controllers to handle the logic for fetching data,
processing customizations, and managing bookings.
 API Integration: Integrated with third-party services for real-time data using Apex HTTP callouts.
 Payment Integration: Implemented secure payment processing through a payment gateway.
 Testing and Deployment: Thoroughly tested the solution in a sandbox environment before
deploying it to production.
5. How do you handle large data volumes in Salesforce?
1. Data Modeling
 Custom Objects and Fields: Optimize your data model by using custom objects and fields
efficiently. Avoid unnecessary fields and objects to reduce data complexity.
 Lookups vs. Master-Detail Relationships: Use lookup relationships instead of master-detail
relationships when possible to avoid cascading deletes and sharing recalculations.
 Indexes: Use custom indexes to speed up query performance. Salesforce automatically indexes
some fields like record IDs, foreign keys, audit dates (such as CreatedDate), and lookup/master-
detail fields.
2. Data Archiving
 Archive Old Data: Move old or unused data to external storage solutions or Salesforce's Big
Objects to keep your operational data volume manageable.
 Data Retention Policies: Implement data retention policies to regularly archive or delete
outdated records.
3. Data Query Optimization
 Selective Queries: Ensure your SOQL queries are selective. A selective query is one that filters on
an indexed field and returns a small subset of data.
 Avoid Large Data Sets: Avoid queries that return large data sets. Use filters and limits to reduce
the number of records returned.
 SOQL Best Practices: Use efficient SOQL queries, such as avoiding SELECT *, using WHERE
clauses, and leveraging indexed fields in your queries.
4. Data Loading and Processing
 Batch Apex: Use Batch Apex to process large numbers of records asynchronously. This allows you
to process records in manageable chunks.
 Queueable Apex: For operations that require chaining jobs, use Queueable Apex for more
granular control over job execution.
 Scheduled Apex: Schedule Apex jobs to run during off-peak hours to avoid performance issues
during peak times.
 Data Loader and Bulk API: Use the Data Loader and Bulk API for inserting, updating, and deleting
large volumes of data. These tools are optimized for handling large data sets efficiently.
5. Data Storage Management
 Big Objects: Use Salesforce Big Objects to store and manage large data volumes that need to be
retained for a long time but do not require frequent access.
 External Objects: Use Salesforce Connect to access data stored in external systems without
copying it into Salesforce. External objects allow you to access large data sets without consuming
Salesforce storage.
6. Data Partitioning
 Divisions: Use Divisions to partition data logically within your organization. This can help improve
the performance of reports, dashboards, and list views by restricting the amount of data they
need to process.
 Skinny Tables: Use Skinny Tables to improve performance for frequently used queries and
reports. Skinny tables contain a subset of fields from a standard or custom object and are kept in
sync with the source table.
7. Data Backup and Recovery
 Regular Backups: Implement a regular data backup strategy using tools like Salesforce's native
backup solutions or third-party backup services.
 Data Recovery: Have a data recovery plan in place to restore data in case of accidental deletion
or corruption.
8. Monitoring and Maintenance
 Monitor Performance: Use tools like Salesforce's Lightning Experience Performance Profiler,
Salesforce Optimizer, and Event Monitoring to track and optimize the performance of your org.
 Regular Maintenance: Regularly review and maintain your data model, indexes, and archiving
policies to ensure optimal performance.

6. Describe a situation where you had to troubleshoot a complex data


issue. How did you approach and resolve it?
Situation: Data Integrity Issue in a Custom Report
Background
At Amadeus Travel Group, we had a custom report that tracked customer bookings, cancellations, and
modifications across various travel packages. The report was critical for our sales and operations teams
to monitor business performance. However, users started noticing discrepancies in the report data, such
as missing bookings and incorrect cancellation counts.

Problem Identification
The first step was to understand the nature and scope of the problem:
 User Reports: Multiple users reported inconsistencies in the report data. Some bookings were
missing, and cancellation numbers were higher than expected.
 Impact Assessment: The issue affected decision-making for sales and operations, as the report
was used to track key performance metrics.
Approach and Troubleshooting Steps
Gather Information
 User Feedback: Collected detailed feedback from users about the specific issues they observed,
including examples of missing or incorrect data.
 Historical Data: Reviewed historical data to understand when the discrepancies started
appearing.
Analyze the Report Logic
 Report Filters and Criteria: Examined the report filters, criteria, and groupings to ensure they
were set up correctly.
 Underlying Data Model: Analyzed the custom objects and fields used in the report to identify any
potential data model issues.
Data Verification
 Sample Records: Pulled sample records directly from the database using SOQL queries to
compare against the report data.
 Audit Trails: Checked Salesforce audit trails and field history tracking to identify any recent
changes to the data model, report definitions, or data imports.
Identify Data Discrepancies
 Data Quality Checks: Ran data quality checks to identify patterns in the missing or incorrect data.
This included looking for null values, duplicate records, and inconsistent data formats.
 Integration Logs: Reviewed logs from integrations with third-party systems (e.g., booking
platforms) to ensure data was being imported correctly.
Root Cause Analysis
 Data Import Processes: Investigated the processes and Apex classes responsible for importing
booking data. Found that a recent change to an Apex trigger inadvertently excluded certain
booking types.
 Report Logic: Discovered that the report logic did not account for certain edge cases, such as
bookings modified multiple times within a short period.
Resolution
Fix the Data Import Process
 Apex Trigger Adjustment: Modified the Apex trigger to correctly handle all booking types. Added
unit tests to ensure this issue would not recur.
 Data Reload: Re-imported the affected booking records to correct the historical data.
Update Report Logic
 Enhance Report Filters: Adjusted the report filters and criteria to correctly account for all
booking and cancellation scenarios.
 Include Edge Cases: Updated the report logic to handle edge cases, such as multiple
modifications of the same booking.
Data Validation and User Testing
 Data Validation: Performed extensive data validation to ensure the report data was accurate.
This included cross-checking report results with raw data extracted via SOQL queries.
 User Testing: Conducted a user acceptance testing (UAT) session with key users to verify the
accuracy and completeness of the updated report.
Implement Monitoring
 Automated Alerts: Set up automated alerts to notify admins of any future discrepancies in
booking and cancellation data.
 Regular Audits: Scheduled regular audits of the data and report logic to catch potential issues
early.
7. Explain a time when you implemented a new feature or process
that significantly improved business operations.
Scenario: Implementing Automated Travel Package Recommendations
Background
Amadeus Travel Group wanted to enhance their customer experience by providing personalized travel
package recommendations based on customer preferences and booking history. The existing process was
manual, with travel agents manually suggesting packages to customers. This process was time-
consuming, inconsistent, and did not scale well.

Business Problem
 Scalability: The manual recommendation process was not scalable, especially during peak
seasons.
 Consistency: Recommendations varied in quality and relevance depending on the travel agent’s
experience and knowledge.
 Customer Experience: Customers wanted quicker, more personalized recommendations without
waiting for travel agent intervention.
Solution
To address these challenges, I proposed and implemented an automated travel package
recommendation system using Salesforce, leveraging machine learning and data analytics.

Solution Design and Implementation


Data Collection and Preparation
 Customer Data: Gathered customer data, including booking history, preferences, and feedback.
 Package Data: Collected detailed information about available travel packages, including
destinations, activities, and pricing.
 Data Cleaning: Cleaned and preprocessed the data to ensure consistency and accuracy.
Machine Learning Model
 Algorithm Selection: Selected a collaborative filtering algorithm to analyze customer preferences
and booking patterns.
 Model Training: Trained the machine learning model using historical data to identify patterns and
generate recommendations.
 Integration: Integrated the model with Salesforce using Apex and Salesforce Einstein.
Custom Visualforce Page
 User Interface: Developed a Visualforce page where customers could input their preferences and
view personalized travel package recommendations.
 Real-Time Recommendations: The Visualforce page called an Apex controller that interfaced
with the machine learning model to provide real-time recommendations.
 User Feedback: Included functionality for customers to provide feedback on recommendations
to further improve the model.
Backend Automation
 Scheduled Jobs: Implemented scheduled Apex jobs to retrain the machine learning model
periodically with new data.
 Data Sync: Ensured continuous synchronization of customer and package data between the
internal CRM and the recommendation system.
Implementation Steps
 Data Preparation: Extracted and cleaned historical booking data and customer preferences.
 Model Development: Worked with a data science team to develop and train the
recommendation model.
 Salesforce Integration: Integrated the model with Salesforce using Apex and Visualforce.
 User Interface Development: Developed a Visualforce page for customer interaction and
feedback.
 Testing and Validation: Conducted extensive testing with sample data to validate the accuracy
and relevance of the recommendations.
 User Training: Trained travel agents and customer service representatives on the new system and
gathered initial feedback.

8. Create a Workflow Rule that sends an email alert when a high-value


opportunity is closed.
Step 1: Define the Criteria for High-Value Opportunities
 High-Value Criteria: Assume a high-value opportunity is defined as one with an amount greater
than $100,000.
 Closed Opportunity: An opportunity is considered closed when the Stage field is set to Closed
Won or Closed Lost.
Step 2: Create the Email Template
Navigate to Email Templates:
 Go to Setup.
 Enter Email Templates in the Quick Find box, then select Classic Email Templates (or Lightning
Email Templates if using Lightning Experience).
Create a New Email Template:
 Click New Template.
 Select the type of email template you want to create (e.g., Text, HTML (using Classic Letterhead),
Custom (without using Classic Letterhead), or Visualforce).
 Fill in the necessary details:
 Folder: Choose the appropriate folder.
 Available For Use: Check this box.
 Email Template Name: High-Value Opportunity Closed Notification.
 Subject: High-Value Opportunity Closed: {!Opportunity.Name}.
 HTML Body (or Text Body for text templates): Write the body of your email, using merge fields as
needed. For example:
code
Dear {!User.Name},
A high-value opportunity has been closed.
Opportunity Details:
- Name: {!Opportunity.Name}
- Amount: {!Opportunity.Amount}
- Stage: {!Opportunity.StageName}
- Close Date: {!Opportunity.CloseDate}
Regards,
Your Salesforce Team
Step 3: Create the Workflow Rule
Navigate to Workflow Rules:
 Go to Setup.
 Enter Workflow Rules in the Quick Find box, then select Workflow Rules.
Create a New Workflow Rule:
 Click New Rule.
 Select Opportunity as the object.
 Click Next.
Define Rule Criteria:
 Rule Name: High-Value Opportunity Closed.
 Evaluation Criteria: Select created, and any time it’s edited to subsequently meet criteria.
 Rule Criteria: Define the criteria as follows:
 Field: Amount
 Operator: greater than
 Value: 100000
 Add a second criterion:
 Field: Stage
 Operator: equals
 Value: Closed Won (or Closed Lost if you want to include both closed stages).
 The criteria should be set as an AND condition, meaning both conditions must be met for the
rule to trigger.

Step 4: Add Workflow Actions


Add an Immediate Workflow Action:
 Under Immediate Workflow Actions, click Add Workflow Action.
 Select New Email Alert.
Configure the Email Alert:
 Description: High-Value Opportunity Closed Alert.
 Unique Name: High_Value_Opportunity_Closed_Alert.
 Email Template: Select the email template you created earlier.
 Recipient Type: Choose the recipient(s) for the email alert. You can select Related User, Owner,
Role, Role and Subordinates, etc. Add the desired recipients.
 Save the email alert configuration.
Step 5: Activate the Workflow Rule
Activate the Rule:
 After adding the email alert action, click Done.
 Click Activate to activate the workflow rule.

9. Set up a custom object and create a Master-Detail relationship with


another object.
Scenario
Let's say we want to create a custom object called Project and link it with the Account object in a Master-
Detail relationship. This means that each Project is associated with an Account, and if the Account is
deleted, the associated Project records are also deleted.

Step 1: Create the Custom Object


Navigate to Object Manager:
 Go to Setup.
 Enter Object Manager in the Quick Find box, then select Object Manager.
Create a New Custom Object:
 Click Create in the top right corner and select Custom Object.
 Fill in the details for your custom object:
 Label: Project
 Plural Label: Projects
 Object Name: Project
 Record Name: Project Number
 Data Type: Auto Number (or Text if you prefer manual entry)
 Display Format: PROJ-{0000} (for Auto Number)
 Starting Number: 1 (for Auto Number)
 Optional Features: Check the features you need, such as Allow Reports, Allow Activities, and
Track Field History.
 Object Creation Options: Check Launch New Custom Tab Wizard after saving this custom object.
 Click Save.
Create a Custom Tab for the Object:
 Choose a Tab Style for your custom object.
 Click Next.
 Choose the profiles for which the tab should be available.
 Click Next, then Save.
Step 2: Create the Master-Detail Relationship
Navigate to the Fields & Relationships Section:
 In Object Manager, select the Project object you just created.
 Click on Fields & Relationships in the left-hand menu.
Create a New Field:
 Click New.
 Select Master-Detail Relationship as the data type.
 Click Next.
Choose the Related Object:
 Select Account as the related object.
 Click Next.
Define the Relationship:
 Field Label: Account
 Field Name: Account
 Related List Label: Projects
 Child Relationship Name: Projects
 Click Next.
Set Field-Level Security:
 Set the field-level security as needed.
 Click Next.
Add to Page Layouts:
 Choose the page layouts that should include this relationship field.
 Click Next.
Custom Related List Label:
 Optionally, customize the related list label on the Account object.
 Click Save.
Step 3: Verify the Relationship
Account Page Layout:
 Go to an Account record and verify that you see the Projects related list.
Project Record:
 Create a new Project record and ensure you can select an Account in the master-detail field.

10. Implement a validation rule to ensure a field meets certain criteria


before saving.
Scenario
Let's say we have a custom object called Job_Application__c, and we want to implement a validation rule
on the Years_of_Experience__c field to ensure that the value entered is a positive number and less than
or equal to 30.

Step-by-Step Guide to Implementing the Validation Rule


Navigate to Object Manager:
 Go to Setup.
 Enter Object Manager in the Quick Find box, then select Object Manager.
Select the Object:
 Click on Job_Application__c (or your custom object name).
Create a Validation Rule:
 In the left-hand menu, click on Validation Rules.
 Click New Validation Rule.
Define the Validation Rule:
 Rule Name: Positive_Years_of_Experience
Error Condition Formula:
 Enter the formula to validate the Years_of_Experience__c field. The formula should return True if
the condition is violated (i.e., the value is not positive or exceeds 30).
 Formula: AND(ISBLANK(Years_of_Experience__c) = false, OR( Years_of_Experience__c <= 0,
Years_of_Experience__c > 30 ))
 Explanation of the formula:
 ISBLANK(Years_of_Experience__c) = false: Ensures the field is not blank.
 Years_of_Experience__c <= 0: Checks if the value is not a positive number.
 Years_of_Experience__c > 30: Checks if the value exceeds 30.
Error Message:
 Error Message: Please enter a positive number for Years of Experience (between 1 and 30).
 This message will be displayed to users when they try to save a record that violates the
validation rule.
Activate the Validation Rule:
 Ensure that Active is checked to activate the validation rule.
 Click Save.

You might also like