Tag: Replace

  • 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

  • How to Upload File using the Button with the Guest User?

    How to Upload File using the Button with the Guest User?

    Step 1: Install these packages:

    • FlowActionsBasePack
    • FlowScreenComponentsBasePack
    • File Upload Improved

    Step 2: Create a Screen Flow

    • Create a screen element in the screen flow.
    • Create a record element in the screen flow.
    • Create Apex Actions in the Screen Flow.
    • Click Save.
    • Click Activate.

    dont miss out iconDon’t forget to check out: File Upload in Lightning Web Component (LWC) | All You Need to Know

    Step 3: Create a community site or experience site.

    Quick Find Box -> Sites -> Click New.

    Step 4: Give the object access and field level access in the case object with read and create. Use the following snapshot to give field-level access.

    Click the site -> Public Access Setting -> Search Case Object

    Step 5: Click the Assigned User Button in the Profile.

    Step 6: Click the Add Permission Set button at the bottom.

    Step 7: Assign the File Upload Improved Permission set to this user.

    Step 8: Create the Aura Component and Lightning Application. Use the below code:

    Aura Component Bundle:

    • embedFlowInExternalWebsite.cmp
    <aura:component implements="flexipage:availableForAllPageTypes,lightning:availableForFlowActions" access="GLOBAL">
    <aura:handler name="init" value="{!this}" action="{!c.init}" />
    <lightning:flow aura:id="flowData"/>
    </aura: component>
    • embedFlowInExternalWebsiteController.js
    ({
         init : function (component) {
              var flow = component.find("flowData");
              flow.startFlow("YOUR_FLOW_API_NAME");
              }
    })

    ** Replace the ‘YOUR_FLOW_API_NAME’ string with the name of the flow you want to run.

    Lightning Application:

    • embedFlowInExternalWebsiteApp.app
    <aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
    <aura:dependency resource="c:embedFlowInExternalWebsite"/>
    </aura: application>

    Step 9: Add your website’s domain to the CORS Allowed Origins List.

    Quick Find Box -> CORS -> click the New Button.

    Step 10: Run this code:

    <!DOCTYPE html>
    <html>
    <body>
    <script src="https://curious-bear-q4ztlr-dev-ed.trailblaze.my.salesforce-sites.com/lightning/lightning.out.js"></script><div id="lightningLocator"></div><script>
        $Lightning.use("c:embedFlowInExternalWebsiteApp",
            function() {
                $Lightning.createComponent(
                    "c:embedFlowInExternalWebsite",
                    { },                  
                    "lightningLocator",   
                    function(cmp) {}
                );
            },
            'https://curious-bear-q4ztlr-dev-ed.trailblaze.my.salesforce-sites.com'
        );
    </script></body>
    </html>

    ** Importantly here, you need to insert the URL to your Salesforce org in 2 places just before the /lightning/lightning.out.js.

    dont miss out iconCheck out another amazing blog by Aman here: What are Apex Triggers in Salesforce?

  • An Ultimate Guide to Salesforce Flow Builder User Interface

    An Ultimate Guide to Salesforce Flow Builder User Interface

    Toolbox – The toolbox contains the factors and resources you use to build your go with the flow.

    From the Elements tab, add new factors, like Screen and Create Records, on your go with the flow.

    From the Manager tab, create resources, consisting of variables, levels, and alternatives, to use on your glide. Or view a listing of all factors and resources which you’ve delivered to the waft.

    1. Canvas – The canvas is the running vicinity, where you build a flow by adding elements. As you add factors to the canvas and join them together, you spot a visual diagram of your go with the flow
    2. Button Bar – The button bar presents data approximately the float, together with:
      • Whether the waft is lively or now not.
      • How lengthy ago the glide changed into saved.
      • Whether the waft has any warnings or mistakes. To see warnings or errors, click on the respective icon.

    The button bar also includes buttons for running a glide: Run and Debug.

    • Run runs the most recent stored version of the glide which you have open.
    • Debug helps you to enter values for the float’s input variables and show debug info while strolling the glide. In that manner, you can affirm how the drift methods information.

    dont miss out iconDon’t forget to check out: Learn All About Flows and Plugins in Salesforce | The Developer Guide

    Every go with the flow is made of three constructing blocks: elements, connectors, and resources.

    Elements 

    Each detail is a step within the glide that instructs the go with the flow on what to do. Those instructions range based totally on which type of detail it’s miles. We like to consider waft factors in phrases of three one-of-a-kind buckets: displays, common sense, and moves.

    Screens

    Display information in your users or construct a shape to accumulate data from them with Screen factors.

    Screens consist of a treasure trove of out-of-the-field components that allow you to customize how customers interact along with your flows. Display textual content or pics on your customers. Request loose-form responses, including with a textual content container, or ask customers to choose from provided alternatives, which include with radio buttons. You can actually have the person add a report via the display.

    If you need extra from your glide displays, like custom navigation or a statistics desk, install 0.33-party additives or paintings with a developer to build custom ones.

    Logic

    Once you gather the statistics you want, what do you need to do with it? With logic elements, evaluate that fact and manage it in step with your enterprise requirements. Create branches, replace facts, loop over sets of records, or pause till a targeted time.

    Logic operates only in the flow. If you use common sense elements to assess or manage records in your go with the flow, the ensuing facts can’t be accessed after the waft finishes. Use a movement to shop that fact somewhere outside of the float.

    Actions

    Actions educate the flow to do something out of doors of itself, consisting of inside the Salesforce database or in an outside machine. Flows can appearance up, create, replace, and delete Salesforce statistics. They also can create Chatter posts, submit statistics for approval, and ship emails.

    dont miss out iconCheck out another amazing blog by Anjali here: Einstein Analytics: Data Sync Functionality Explained

    Connectors

    Connectors define the path that the waft takes as it runs. They inform the drift which detail to execute next.

    Resources

    Resources are placeholders that you reference at some stage in your float.