Wednesday, 8 August 2018

Salesforce Lightning Connect Real Time Exp


What is Salesforce Lightning Connect ?

This is a framework that enables to view,search and modify data that is stored outside Salesforce Org.
It is very effective way of data integration.



What are the benefits ?

  1. Real Time Data  Access: Data access is on-demand & Real time with out copying the data into your org can access external  data source.So no data duplication.
  2. Code Free : Completely code free,Can be achieved by points and click 

Any blockers to implement this solution?

Few things need to know ,Before finalizing this solution
  1. Additional Cost : Price starts  $4,000 per month per data source 
  2. External Data Availability Should be  by :  Either
    • oData API's - Refer
    • Custom Salesforce Connect Adapter - Refer (Or)

Using lightning connect Salesforce objects can be accessed by external data source?

No

Ex: SQL server  integrated to Salesforce through Salesforce lightning connect.

Case1 : SQL server tables will be accessible in Salesforce ? Yes
Case2 : All the Salesforce objects will be accessible in SQL Server ? No

How to access Salesforce Objects in External Data Source ?

By using ODBC / JDBC Drivers,
But Salesforce doesn't have any native ODBC/JDBC drivers as of today.Refer.

There are commercial solutions are available.
  • Easysoft
  • cData
  • devart
  • Progress

Lightning Connect  VS REST API ?

Lightning Connect uses OData Protocol and commonly accepted methodologies like REST for the web.

So question is,If we have other REST API already built to access the external data source,Then which will be better option among those two?

It depends on the project requirement,Design decision will be chosen

Lightning Connect
REST API
Directly allow  to access the external data source like custom object of Salesforce.Which called as external object.
Data will not able available in Salesforce, Each time on request get response and parse and show as per requirement.
Can directly build relationships.
·         Indirect Relationships
·         External Relationships
Can Use Salesforce Reports & Dashboards, Page Layouts
No, We cannot leverage any standard salesforce OOB functionality like Reports and Dashboards, Page layouts, Relationships.

Additional cost 4k$ /Per Data Source / Month
No additional cost
Dependency: OData API should be exposed on the data source, If already not available need to build for that particular data source.
No dependency

Lightning Connect replaces ETL tools ?

Not exactly,
ETL approch physically moves the data where as lightning connect does not.
So it's based on the use case need to choose the suitable solution. 

What is External object ?

External objects map to the data located outside your Salesforce org & It’s similar to custom objects.
o   External objects ends with “__x

Custom Object VS External Object ?


Feature
Custom Objects
External Objects
Data stored in your org
Yes
No
CRUD
Yes
Yes,
Write (Limited)
Tabs
Layouts
Visualforce
Field Level Security
REST & SOAP API
Yes
Yes
SOQL
SOSL
Report & Analytics
Chatter
Yes
Yes (Limited)
Sharing
Yes
No
Formula Fields
Workflows
Trigger
Batch Apex
Yes
Not Yet
Search
Yes
Yes (Limited)
Global  search only by text, text area and long text area fields


Indirect Look Up & External Look Up Relationships ?


External DataSource --> Validate And Sync :

On click of that button,Gives the refresh data from external system. 

Note : On click of Validate And Sync the relationships will be cleared,Need to create again ,Please think if required then only click on that button

External Object In Test class : Currently you can not get the external object in test classes,It needs to be implemented with a work around.

Name few enterprise built-in OData service?

  • Progress DataDirect Cloud
  • SkyVia
  • MuleSoft

Implementation using enterprise built-in oData Service - Progress DataDirect Cloud ?

DataDirect Cloud provides real-time connectivity to on-premise and cloud data

SNO
Task
More Details
1
SQL Server Database Login Details
SQL Server Database Credentials
·         User Name
·         Password
·         Database Name
·         Server Name
·         Port Number 

2
DataDirect Cloud Login Account
DataDirect Cloud provides real-time connectivity to on-premise and cloud data.
·         Create an account
·         Login à Downloads à DataDirect Cloud Driver Downloads à Install à Get the Connector ID
·         Login à DataDirect Cloud à Data Sources à Select SQLServer à Create SQL Server Data Source à Test Connection à On Success à Save
·         Configure SchemaàSelect Schemaà dboàSelect all the tables /views which would like to expose to Salesforce à Select the primary key on column
·         Go to OData  à Access URI

Note: This Access URI should be given in Salesforce  à New External Data Source à URL

3
Salesforce Login Account
Login à Set up à Build à Develop à External Data Sources à

Select like below values


Type
Lightning Connect OData 4.0
Parameters à
URL
OData  à Access URI from “DataDirect Cloud Login Account

