Tag: HTTP request

  • Integration of Hubspot with Salesforce (Part 1)

    Integration of Hubspot with Salesforce (Part 1)

    Are you ready to supercharge your business by connecting two powerful tools: HubSpot and Salesforce? In this beginner-friendly guide, we’ll explain how to import contacts from HubSpot into Salesforce. Don’t worry if you’re new to these platforms; we’ll take it step by step.

    Why Connect HubSpot and Salesforce?

    HubSpot and Salesforce are like superheroes for your business. HubSpot helps you with marketing and leads, while Salesforce is your go-to for managing customers and sales. When you connect them, magic happens:
    No More Manual Work: You won’t need to copy contact info from HubSpot to Salesforce by hand. It happens automatically!

    Step 1: HubSpot Setup

    First, let’s get HubSpot ready:

    • Create a HubSpot Account: If you don’t have one, sign up for a HubSpot account at HubSpot’s website.
    • Make a Private App: This sounds fancy, but it’s just telling HubSpot you want to connect with Salesforce. HubSpot will give you a special key for this.
    • Get Your Key: With your private app, you’ll get an access key. This key is like a secret code that lets Salesforce talk to HubSpot. Keep it safe!

    Step 2: Salesforce Setup

    Now, let’s dive into Salesforce:

    • Open Salesforce Developer Console: If you’re new to Salesforce, this is where you write special code (don’t worry, it’s easier than it sounds).
    • Create an Apex Class: In Salesforce, we write a special program called an “Apex class” to connect with HubSpot. Think of it like teaching Salesforce a new trick.
    • Define Constants: Inside your Apex class, we tell Salesforce the web address to talk to HubSpot and give it the secret key we got earlier. This is done with some special words like this:
    private static final String HUBSPOT_API_URL = 'https://api.hubapi.com/crm/v3/objects/contacts';
    
    //you can get api from Hubspot Developer Documentation Link: https://developers.hubspot.com/docs/api/crm/contacts
    
    private static final String HUBSPOT_ACCESS_TOKEN = 'YOUR_HUBSPOT_ACCESS_TOKEN'; 
    Remember to replace 'YOUR_HUBSPOT_ACCESS_TOKEN' with your real secret key.

    dont miss out iconDon’t forget to check out: How to Integrate HubSpot With Salesforce CRM: Three Options

    Step 3: Define Contact Data

    In our Apex class, we create a plan for the contact data we want from HubSpot. We use these special words:

    public class HubSpotContactProperties {
         public String firstname;
         public String lastname;
         public String email;
     // ... add other properties ...
    }
    public class HubSpotContact {
         public HubSpotContactProperties properties;
    }
    public class HubSpotContactsResponse {
         public List<HubSpotContact> results;
    }
    • HubSpotContactProperties: These are like labels for the contact info we want, like names and email addresses.
    • HubSpotContact: This is like a container that holds a contact’s info.
    • HubSpotContactsResponse: This is like a report that HubSpot gives us with all the contacts.

    Step 4: Importing Contacts into Salesforce from HubSpot

    This section includes the core of our integration – importing contacts from HubSpot into
    Salesforce.

    @AuraEnabled
    public static void importContacts() {
         // Get contacts from HubSpot
         List<HubSpotContact> hubSpotContacts = getHubSpotContacts();
         // Create or update contacts in Salesforce
         List<Contact> contactsToInsert = new List<Contact>();
         List<Contact> contactsToUpdate = new List<Contact>();
         for (HubSpotContact hubSpotContact : hubSpotContacts) {
             HubSpotContactProperties properties = hubSpotContact.properties;
             Contact salesforceContact = new Contact();
             salesforceContact.FirstName = properties.firstname;
             salesforceContact.LastName = properties.lastname;
             salesforceContact.Email = properties.email;
             // Check if contact already exists in Salesforce
             List<Contact> existingContacts = [SELECT Id FROM Contact WHERE Email = 
             :salesforceContact.Email];
             if (existingContacts.isEmpty()) {
                  contactsToInsert.add(salesforceContact);
             } 
             else {
                  salesforceContact.Id = existingContacts[0].Id;
                  contactsToUpdate.add(salesforceContact);
             }
     }
     insert contactsToInsert;
     update contactsToUpdate;
    }
    
    • @AuraEnabled: This annotation makes the method accessible for use in Salesforce Lightning components.
    • We use the getHubSpotContacts method to fetch contacts from HubSpot.
    • Then, we create two lists: contactsToInsert for new contacts and contactsToUpdate for existing ones.
    • We loop through the HubSpot contacts, extract their properties, and map them to corresponding Salesforce Contact fields (like first name, last name, and email).
    • We check if a contact already exists in Salesforce based on their email address. If it doesn’t exist, we add it to contactsToInsert; otherwise, we update it in contactsToUpdate.
    • Finally, we insert new contacts and update existing ones in Salesforce.

    Part 4: Fetching Contacts from HubSpot

    This section defines the method responsible for making the actual HTTP request to HubSpot to fetch contacts.

    private static List<HubSpotContact> getHubSpotContacts() {
         HttpRequest request = new HttpRequest();
         request.setEndpoint(HUBSPOT_API_URL);
         request.setMethod('GET');
         request.setHeader('Authorization', 'Bearer ' + HUBSPOT_ACCESS_TOKEN);
         Http http = new Http();
         HttpResponse response = http.send(request);
         HubSpotContactsResponse responseBody = (HubSpotContactsResponse) 
         JSON.deserialize(response.getBody(), HubSpotContactsResponse.class);
         return responseBody.results;
    }
    • getHubSpotContacts is a private method that sends an HTTP request to the HubSpot API using the URL and access token we defined earlier.
    • It sets up the request, including the method (GET) and authorization header with the access token.
    • Then, it uses the Http class to send the request to HubSpot.
    • The response is received and deserialized from JSON into a structured format using JSON.deserialize.
    • Finally, it returns the list of HubSpot contacts from the response.

    dont miss out iconCheck out another amazing blog here by Ayfaz: Introduction to Lightening Web Components | The Ultimate Guide

    In the next part, we’ll explore importing contacts from Salesforce Contact objects into HubSpot Contact objects.

  • All You Need to Know About Salesforce Integrations

    All You Need to Know About Salesforce Integrations

    Integration

    In Salesforce, integration refers to the process of connecting and combining different systems or applications to enable the exchange of data and functionality. It allows Salesforce to seamlessly communicate with other external systems, such as databases, enterprise resource planning (ERP) systems, marketing automation platforms, customer support systems, and more.

    Fundamentals of Integration

    The integration process starts with a callout in Salesforce, which involves initiating an HTTP request to an external system. A callout is typically used to retrieve data, perform actions, or invoke services in the external system. It requires specifying the endpoint URL, method (such as GET, POST, PUT, or DELETE), headers, and optional payload. Salesforce sends the request, and the external system processes it, returning a response. 

    1.  Callout or request: In Salesforce, a callout refers to making a request from Salesforce to an external system or service. It involves sending an HTTP request to the target system’s API endpoint to retrieve data, perform an action, or initiate a process. Callouts allow Salesforce to communicate with external systems and exchange information.
    2. Endpoint URL:  In simple words, an endpoint URL is like a web address that identifies a specific location or resource in an external system. It is the destination where you send your requests to access or interact with that system.
    3. HTTP Methods: HTTP methods are like actions you can take when interacting with a web server.
    4. Response: A response is the result returned by the external system to Salesforce after processing a request. It includes information such as the status of the request (success or failure), data retrieved, or additional details provided by the external system. 

    dont miss out iconDon’t forget to check out: Power Play: Mastering Salesforce Integration Patterns And Practices

    Web Services

    1. SOAP-based Web Services: SOAP is a protocol that defines a set of rules for structuring messages and exchanging XML-based data over HTTP, SMTP, or other protocols. SOAP web services use the XML format for data representation and rely on WSDL (Web Services Description Language) to describe the available operations, data types, and message formats. SOAP-based web services provide a rich set of standards for security, reliability, and transaction support.
    2. RESTful Web Services: REST is an architectural style that uses HTTP protocols, such as GET, POST, PUT, and DELETE, to interact with resources. RESTful web services follow a set of principles, including statelessness, uniform resource identification, and a client-server model. They typically use JSON (JavaScript Object Notation) for data exchange, and the endpoints are identified by URLs. RESTful web services are lightweight, scalable, and well-suited for building APIs that can be consumed by various clients, including web browsers, mobile applications, and other systems. 

    These are some mostly used HTTP methods: 

    1. GET: The GET method is used to retrieve data from a specified resource. It retrieves the representation of the resource identified by the provided URL. GET requests should be safe and not have any side effects on the server.
    2. POST: The POST method is used to submit data to be processed by the identified resource. It typically results in the creation of a new resource or the execution of a specific action. 
    3. PUT: The PUT method is used to update or replace an existing resource with the provided representation. It replaces the entire resource at the given URL with the new representation provided in the request
    4. PATCH: The PATCH method is used to partially update an existing resource. It provides a way to modify specific fields or properties of a resource without requiring the client to send the entire representation of the resource.
    5. DELETE: The DELETE method is used to delete already existing resources 

    dont miss out iconCheck out another amazing blog by Arpit here: What are Salesforce Flows? | All You Need to Know

  • All You Need to know About Salesforce Lightning Component Lifecycle

    All You Need to know About Salesforce Lightning Component Lifecycle

    A Lightning component is instantiated, rendered, and rerendered during its lifecycle. Components are only re-rendered when there’s a program or value change that requires re-rendering. When a browser event triggers an action that updates data. A component’s lifecycle begins with an HTTP request to the component configuration server if it’s not been cached from previous requests. Start by creating a component definition and its entire parent hierarchy, then create facets within those components. The framework also creates dependencies for all components on the server, including definitions of attributes, interfaces, controllers, and actions. Custom renderers are useful for manipulating the DOM tree after the framework’s rendering service has inserted DOM elements. If you would like to customize the rendering behaviour and you can’t do it using markup or the init event, you’ll create a client-side renderer. 

    dont miss out iconDon’t forget to check out: Crash Course on Apex Triggers Salesforce | Complete Guide with Real-Time Scenarios 

    Modifying DOM Elements in Lightning Component Framework

    The Lightning Framework creates & manages DOM elements owned by components. If you would like to modify these DOM elements created by the framework, modify them in your component’s render event handlers or custom renderers. Otherwise, the framework will overwrite your changes when the component is rendered again. Below may be a basic implementation of the four phases of the render and re-render cycle. : 

    • render() 
    • rerender() 
    • afterRender() 
    • unrender()         

    SALESFORCE

    The rendering lifecycle is as follows: 

    1. Init event – Updates a Lightning component or fires an occasion after the component construction but before rendering.
    2. render() – Renders the component body. 
    3. afterRender() – This enables you to communicate with the framework after the component bodies are inserted.
    4. render event – handled by the framework is preferred as a better solution over creating a custom render() and overriding afterRender().

    In the case of reRender(), the framework calls the individual reRender method of every component when there is a significant even-based data change. The render event is fired again after this. 

    There are two ways to Control DOM elements using the Lightning framework: 

    1. Out-of-the-box render Event 
    2. Custom Renderer 

    Out-of-the-box Render Event 

    When a Lightning component is rendered or re-rendered, it dispatches an aura:valueRender event also referred to as a render event. Handle this event to perform post-processing on the DOM or react to a component rendering or re-rendering. Events are preferred and straightforward to use instead of creating custom renderers.

    Handling the aura:valueRender event is analogous to handling the init hook. Add a handler to your component’s markup.

    <aura:handler name=”render” value=”{!this}” action=”{!c.onRender}”/> 

    dont miss out iconCheck out another amazing blog by Mohit here: Named Credentials as Callout Endpoints – Salesforce Developer Guide 

    Custom Renderer

    Go with custom renderer only if:

    1. Manipulate the DOM structure after the framework’s rendering service inserts the DOM elements.
    2. Customize rendering behavior impossible with markup or init events. Renderer files are a part of the Lightning component package and are automatically associated if you follow the Renderer.js naming convention.

     

  • Integration Basics in Salesforce – Here is All You Need to Know

    Integration Basics in Salesforce – Here is All You Need to Know

     Have you ever wondered why there are so many applications and software out there and how they interact with each other since there’s a sea of applications in today’s time? Then your guess is right the method we use to interact with those applications is Integration. 

    So, let’s first know what integration is. 

    Salesforce integration is the process of integrating your Salesforce CRM with other systems and applications, such as ERP, Marketing Automation, HCM, etc. 

    Now let us know what are the methods by which it works? 

    These methods are also known as the fundamentals of integration. 

    So, the process begins from one end carry all the way to the second system and the whole process goes like this only, note here system refers to two entities in which we are making integration. So, the fundamentals or terminology to learn are:

    1. Callout 
    2. Request 
    3. API 
    4. Authorization 
    5. Response 
    6. Endpoint 
    7. Web services 

    dont miss out iconDon’t forget to check out: Salesforce and Gmail Integration | The Perfect Integration Guide

    Now let’s know about the web services 

    Here are two types of web services available: 

    1. REST Webservice 
    2. SOAP Webservices 

    Just to have an idea know that most of the time we use REST API compared to SOAP API as it is comparatively faster and supports all types of devices however SOAP is more secure. For further information on them, you can have a look at the blog by the link below – https://stormpath.com/blog/rest-vs-soap 

    Now let’s study callout.

    Callout means making a call to an external Web service or sending an HTTP request from Apex code and then receiving the response. 

    Now let’s know about the API 

    API is one of several web interfaces that you can use to access your Salesforce data without using the Salesforce user interface. 

    Now let’s know about web services 

    A developer of an external application can integrate with an Apex class containing web service methods by generating a WSDL for the class. To generate a WSDL from an Apex class detail page. 

    Now let’s have a look at the difference between both of the above  

    The callout makes a call to an external web service or sends an HTTP request from Apex code, and then receives the response. Apex callouts come in two flavours. Web service callouts to SOAP web services use XML, and typically require a WSDL document for code generation. 

    dont miss out iconCheck out another amazing blog by Akash here: Sales Cycle in Salesforce – How to Better Manage!

    Now go for Endpoint 

    An endpoint is typically a uniform resource locator (URL) that provides the location of a resource on the server. 

    Now let’s know about the authorization of the Salesforce 

    For Authorize Endpoint URL, the host’s name can include a sandbox or company-specific custom domain login URL. The URL must end in.salesforce.com, and the path must end in /services/oauth2/authorize. For example, https://login.salesforce.com/services/oauth2/authorize. 

    By this, you might get some idea about it. For more stay tuned, we’ll catch up sooner. 

  • Introduction and How to Use Postman | Salesforce Developer Guide

    Introduction and How to Use Postman | Salesforce Developer Guide

    Introduction

    Postman is a computer application it is used for testing APIs (Application Programming Interfaces). Postman sends an HTTP request to the webserver and receives the response body from the server. there’s no greater configuration or setting up of framework is needed even as sending and receiving requests in Postman. Postman is extensively utilized by Testers and developers for better trying out of applications. Postman allows us to check APIs using a graphical user interface.

    Commonly used HTTP methods are:

    • GET: Retrieve data/information
    • POST: Add data/information
    • PUT: Replace data/information
    • PATCH: Update certain data/information
    • DELETE: Delete data/information

    When testing APIs with Postman, we usually obtain different status codes. Some of the most common status codes are the followings:

    • 200: This code is used for a successful request.
    • 201: Data created successfully.
    • 400: Bad Request. 
    • 401: Unauthorized Access.
    • 403: Forbidden or Access Denied.
    • 404: Data Not Found.
    • 405: unsupported method.
    • 500: Internal Server Error.
    • 503: Service not available.

    dont miss out iconDon’t forget to check out: Salesforce Integration with Postman – The How-to Guide

    How to Install the Postman App on your Computer:

    Postman is an open-source application and it is obtainable to download for free of cost. It is similar to downloading and installing like any other computer application.

    To download, the postman app on your computer visit https://www.postman.com/downloads/ and download the app as per your computer system OS. Postman app is available for the following OS:

    • Windows
    • Linux
    • Mac.
    • Postman also comes with a web version, you can use it on your web browser such as Chrome, Mozilla IE, etc.

    How to Use Postman

    Requirement – Retrieve and create account records in Salesforce org.

    • Authenticate Salesforce Org

    Step 1: Configure a connected app in Salesforce org

    Step 2: Open postman select the Authentication tab, choose OAuth2.0 from type

    Step 3: Fill the value in fields i.e Access Token UR, client id, Client Secret (these values can be obtained from Salesforce connected app)

    Step 4: Now click on the Get New Access Token button, a new pop-up will open where you have to fill in your org credentials i.e Username and password, after that, you will receive a new access token

    • Retrieve Account Records from Salesforce

    Step 1: Choose a method and enter the request URL

    Method – GET

     Request URL – <your salesforce instance>/services/data/v42.0/query/?q=SELECT+Name,Type+FROM+Account

    Step 2: Set header

    Key – Authorization 

    Value –  Bearer<space><access-token> 

    Click send, now will see the account record in the Response section.

    dont miss out iconCheck out another amazing blog by Arun here: Learn All About Data Modeling in Salesforce

    • Create Account Records in Salesforce

    Step 1: Choose method and enter the request URL

    Method – POST

    Request URL – <your salesforce instance>/services/data/v36.0/sobjects/Account/

    Step 2: Set header 

    Key – Authorization 

    Value –  Bearer<space><access-token> 

    Step 3: Set header 

    Body – raw>JSON

    {
        "Name": "Test Account from Postman"
    }

    Click send, now you can see the callout response/status (success or fail) in the Response section.

  • How to Connect Salesforce and Postman Using SOAP API

    How to Connect Salesforce and Postman Using SOAP API

    SOAP APIs are developed as the intermediate language. In simple words, we can say that if you built an app in different languages and you want to interact with some other language then you can use SOAP because it gives you less development effort. You can use SOAP APIs to perform the CRUD (create, retrieve, update and delete records) operations or any searches you want or many more.

    Let’s take an example to understand the SOAP API. Suppose we have two different platforms such as Java and the .NET platform. If both platforms want to communicate with each other or send data then both platforms need a common language like XML to interact with each other. 

    We all know that there are two ways to send data between two applications. You can either send data in JSON format or XML format. But if we are talking about the SOAP API then it only works with XML but in the Rest API you can use JSON format as well as XML format to send the data.

    Let’s Discuss Some Important Features of JSON:

    • It takes less memory. If we talk about XML, It takes more memory as compared to JSON.
    • Easy to use and faster than XML because it takes less memory space.
    • It’s a free tool that means the JSON library is open source and available on the web browser.
    • It provides a default mapping.
    • The processing JSON library doesn’t require any other libraries that means you don’t have any dependency while using it.

    Let’s Discuss the Important Features of XML:

    • XML tags are not predefined so you can define your customized tags.
    • It is designed to carry data that means you can only get the data from one app to another.
    • We can easily understand the XML code or, we can say that XML is self-explanatory code.
    • You can easily read and write XML similar to HTML markup language.

    dont miss out iconDon’t forget to check out: Salesforce REST API | HTTP and Callout Basics | All You Need to Know

    XML is used for data exchange. It makes the document transportable across the system and by using XML you can exchange data quickly between two platforms.

    If you want to make a SOAP request then you have to follow the below steps. Let’s start the first SOAP API call using Postman. This API call is used to authenticate Salesforce org using SOAP from the Postman. Before following the below steps first you have to log in to the Salesforce org.

    Step 1: You have to provide an EndPoint URL and Method Name.

    EndPoint url: https://login.salesforce.com/services/Soap/c/49.0. (this endpoint URL is used to log in to the Salesforce org so you have to provide its Username and Password. Here, you need to send this username & password in your request body).

    Method Name: You have to choose your method type such as Get, Post etc.

    Step 2: You need to set the Headers.

    Header includes the Content-Type and SOAPAction

    Content-Type: text/XML.

    SOAPAction: It can be used to indicate the intent of the SOAPAction HTTP request. If you have not provided this header then you will not be able to make the SOAP call.

    Step 3: You need to set the Body.

    The general form of SOAP body:

    <soap:Envelope …..>
      //Soap Header code here
      <soap:Header>
      </soap:Header>
      //Soap body code here
      <soap:Body>
      // you can write message body here
      </soap:Body> 
    </soap:Envelope>
    

    SOAP body used for authentication:

    <?xml version="1.0" encoding="utf-8" ?>
    <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Body>
       <n1:login xmlns:n1="urn:enterprise.soap.sforce.com">
        <n1:username> Your Salesforce UserName here</n1:username>
        <n1:password>Your Password and TokenId here</n1:password>
       </n1:login>
    </env:Body>
    </env:Envelope>
    

    Add the above code in your request body and in place of “Your Salesforce UserName here” put your Salesforce username. And in the place of “Your Password and TokenId here” you can put your password and security token id. Follow the below steps to get your token id:

     Go to my personal information → Enter Reset in quick find box → Select Reset My Security Token.

    Click on the Reset Security Token button.

    You can get your Security Token id in your mail.

    dont miss out iconCheck out another amazing blog by Shweta here: Apex Replay Debugger – Salesforce Developer Guide

    Step 4: You have to send the Message.

    After setting up the endpoint URL, header, body and request type. Now, Click on Send button then you can see ServerUrl and SessionId in the response. By using ServerUrl and SessionIdm, we can make any call to Salesforce. If you send this session id in the header that means Salesforce knows that you are the right user to talk to me. Basically used for authentication purposes. For making an Apis call you don’t have to send a username and password every time to get data.

  • Salesforce Lead Management: Tips And Best Practices

    Salesforce Lead Management: Tips And Best Practices

    Customer relationship is a very important business segment. We will tell you about such a quality tool as Salesforce.

    Make Your Feedback Perfect – Salesforce Tips and Practices

    Every complex company tries to organize the workflow as efficiently as possible. It doesn’t matter what complex tasks she tries to fulfill – assembling and manufacturing cars, supplying goods all over the world, or searching for the top foreign brides. Modern companies have become complex organisms where every organ must work perfectly. CRM systems help organize this process. In simple terms, CRM is a technology that helps manage a company’s interactions with existing and potential customers to improve business connections. CRM tools help you manage contacts and sales, increase productivity, increase profitability, and more.

    Leader among CRM platforms

    Salesforce is a platform that is entirely hosted on Salesforce’s servers in the cloud. Salesforce was founded in 1999 by former Oracle CEO Mark Benioff. The main idea of ​​creation is to build affordable software and implement it completely online as a service.

    Let me clarify that Salesforce has long gone beyond just CRM. Salesforce is a cloud platform based on which, in addition to the CRM part, there are many interesting things. Salesforce allows you to create and deploy customized solutions, automate business processes, integrate with external applications.

    Most of the world’s companies are customers of Salesforce and use this platform as a solution for their business needs. Among them: Adidas, AWS, Canon, Philips, Toyota, American Express, Western Union, Cisco, KLM, and many others. It was a revelation to me that the US Visa Application Center uses Salesforce to collect, process, and issue visa applications.

    Salesforce, as a company, is a partner of various representatives of the IT world and, accordingly, they offer ready-made integration solutions, advanced services to meet the requirements of end customers, and many other opportunities. Among them – Apple, Microsoft, Google, Amazon.

    As of 2019, Salesforce offers a range of products: Sales Cloud, Service Cloud, Marketing Cloud, e-Commerce Cloud, Heroku, Integration, Community Cloud, Einstein Analytics, and others.

    And now a few facts:

    • Salesforce – the first number in the list of “100 best companies to work for 2018” according to Fortune.
    • Salesforce leads the list of the most innovative companies according to Forbes in 2017 and № 3 in 2018.
    • Salesforce – the best CRM version of G2 Crowd Grid.
    • Salesforce ranks highest in the list of CRM systems according to Software Advice.
    • More than 150,000 companies use Salesforce CRM to grow their business.

    dont miss out iconDon’t forget to check out: Lead Conversion In Salesforce | Best Practices

    Benefits of working with Salesforce for developers

    Easy to get started

    And that, in my opinion, is one of the biggest benefits of Salesforce. No need to install any programs, no hardware requirements. Placement in the cloud provides access to real-time information, ie you can use the platform anywhere and anytime.

    All you need to work with Salesforce is Internet access. All you need to do is go to the site in a browser, enter your login and password, and … voila. You can create your functionality or use standard, already created Salesforce.

    Multi-Platform

    All Salesforce users have a common infrastructure and a copy of the software. This allows automatic and simultaneous updates for all users on the platform. You get the latest and greatest features with automatic updates three times a year.

    Organization

    Everyone has the opportunity to create a free organization for training, practice, or testing. It’s a full-featured development environment that you can also use to create your products – packages that can be released as applications in AppExchange.

    AppExchange

    AppExchange in Salesforce allows you to develop and sell your products or access thousands of useful, secure, and proven products or integrations created by other users. For example, apex-lang is an open library of auxiliary classes written in Apex, which aims to eliminate shortcomings in the main classes of the platform. The Rollup Helper package allows you to aggregate data for a specific set of criteria in Salesforce without using Apex code.

    Ability to Integrate with other Systems

    Salesforce provides an opportunity for any integration. Besides, many built-in integrations are offered – for example, with Heroku, Outlook, Gmail. One of my recent projects is a two-way integration between Salesforce and a .NET application for managing and synchronizing customer requests. The apex REST web service is used for incoming calls. Apex callout – HTTP request from Apex code is used for outgoing calls.

    The Platform is Easy to Use and Configure

    Intuitive and clear navigation bar. All tabs are divided by category. Use the Setup menu to access settings or custom developments. The menu is divided into different sections depending on the purpose of use. For example, objects and fields are configured through Object Manager. You can create, view, or edit an Apex class via Platform Tools -> Custom Code.

    Career Opportunities

    Salesforce-specialist has opportunities for growth and development both in the technical direction and in project management and consulting. There are few good Salesforce professionals today, and they are all literally “worth their weight in gold” (I’m sure any recruiter who has had an open Salesforce vacancy will attest). Statistics show that the level of salary of a Salesforce developer is higher than, for example, a Java or .NET specialist, if we talk about the same experience.

    Ready-made Solutions

    One of the biggest benefits of Salesforce is that much of the functionality required for most products has already been implemented and tested. For example, the built-in Email-to-Case functionality allows you to automatically create Case records in the system from e-mail. Or Web-to-Lead, which creates an HTML form that you can paste into your website and create lead records directly from the site (Lead is a potential client in the sense of SF).

    Much of the functionality can be easily configured without a single line of code in a short period. And this raises Salesforce to a level higher than traditional development from scratch. Development from scratch carries much greater risks for the client and takes much more time. Several times I have encountered a situation where a client has invested in custom development for six months, and sometimes a year, and the expected result was not. And then the client switched to the Salesforce platform and got the expected result in a few months.

    Innovation

    Salesforce is a platform that is constantly changing and evolving, giving you new opportunities to learn and improve. The company takes an active position with startups. In 2010, one of the first Heroku cloud platforms was acquired, which allows you to deploy, run and manage applications written in various open languages ​​and frameworks.

    In recent years, Salesforce has been actively integrating elements of artificial intelligence (AI) into its platform. The technology uses all data within the system: customer data, information from correspondence, e-mail, calendar, and e-commerce, data streams from social networks, such as tweets and photos, to create machine learning models. One example of AI in Salesforce is the Einstein Bots for Service Cloud functionality, which uses machine learning for better and faster customer service. This allows you to pass customer requests to bots that use a combination of machine learning and customer history processing to make decisions.

    dont miss out iconCheck out another amazing blog by Frank Hamilton here: 5 Reasons For Students To Become A Salesforce Developer

    An Interesting Way to Learn

    Salesforce Trailhead is an online platform for learning Salesforce, which allows you to follow ready-made learning methods or choose your path – and all at your own pace. Practice what you have already learned and test yourself in real-time. Earn badges and points that mark your learning achievements. And it’s all free!

    Conclusion

    With the right software solution, you can focus on relationships with customers, partners, service users, suppliers, and colleagues throughout their lifecycle. At the same time, it helps you identify and attract new leads, convert them into real customers, and provide support and services.

  • 4 Ways to Achieve Heroku-Salesforce Integration

    4 Ways to Achieve Heroku-Salesforce Integration

    Heroku provides a cloud application platform to create, run, and work with your cloud-based application. Heroku supports several programming languages like JAVA, Python, and PHP. The main reason for integrating Salesforce with Heroku with the help of Salesforce integration services is to provide a sophisticated custom user interface that we can develop using these languages and runtime environments. Some other key reasons to integrate Heroku with Salesforce are:

    1. Data replication: The integration supports data replication for synchronizing data between Salesforce and any other application. It provides a low-latency interface and high throughput for customer-facing applications that are built on open-source technologies.
    2. Data proxies: In data proxies, there is no need to copy any data. It aggregates different data stores. Integrating Heroku with Salesforce helps in accessing data proxies that also ease to fetch information on-demand remotely from an external system, without the need to store it.
    3. Custom user interfaces: Customer User Interfaces in Salesforce are built with technologies such as Lightning components and Visualforce. The interfaces when built with open source technologies of the likes of Node.js, PHP, and Java can be successfully integrated with Salesforce UI or run with Salesforce data on Heroku.
    4. External processes: The Salesforce-Heroku integration makes it possible to offload batch-processing or workflows and trigger event-handling by using external processes.

    dont miss out iconDon’t forget to check out: Salesforce Integration with Postman – The How-to Guide

    Ways to Integrate Heroku with Salesforce

    Integrating Heroku with Salesforce has some significant benefits for business but before considering the integration, it is important to know the right way to do so. Here are some of the most recommended integration routes to consider:

    1.  Heroku Connect

    Heroku Connect is the commonly used method for Salesforce-Heroku integration– syncing only object and table data. It offers both data proxies and data replication for Salesforce. It comes as an add-on to synchronize data between Salesforce objects and the Heroku-Postgres database attached to the Heroku application. This helps with data replication. The Salesforce objects are determined with Postgres tables. It maps the object fields to the columns in the table.

    2.  Salesforce Connect

    It is an app cloud integration service that allows users to access and manage data in external apps, directly from Salesforce. This method of integration would be effective when you need a framework to view, search, and modify data stored outside Salesforce. Salesforce Connect uses external objects for data proxy of external data into Salesforce, with no need to copy it into the database. These external objects are similar to custom objects, but they are used for mapping data outside the Salesforce Org.

    3.  Web Services Callouts

    You can tightly integrate your Apex with an external service just by making a call to an external Webservice, with an Apex Callout. An HTTP request can also be sent to an Apex code. The Callouts are useful for external processes in Heroku. Other than writing the callouts in Apex, workflow messages can also be used. This enables the events on Salesforce to trigger a Heroku process.

    4.  Salesforce REST APIs: For More Actions Post-Integration

    This is ideally used in scenarios when the client requires something more than data integration. Once the integration is all set to go, then the API enables the user to perform a number of actions on Salesforce. The REST API offered by the Salesforce platform can be invoked from a Heroku application. The API could be to interact with Approval Processes or to execute queries with SOQL/SOSL.

    dont miss out iconCheck out an amazing Salesforce Video tutorial here: Salesforce To RDS Integration Through Dell Boomi | Salesforce Tutorial

    Hassle-free Heroku-Salesforce Integration for your Business

    Heroku provides a great place to run apps that integrate with Salesforce for a variety of use cases. The microservices architecture of businesses has emerged as a way to decouple the pieces of a system into more easily maintainable, independently deployable services to provide endpoints that bring disparate systems together. Heroku helps running apps and microservices that you can use with Salesforce through a variety of integration methods. Turn towards Salesforce integration consulting services and find out how this integration can be helpful for your business.

  • Salesforce Evergreen | Scale Up Your Cloud Productivity With Ease

    Salesforce Evergreen | Scale Up Your Cloud Productivity With Ease

    The trend of Cloud-based services has forever changed the way we develop and deploy applications in the server. In spite of all the benefits that the Salesforce Platform has made available, there are many times we need to look for options outside of the Salesforce platform when we have complex processing requirements. The inherent challenge in having another platform to process and host the service needed is demanding and highly expensive. IT teams have been struggling with this necessity for some time now until Salesforce Evergreen stepped in with its serverless architecture.

    dont miss out iconDon’t forget to check out: The Most Common Types of Salesforce Integrations

    Introducing Salesforce Evergreen, the key to a peaceful developer life

    Salesforce Evergreen is a fully serverless platform that will relieve your developers from maintaining the infrastructure and assist them to scale resources as per requirement. It will be introduced into the Salesforce family as an addition to the Customer 360 platform and developer preview is currently available in the Spring ’20 edition. Salesforce Evergreen is a brilliant low code platform, powered by Kubernetes that allows you to write functions and create microservice patterns for your organization. These abilities are the result of a Server less Execution Model that comprises of fully secured and stateless data container, within which codes run dynamically. A wide range of actions like an HTTP request, alert monitoring, or uploading a data file can trigger these codes into action. Later, the code is sent to the cloud provider as a function, and the user will be charged for only what he consumed.

    Salesforce Evergreen is the harbinger of productivity and economy in this world of Cloud-based services. It saves your developer a great deal of effort and time by using modern industry tactics that include microservices and functions. Salesforce Evergreen supports functions written in languages like Apex, Node.js, and Java and can be used to write business logic that can be triggered with simple platform events. In addition, Salesforce Evergreen is complemented by robust Data storage like Postgres and Apache Kafka due to effective Data APIs of Salesforce, and their persistence. These adaptations will help you deliver a highly responsive and personalized experience to your customers and reduce the time to market with a dynamic and scalable approach.

    Scalability and Economy

    Salesforce Evergreen is a cost-effective solution, especially for startups and SMB(s), due to its ability to scale resources and the extent to which users can limit their Cloud usage. This ultimately enables the service providers to charge you for only what you have consumed.

    Time and Productivity

    Salesforce Evergreen is like a dream come true for your developers. It eases their life by eliminating the need to maintain and manage the backend server to deploy and develop applications. This boosts the productivity of the team and reduces the time to market significantly.

    Reduce code latency

    It significantly improves the accessibility of codes, as they are not hosted in any origin server. This makes the codes accessible from anywhere and can run applications in servers within the proximity of the user. Such ability helps to reduce latency in the code.

    dont miss out iconCheck out another amazing blog by DemandBlue here: Enhance Your Cloud Security With Salesforce Shield

    Effective Results

    Access to a low-code builder and microservice patterns is completely changing the paradigm of server-based architecture.

    • Microservices help the developers to build and maintain apps much easily with an autonomous approach.
    • The Low Code builder helps the user to transform apps quickly and provides a better risk management system.

    Be a Champ and adopt Salesforce Evergreen today

    With the release of Salesforce Spring ’20 edition, Salesforce Evergreen is going to be a game-changer this year for many startups and SMBs. Its agility and flexibility in every field of requirement make it a great choice for developers.

    Article Resource: Demandblue

  • Query on Big Objects in Salesforce

    Query on Big Objects in Salesforce

    Query on Big Objects

    Big objects can be queried by using SOQL or Async SOQL and because it is designed to handle a large amount of data that can be kept within a big object. We can use Async SOQL queries that run by using Rest API. Async SOQL can do queries on complex queries and then the custom Object stores the result, So it seems like only one Async SOQL can run at any given time or it run in a concurrent way.

    Note: In Asynchronous SOQL queries, there is one limitation and that is at one time, you can do only one concurrent query.

    Async SOQL and SOQL having so many of the same functionality. So you will decide according to the requirement when there is a use of Async SOQL queries and standard SOQL queries.

    Standard SOQL:

    If you want to changes in returned results instantly in a block of apex code, you can use the SOQL query when you want to query on a small amount of data.

    Async SOQL:

    It is Async SOQL so it’s working on Async operation you can query on millions of records.

    We can’t perform the aggregate function on queries because there is issued against indexed fields because indexed fields must be in order. 

    Query on Big Objects using SOQL

    The query on Standard and custom objects is different than the query on Big objects. When you are using SOQL queries you need to query in all fields starting from the first field and do not skip any field at the end in query because if you will skip any field it will return wrong data.

    For example: If you are query on three fields, you can query on all three fields.

    Ex:

    SELECT LastName__c, FirstName__c, Phone__c FROM Phone_book__b WHERE LastName__c=’001R01110302D3′ AND FirstName__c=’PC’ AND Phone__c =’243566′

    Note: Remember do not gap in the query because then it doesn’t work.

    Query on Big Objects using Async SOQL

    Using Async SOQL, after the query on custom big object you can direct the results directly into our target object. We extract the first field and second field data from a specific third field in our custom big object to our target object, then further we can use this results at anywhere for reports and for any analysis tool.

    Running process of Async SOQL Queries

    The query use in Async SOQL must be run in JSON-formate in the POST request because it runs in key-value pairs.  

    POST Request Body

    {
        "query": "SELECT fieldA__c,
        fieldB__c FROM SourceObject__c",
        "operation": "insert",
        "targetObject": "TargetObject__c",
        "targetFieldMap": {
            "fieldA__c":"fieldATarget__c",
            "fieldB__c ":"fieldBTarget__c"
        },
        "targetValueMap": {
            "$JOB_ID":"BackgroundOperationLookup__c",
            "Copy fields from source to target":"BackgroundOperationDescription__c"
        }
    }

    The response of an Async SOQL query includes the elements of the initial POST request

    POST Response Body

    The response body contains the query’s jobId, the status of your query, and any relevant messages.

    {
        "jobId": "08PD000000003kiT",
        "message": "", "query": "SELECT fieldA__c,
        fieldB__cFROM SourceObject__c",
        "status": "New",
        "targetObject": "TargetObject__c",
        "targetFieldMap": {
            "fieldA__c":"fieldATarget__c",
            "fieldB__c":"fieldBTarget__c"
        },
        "targetValueMap": {
            "$JOB_ID":"BackgroundOperationLookup__c",
            "Copy fields from source to target":"BackgroundOperationDescription__c"
        }
    }

    Tracking the Status of Your Query

    You need to specify the jobID with the HTTP GET request so that if you want to track the status of a query and its results.

    https://yourInstance.salesforce.com/services/data/v38.0/async-queries/

    The result of response returned after the query is similar to the initial POST response with the updated status.

    Hope this will help you!

    Thanks.