sfdc-lightning.com(A Blog On Salesforce)
salesforce interview questions,salesforce lightning,visualforce,lightning component,salesforce lightning component,triggers in salesforce,apex triggers,salesforce,apex,apex salesforce ,salesforce scenario based interview questions,salesforce developer,salesforce tutorial,LWC,Salesforce Lightning Web Components Interview Questions,Lightning Web Components Interview Questions,lwc Interview Questions,Salesforce Lightning Components Interview Questions, AURA component interview questions
Pages
- About
- Contact
- AURA
- AURA scenario based interview questions
- Scenarios
- LWC
- Triggers
- Apex
- Javascript for LWC
- Batch Apex
- SOQL
- Interview Questions on Test Class
- Sharing and Visibility
- Vlocity Interview Questions
- Mastering Interview Questions on LWC and Javascript for LWC
- My Courses
- Mastering Salesforce Integration
Friday, February 14, 2025
Salesforce Integration Interview Questions on REST API Part-8
Friday, February 7, 2025
Salesforce Integration Interview Questions Platform Event Limits Part-7
1) What is the High-Volume Platform Event Hourly Publishing Allocation?
It specifies the maximum number of platform events that can be published in one hour. The limit is 250,000 events per hour for Performance and Unlimited Editions.2) What is the High-Volume Platform Event and Change Event Daily Delivery Allocation?
It defines the total number of platform and change events that can be delivered to subscribers in a 24-hour period. The limit is 50,000 deliveries per day for Performance and Unlimited Editions.
3) What publishing methods count toward the hourly publishing limit?
Publishing methods include:
- Apex
- Pub/Sub API
- REST API
- SOAP API
- Bulk API
- Flows
- Process Builder processes
Delivery methods include:
- Pub/Sub API
- CometD
- empApi Lightning component
- Event relays
The following actions don’t count toward the delivery limit:
- Apex triggers
- Flows
- Process Builder processes
Each published event counts as one unit against the hourly publishing limit, regardless of the publishing method. For example, publishing 1,000 events in an hour counts as 1,000 against the limit.
7) How is the daily delivery usage calculated?
Each event delivered to a subscriber is counted separately. For instance: Publishing 1,000 events to 10 subscribers counts as 10,000 deliveries (1,000 × 10).
8) What happens if you exceed the hourly publishing limit?
Events published beyond the limit will fail. Organizations must monitor and optimize their event publishing to stay within the allowed limits.
9) What is the purpose of the Platform Event Add-On License?
The add-on increases event delivery and publishing limits, providing flexibility during usage spikes. It enables organizations to handle higher volumes of platform event usage.- Increased Daily Delivery Allocation: Adds 100,000 events per day (3 million per month).
- Enhanced Hourly Publishing Allocation: Adds 25,000 events per hour.
- Flexibility for Usage Spikes: Allows for temporary exceedance of daily delivery limits.
With the add-on:
- The daily delivery allocation increases to 150,000 events (50,000 included + 100,000 from the add-on).
- The monthly entitlement reaches 3 million events.
It increases the hourly publishing limit by 25,000 events, resulting in a total of 275,000 events per hour for Performance and Unlimited Editions.
13) What steps should an organization take to maximize its event delivery capabilities?
- Monitor and optimize event usage.
- Purchase the add-on license if higher limits are required.
- Contact Salesforce for guidance on best practices.
Gain a deep understanding of Salesforce integration, from creating and configuring Connected Apps to mastering advanced topics like OAuth flows, SAML-based Single Sign-On, and Streaming APIs. Our PDF course combines practical examples, real-time scenarios, and integration patterns to equip professionals with the skills needed to streamline processes and enhance productivity. Tailored for those with 2–8 years of experience, it’s your guide to unlocking seamless connectivity between Salesforce and other systems.
Link to course : Mastering Salesforce Integration
Saturday, February 1, 2025
Salesforce Integration Interview Questions Change Data Capture Part-6
1) What is Change Data Capture (CDC)?
Change Data Capture is a streaming product in Salesforce that enables real-time integration with external systems. It notifies subscribed systems of data changes like record creation, updates, deletions, and undeletions, helping keep external systems in sync without periodic data exports or repeated API calls.CDC is available for all custom objects and a subset of standard objects. Each object has an associated ChangeEvent object, named
<ObjectName>ChangeEvent
for standard objects and <ObjectName>__ChangeEvent
for custom objects.No, ChangeEvent objects don’t support CRUD operations or queries. They are used to capture and publish changes but cannot be directly manipulated.
CDC respects field-level security, delivering only the fields a user has access to. However, it ignores record-level sharing settings and doesn’t include derived fields (e.g., formula fields) except for roll-up summary fields.
Excluded fields include:
- IsDeleted
- SystemModStamp
- Formulae Fields (except roll-up summary fields).
6) What are the steps to enable Change Data Capture?
- Navigate to Setup > Change Data Capture in Salesforce.
- Select the desired custom and standard objects from the Available Entities list.
- You can enable up to five entities by default. For more, purchase an add-on license.
- Save the settings.
7) Provide an example of subscribing to CDC events using the Workbench.
- Open Workbench > Queries > Streaming Push Topics.
- Click Generic Subscriptions and enter
/Data/AccountChangeEvent
. - Click Subscribe to establish the connection.
Updates to the Account record will trigger notifications visible in the Workbench.
8) What happens if you need different subscribers to receive specific event types?
Use custom channels to group and isolate change events for different subscribers. This ensures that each subscriber receives only the events they need.
9) What are the licensing constraints for CDC?
- Default: Up to 5 entities.
- Add-on license: Select up to 10 entities per channel and increase delivery allocations. After selecting the first 10 entities, you can add more.
Gain a deep understanding of Salesforce integration, from creating and configuring Connected Apps to mastering advanced topics like OAuth flows, SAML-based Single Sign-On, and Streaming APIs. Our PDF course combines practical examples, real-time scenarios, and integration patterns to equip professionals with the skills needed to streamline processes and enhance productivity. Tailored for those with 2–8 years of experience, it’s your guide to unlocking seamless connectivity between Salesforce and other systems.
Link to course : Mastering Salesforce Integration
Friday, January 24, 2025
Salesforce Integration Interview Questions Platform Event Part-5
1) How can you publish a platform event using Apex?
You can publish a platform event using the EventBus.publish()
method in Apex. Here's how:
- Create an instance of the platform event object and populate its fields.
- Use
EventBus.publish()
to publish the event, which returns aDatabase.SaveResult
. - Check
isSuccess()
on the result to determine whether the event was published successfully.
EventUuid
ensures the identification of an event message across different scenarios, including maintenance activities.Although platform event triggers run asynchronously, the synchronous limits apply to platform event triggers. This is because Asynchronous limits are for long-lived processes, such as Batch Apex and future methods. Synchronous limits are for short-lived processes that execute quickly and platform event triggers are short-lived processes that execute in batches rather quickly.
Because a platform event trigger runs in a separate transaction from the one that fired it, governor limits are reset, and the trigger gets its own set of limits.
PlatformEventSubscriberConfig
via Tooling API or Metadata API.- Default Configuration: Runs as the Automated Process user with a batch size of 2,000.
- Custom Configuration: Specify a custom user and a batch size between 1 and 2,000. Smaller batch sizes help avoid hitting governor limits.
PlatformEventSubscriberConfig?
To get or manipulate a configuration, use this endpoint with the ID of your PlatformEventSubscriberConfig record appended.
/services/data/v60.0/tooling/sobjects/PlatformEventSubscriberConfig/<ID>
You can also,
· Delete a specific configuration with a DELETE request.
· Update a specific configuration with a PATCH request. For this request, include the PlatformEventSubscriberConfig definition in the request body.
To subscribe to platform events, use the channel name /event/Event_Name__e
in a CometD client. For example, to subscribe to a TestEvent__e
platform event, use the channel /event/TestEvent__e
. The CometD client receives real-time event notifications in JSON format.
7) How can you encrypt platform event messages in the event bus?
To encrypt platform event messages:
- Create an event bus tenant secret in the Key Management page in Setup.
- Enable encryption for platform events on the Encryption Policy page.
Without Shield Encryption, messages are stored in clear text in the event bus.
PlatformEventUsageMetric
object to monitor event publishing and delivery usage. Example queries:To retrieve the usage of platform events:
Events Delivered (April 26, 2024, 11:00 to April 27, 2024, 11:00):
SELECT Name, StartDate, EndDate, Value
FROM PlatformEventUsageMetric
WHERE Name='PLATFORM_EVENTS_DELIVERED'
AND StartDate=2024-04-26T11:00:00.000Z
AND EndDate=2024-04-27T11:00:00.000Z
Subscription Methods: CometD, Pub/Sub API, empApi Lightning components, and event relays.
Note: Delivery metrics exclude event deliveries to Apex triggers, flows, and processes.
Gain a deep understanding of Salesforce integration, from creating and configuring Connected Apps to mastering advanced topics like OAuth flows, SAML-based Single Sign-On, and Streaming APIs. Our PDF course combines practical examples, real-time scenarios, and integration patterns to equip professionals with the skills needed to streamline processes and enhance productivity. Tailored for those with 2–8 years of experience, it’s your guide to unlocking seamless connectivity between Salesforce and other systems.
Link to course : Mastering Salesforce Integration
Friday, January 17, 2025
Salesforce Integration Interview Questions Platform Event Part-4
1) What is the purpose of Salesforce Streaming API?
The Salesforce Streaming API enables real-time data updates using push technology and an event-driven architecture. It operates on an event-based model, allowing applications to subscribe to events and receive updates as they occur in near real-time.
2) What types of events are supported by the Salesforce Streaming API, and in which scenarios should it be used?
Types of Events Supported:
- Generic Events: Legacy, for custom notifications.
- PushTopics: Legacy, for changes in Salesforce records based on SOQL queries.
- Change Data Capture (CDC): For tracking changes to Salesforce data records in real-time.
- Platform Events: For high-volume, custom business event notifications.
When to Use the Streaming API:
Use Streaming API when real-time data updates are required to synchronize external systems with Salesforce data, such as in applications that react immediately to changes in data or business processes.
Note: PushTopics and generic events are legacy products with limited support. For new implementations, use Change Data Capture instead of PushTopics and Platform Events instead of generic events.
3) What are platform events in Salesforce?
Platform events are secure and scalable messages used to enable real-time communication between Salesforce and external apps, as well as within Salesforce itself, using an event-driven messaging architecture.
4) What is the Event Bus in Salesforce?
The event bus is a temporary storage system where platform event messages are published. Events on the bus can be retrieved using a CometD client, and each event contains a ReplayId
field to identify its position in the stream.
5) What are standard platform events, and how can they be used?
Standard platform events, such as AssetTokenEvent
and BatchApexErrorEvent
, are predefined by Salesforce for specific purposes like monitoring authentication or reporting errors. Custom platform events can also be defined and published using Apex, Process Builder, Flow Builder, or APIs, and subscribed to via triggers or external apps.
6) How are platform events published in Salesforce?
Platform events can be published:
- Immediately: Messages are sent as soon as they are generated and cannot be rolled back.
- After Commit: Messages are sent only after a transaction is committed, and they support rollback using
setSavepoint()
androllback()
.
7) What are high-volume platform events, and how are they different from standard-volume events?
High-volume platform events, introduced in API version 45.0, allow for better scalability and can handle millions of events. They are always published asynchronously for efficient processing. Standard-volume events are no longer available for new definitions but are supported for existing implementations.
8) What is the retention period for platform event messages on the event bus?
- High-Volume Events: Retained for 72 hours (3 days).
- Standard-Volume Events: Retained for 24 hours (1 day).
9) What is the ReplayId field in platform event messages?
The ReplayId
field is a system-generated, opaque identifier for an event in the stream. It helps subscribers retrieve missed events during resubscription within the retention window. Replay IDs are not guaranteed to be unique.