Authentication àIdentity Type
Named Principal
Authentication àAuthentication Protocol
Password Authentication à Enter DataDirect Cloud Login à User Name & Password
Save à Validate and Sync à External Objects

Result: Finally exposed tables/views can find in the External Objects  J

Further : If would like to see in the external object in the new tab, Create new tab for each external object and configure the page layout accordingly to view the fields
















Sunday, 15 July 2018

Einstein Bot Creation Step By Step

What is Bot ?

A bot (short for "robot") is an automated program that runs over the
Internet.

Bots are like virtual assistants.

Ex Virtual Assistant [Voice,Text Based]: 
Alexa, Siri,Cortana, Google Assistant, Slack, WeChat, Kik, Facebook Messenger, Telegram,Xiaoice

Some bots run automatically, while others only execute commands when they receive specific input.

What  is the current & future news on Bots?


Bots are becoming the main interface between humans and machines,

Conversational interface is future. That can be seen within few years.

Many apps are struggling to get into Mobile / Tabs ,Future is Bots.

Use case for Bots ?


Customer Service Industry,

In this area we can see lot of routine/repeated request from different customers.
Automating this with Bots help in providing better service which improves performance & save’s lot of money.

Name few Bot frameworks ?

  • Microsoft Bot Framework
  • IBM Watson
  • Einstein Bot Framework

Explain Einstein Bot Framework ?


Salesforce believes AI will bring tremendous value to business and wants to make its AI powered platform easily available: through point and clicks, declarative, no code.

Ex: chatbot

What is Chatbot ?


A Chabot, in general, is a service that is powered by predefined business rules, scripts and artificial intelligence through a conversational interface.

What is Einstein Bot builder?


The Einstein Bot Builder is the new point-and-click setup tool that allows us to build dialog in a bot. 


Steps to create & Successful train Bots?


Step 1 :

Switch to lightning experience  --> Service --> Service Cloud Einstein --> Einstein  Bots --> Select to turn on 


Step 2 :

Once the Einstein Bots are turned on,It will trigger an email to your registered mail id to link your Salesforce Einstein Platform Services account to a certificate in your Salesforce Org.



 After creating certificate from the mail click on the select a Salesforce Certificate,It will redirect to below screen,Select the created certificate




Step 3 :
Create new Bot 




Create new dialogues intents : 


Step 4 :Go to Overview and click on Train Bot,It will change the status from New --> Queued --> Success / Failure


Step 5 :This is to enable Bot to Snap-In Chat,Click Set up Snap-In Chat

Step 6: Verify the activated Bot is configured in "Chat Buttons and Automated Invitations 



Step 7 :Preview the Bot connectivity,It's important to fill Pre-chat info (Or) Change the Snap-in to the basic scenario


Step 7 :Finally submit and it will connect to Bot instead of any live agent




Step 8: Place this chat button in any Force.com Site / Community 


Finally Successfully created,trained and connected a Bot :)


Thursday, 5 July 2018

Automate Masking Sensitive Data In A Sandbox

Explain what is  Data Masking ?

Data masking replaces real data with functional fictitious data so that it can be used safely in situations where actual data is not needed.

Use Case :  



Our organization holds lots of sensitive data, specifically in the Account/Contact objects. We also use multi sandboxes for development, and as a security step, would like to mask (de-sensitive) selected fields once we have refreshed our sandboxes from production.  This refresh task would likely take place at regular intervals.

Ex: Email Id/Phone / Mobile / etc

Name few tools to perform data masking? 

  • Informatica Cloud Test Data Management
  • Dataloader
  • Workbench
  • Dataloader.io

Problem statement using above mentioned tools ?


Manual process involved,
Ex: 
Using the data loader, you can mass update the records to remove any sensitive data. This is a manual process though, and it will need to be done each time the sandboxes are refreshed.

Can you provide the different solutions to make this task automated?

      1.Field Level Encryption: Applying the field level encryption to the sensitive fields in production, so that the fields would remain masked in the sandbox.

Note: There are some limitations of this
Ex: You can’t use the encrypted fields in SOQL “where/order” clauses

2.Vendor appexchange solution :
Ex:  OwnBackup
Note : Paid one

3.SandboxPostCopyInterface : To make your sandbox environment business ready, automate data manipulation or business logic tasks. Extend this interface and add methods to perform post-copy tasks, then specify the class during sandbox creation.

Note : I can say,This option is the best solution 

How to automate data masking using "SandboxPostCopyInterface"?

Step 1 :  Create an Apex class that implements SandboxPostCopy



Step 2 :  At sandbox creation, Specify above Apex class as per below image