Mytutorialrack

Salesforce Big Objects: Large-scale record query performance is limited in Salesforce. Particularly when processing queries and system performance suffers—let’s say you have more than 10,000 entries per object—because of your big data. That’s where Salesforce’s Big Object comes in. enters the scene. Let’s find out what a Salesforce Big Object is.

Salesforce Big Objects

By using Big Objects, we can execute asynchronous queries to extract massive amounts of data without degrading performance quickly. When your Salesforce data is enormous, Big Objects may help you grow your implementation and increase performance!

Big Objects

Massive volumes of data are managed and stored on the Salesforce platform by a large object. To obtain a complete picture of your clientele, you can import large datasets from external systems into a large object or archive data from other objects. Clients and external systems use a standard set of APIs to access big object data. Regardless of the number of data you have—one million, 100 million, or even one billion—a large object offers reliable performance. This scale defines the features and lends power to a large object.

Two categories of Big Objects:

  • Standard big objects: Standard large objects are those that Salesforce defines and incorporates into its offerings. The Field Audit Trail product includes a standard large object called FieldHistoryArchive, which is used to store data. Large, standard objects are non-customizable and always available.
  • Custom big objects: Custom oversized items are brand-new objects you make to hold data specific to your company. The Lightning Platform’s capabilities can be expanded with custom large objects. To track past inventory levels for analysis and potential future optimizations, for instance, create a new large object named HistoricalInventoryLevels if you’re developing an app to track product inventories. The configuration and deployment of custom large objects are covered in this implementation guide.

What Is Big Object In Salesforce?

A large object in Salesforce that manages and keeps enormous amounts of data without having an impact on output. Sales Force Big objects can be accessed using a standard set of APIs by your organization or an external system, and they offer consistent performance for a billion records.

The Metadata API allows for the creation of custom large objects. In order to define a custom big object, you must first create an object file with the object’s definition, fields, and index; next, you must create a package file with the object metadata’s contents and permission set to specify each field’s rights.

In Salesforce, When to Use a Big Object?

These are a few use cases or justifications for using Big Object in Salesforce.

  • Record user activity: field audits, code reviews, time entries, and page views, among other things.
  • Keep Historical Data: In order to comply, historical data must be preserved.
  • 360-Degree Perspective: Ancillary customer data, e.g. Transactions and Purchase Information.

Considerations for using Salesforce Big Objects 

  • Only object and field permission are supported for big objects. Thus, you can establish restrictions for sharing depending on this.
  • Big Objects are not compatible with conventional Salesforce features like flows, triggers, and processes.
  • Each org may have up to 100 large objects created. Similar to custom objects, the big object’s field count limit is contingent upon your organization’s edition and license.
  • Large objects and fields can be created via the Metadata API in addition to the UI.
  • Large objects are limited to one million records in the Enterprise, Performance, Unlimited, and Developer Editions; however, we can expand record capacity and Async SOQL by utilizing an add-on license.
  • __b is the suffix for the large objects.
  • Big Objects can support custom Salesforce Lightning and Visualforce components in place of standard user interface components like detail pages, list views, and so forth.
  • Only the Lookup Relationship, Date, Time, Email, Phone, Text, Long Text Area, and URL Field types are supported for big objects. 
  • Encryption is not supported for large objects.

Create Big Objects In Salesforce?

Create Big Object file first: Creating Big Object FilesHow to Make an Object File- Specifies the fields and index of the custom big object. Every custom big object requires its object file.

My_First_Big_Object__b.object


<?xml version=”1.0″ encoding=”UTF-8″?>

<CustomObject xmlns=”https://soap.sforce.com/2006/04/metadata”>

    <deploymentStatus>Deployed</deploymentStatus>

    <fields>

        <fullName>Account__c</fullName>

        <label>User Account</label>

        <referenceTo>Account</referenceTo>

        <relationshipName>Old_Case_History_Account</relationshipName>

        <required>true</required>

        <type>Lookup</type>

    </fields>

    <fields>

        <fullName>Case_Number__c</fullName>

        <label>Case Number</label>

        <length>16</length>

        <required>true</required>

        <type>Text</type>

        <unique>false</unique>

    </fields>

    <fields>

        <fullName>Contact_Name__c</fullName>

        <label>Contact Name</label>

        <length>255</length>

        <required>false</required>

        <type>Text</type>

        <unique>false</unique>

    </fields>

    <fields>

        <fullName>Subject__c</fullName>

        <label>Subject</label>

        <length>255</length>

        <required>false</required>

        <type>Text</type>

        <unique>false</unique>

    </fields>

     <fields>

        <fullName>Description__c</fullName>

        <label>Description</label>

        <length>32000</length>

        <required>false</required>

        <type>LongTextArea</type>

        <unique>false</unique>

