Month: August 2018

All about Salesforce Connect

Salesforce Connect is a framework that enables you to view, search, and modify data that’s stored outside your Salesforce org. For example, perhaps you have data that’s stored on premises in an enterprise resource planning (ERP) system. Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts.

Previously, the only way to integrate external data with Salesforce was to use extract, transform, and load (ETL) tools. That process is time consuming and requires you to copy data into your org that you might never use or quickly becomes stale. In contrast, Salesforce Connect maps data tables in external systems to external objects in your org.

External objects are similar to custom objects, except that they map to data located outside your Salesforce org. External object data is always up to date. Salesforce Connect provides a live connection to external data rather than a copy that consumes storage and must be regularly synced. Accessing an external object fetches the data from the external system in real time.

We recommend that you use Salesforce Connect if most of these conditions apply.

  • You have a large amount of data that you don’t want to copy into your Salesforce org.
  • You need small amounts of data at any one time.
  • You need real-time access to the latest data.
  • You store your data in the cloud or in a back-office system, but want to display or process that data in your Salesforce org.

External objects are not a replacement for ETL. If you need frequent access to large amounts of external data, ETL might still be your best option for optimal performance.

Unsupported features in external objects then custom objects –

  • Data will not stored in external object of your Salesforce org.
  • Formula Fields are not allowed in external object.
  • Workflow and Trigger are not allowed in external object.

Big Object Basics

Big objects allow you to store and manage a massive amount of data on the Salesforce platform.

Big objects provide consistent performance for a billion records or more, and are accessible with a standard set of APIs to your org or external system. Think of all that data! We basically took a gigant-o-ray to the objects you already know and love to create big objects.

  • Standard big objects – example is FieldHistoryArchive
  • Custom big objects

Uses of Big Objects like –

  1. 360° view of Customer – You can store any customer information like transactions, orders, billing details, use a Custom Big object to keep track of every details.

  2. Auditing and Tracking – Keep a long-term view of your users’ Salesforce usage for analysis or compliance purposes.
  3. Historical Archive -Maintain access to historical data for analysis or compliance purposes while optimizing the performance of your core CRM or Lightning Platform applications.

Querying Big Objects –

You can query big objects using standard SOQL or with Async SOQL.

Points to Remember –

  • Big objects support only object and field permissions.
  • You must use the Metadata API to define or add a field to a custom big object. You can’t do it through the UI.
  • SOQL relationship queries are based on a lookup field from a big object to a standard or custom object in the select field list (not in filters or subqueries).
  • Big objects support custom Salesforce Lightning and Visualforce components rather than standard UI elements (home pages, detail pages, list views, and so on).
  • You can create up to 100 big objects per org. The limits for big object fields are similar to the limits on custom objects, and depend on your org’s license type.
  • Big objects don’t support transactions that include big objects, standard objects, and custom objects.
  • To support the scale of data in a big object, you can’t use triggers, flows, processes, and the Salesforce app.

Query Big Object using SOQL and Async SOQL –

Big objects can be queried using SOQL or Async SOQL. Async SOQL uses to handle the massive volume of data that can be kept within a big object. Because Async SOQL queries are run asynchronously, you don’t have to worry about queries timing out.

Generally, you want to use Async SOQL over standard SOQL when you’re dealing with large amounts of data. If you only need a small dataset from a big object, or if you need the results immediately, use standard SOQL. Async SOQL also works on standard and non-big custom objects, but support for those objects is in pilot.

Use standard SOQL when:

  • You want to display the results in the UI without having the user wait for results.
  • You want results returned immediately for manipulation within a block of Apex code.
  • You know that the query will return a small amount of data.
Use Async SOQL when:

  • You are querying against millions of records.
  • You want to ensure that your query completes.
  • You don’t need to do aggregate queries or filtering outside of the index.