<visibleLines>3</visibleLines>

    </fields>

    <indexes>

        <fullName>OldCaseHistoryIndex</fullName>

        <label>Old Case History Index</label>

        <fields>

            <name>Account__c</name>

            <sortDirection>DESC</sortDirection>

        </fields>

        <fields>

            <name>Case_Number__c</name>

            <sortDirection>ASC</sortDirection>

        </fields>       

    </indexes>

    <label>Old Case History</label>

    <pluralLabel>Old Case History</pluralLabel>

</CustomObject>

–To specify the rights for each field, create a Permissionset file and include a Permissionset.

Permission Set for My First Big Object

<?xml version=”1.0″ encoding=”UTF-8″?>

<PermissionSet xmlns=”https://soap.sforce.com/2006/04/metadata”>

    <label>Old Case History Permission Set</label>

    <fieldPermissions>

        <editable>true</editable>

        <field>Old_Case_History__b.Account__c</field>

        <readable>true</readable>

    </fieldPermissions>

    <fieldPermissions>

        <editable>true</editable>

        <field>Old_Case_History__b.Case_Number__c</field>

        <readable>true</readable>

    </fieldPermissions>

    <fieldPermissions>

        <editable>true</editable>

        <field>Old_Case_History__b.Contact_Name__c</field>

        <readable>true</readable>

    </fieldPermissions>

    <fieldPermissions>

        <editable>true</editable>

        <field>Old_Case_History__b.Subject__c</field>

        <readable>true</readable>

    </fieldPermissions>

    <fieldPermissions>

        <editable>true</editable>

        <field>Old_Case_History__b.Description__c</field>

        <readable>true</readable>

    </fieldPermissions>

</PermissionSet>

Make a file called package.xml:- file defining the object metadata’s contents

<?xml version=”1.0″ encoding=”UTF-8″?>

<Package xmlns=”https://soap.sforce.com/2006/04/metadata”>

    <types>

        <members>*</members>

        <name>CustomObject</name>

    </types>

    <types>

        <members>*</members>

        <name>PermissionSet</name>

    </types>

    <version>50.0</version>

</Package>

Deploying- Big Objects

  • Prepare the deployment zip file.
  • Put the three files in a single folder. Make the structure of the folder as shown below.

  • In the Object Folder, add the file My_First_Big_Object__b.object.The package.xml file should be in the root of the folder. Add the My_First_Big_Object.permissionset file to the permissionset folder. Use ANT Tool or Workbench to assist in the deployment.Get into Workbench.To select the Single Package option, click the Migration tool in the workbench and select the image below.

  • Verify the large object in your Salesforce organization now.

Custom Big Object- Use Cases

  • 360° picture of the customer: Expand the scope of your Salesforce data model to incorporate comprehensive data from clicks, feeds, billing and provisioning information, and loyalty programs, among other sources.
  • Auditing and tracking: For analytical or regulatory purposes, keep track of and preserve a long-term perspective of Salesforce or product usage.
  • Previous archive: While enhancing the functionality of your primary CRM or Lightning Platform apps, you can keep access to previous data for analysis or compliance needs.

Differences Between Big Objects and Other Objects

A big object differs from ordinary objects, such as sObjects, in that it can hold data on an infinite scale. Large items are kept in a separate area of the Lightning Platform as well.

  • Big object actions like these guarantee a scalable and reliable experience.
  • Only object and field permissions are supported by big objects; regular or standard sharing rules are not supported.
  • Large objects do not support features like flows, processes, triggers, or the Salesforce mobile app.
  • To allow for idempotent writes, just one record is produced when you repeatedly insert an identical huge object record with the exact representation. Unlike a sObject, which records every request to create an object, this behaviour is distinct.

Conclusion

Salesforce Big Objects offers businesses a robust solution for managing enormous amounts of data. They provide a scalable, affordable, and safe solution for handling large volumes of data, historical data, and data from Internet of Things devices.

To guarantee optimal performance and compliance, its implementation necessitates careful planning and attention to best practices. Having Salesforce Big Objects in your toolbox allows your company to fully utilize your data, which will open up new avenues for success in today’s competitive business environment.

Share:

Recent Posts