Salesforce™ Health Care Domain Project | API Integration with Dr. Chrono API
Aug24

Salesforce™ Health Care Domain Project | API Integration with Dr. Chrono API

I have worked on many API integrations of Salesforce to other 3rd parties and here I will be sharing my coding experience with Salesforce to Dr.Chrono API integration. One my end clients requested this plugin/ app to be created in Salesforce which will do the Doctors, Patients and other information syncs between the two platforms. Below image shows “integration mind mapping” used by me. I use it to consider some major aspects while discussing integration approaches for this project. In this post, we will discuss how Dr. Chrono API can be used to integrate Salesforce™ with Salesforce™. But before moving forward let’s discuss the requirement of the project.   Data flow diagram https://docs.google.com/drawings/d/1U5MTgnjEuMOwcsGSX1tuRS6dUlZCWd-d6OPxDS9APbw/edit   App development strategy: https://docs.google.com/drawings/d/1jSAsd0TIVH6pY69Sj35t5N8s9Q3_OMZ2LueejZ-Lk_Q/edit?usp=sharing   The project requirements encurtails following. We have to integrate the dr. chrono API with Salesforce™ and create a plugin exclusively, it is a free Healthcare API and SDK built by developers, for developers. Leverage health data, an EHR, practice management and medical billing platform, beside it Dr.Chrono gets 22 Million API calls per month.   What is Dr. Chrono API? A company that helps people find quality care providers nearby, is using the Dr.Chrono API to integrate patient records into the service. This vastly improves the search experience, as patients are connected with doctors based on their medical history and set of conditions. There API uses  common web-based authentication system. It provides a straightforward way for a provider to grant access to their data to your application.   There are three main steps in the OAuth 2.0 authentication workflow. Redirect the provider to the authorization page. The provider authorizes your application and is redirected back to your web application. Your application exchanges the authorization_code that came with the redirect into a pair of access_token and refresh_token. Step 1: Redirect to Dr. Chrono The first step is redirecting your user to Dr.Chrono, typically with a button labeled “Connect to Dr.Chrono” or “Login with Dr. Chrono”. This is just a link that takes your user to the following URL: https://Dr.Chrono.com/o/authorize/?redirect_uri=REDIRECT_URI_ENCODED&response_type=code&Dr.Chrono_id=Dr.Chrono_ID_ENCODED&scope=SCOPES_ENCODED   Step 2: Token exchange Below code is used to obtain a pair of access token and refresh token like this:   import datetime, pytz, requests if ‘error’ in get_params:    raise ValueError(‘Error authorizing application: %s’ % get_params[error]) response = requests.post(‘https://drchrono.com/o/token/’, data={    ‘code’: get_params[‘code’],    ‘grant_type’: ‘authorization_code’,    ‘redirect_uri’: ‘REDIRECT_URI’,    ‘Dr.Chrono_id’: ‘Dr.Chrono_ID’,    ‘Dr.Chrono_secret’: ‘Dr.Chrono_SECRET’, }) response.raise_for_status() data = response.json() # Save these in your database associated with the user access_token = data[‘access_token’] refresh_token = data[‘refresh_token’] expires_timestamp = datetime.datetime.now(pytz.utc) + datetime.timedelta(seconds=data[‘expires_in’])   Roadblock (1): Refreshing an access token Access tokens only last 10 hours (given in seconds in the ‘expires_in’ key in the token exchange step...

Read More
SALESFORCE LIGHTNING COMMUNITIES
Feb13

SALESFORCE LIGHTNING COMMUNITIES

What if you can connect your customers directly to their business process?  What if you can interact with your favorite vendors? What if you can get all the information needed even through your mobile devices? What if…What if……these if’s are never-ending. Let’s tighten our belts and dive into what exactly communities are all about. Communities are generally an online platform that can connect members directly with each other. It enables rich collaboration between employees, customers, partners, suppliers, and distributors. It helps people to interact with relevant content, data and business processes. Like a magic wizard, it has the power of social with mobile participation, trusted security and direct connection to business processes. “It focuses on deep understanding just for people’s sake.” Communities deepen customer relationships and very well understand the rapidly changing needs of customers. With including enterprise security and tight integration with business processes it goes beyond our thinking by adding social collaboration, extensive branding, customization and mobile access. WHAT I CAN DO OUT OF IT??… To gain deeper relationships with customers you can create communities. You can easily empower employees to connect and collaborate according to the business needs. Since it uses Salesforce so you can easily connect any 3rd party system directly to your community. You can create multiple communities according to your business needs. TYPES OF COMMUNITIES SUPPORTED:   Customer Communities It provides collaboration, mobile access, and consistent branding even for large groups. The benefit is that it enables customers to answer questions from other customers. It is an interactive platform where we can connect and quickly get the information needed. Even the support is provided by sales-rep to resolve the issues. This community build trust with customers and security for long-term engagements. Partner Communities With its power of Role-Based security, it ensures a strong bond with the business process. It helps us to segment data which is shared with different members. It ensures collaborative selling between partners. FEATURES OF SALESFORCE COMMUNITIES: Communities provide deep integration into the business process. The key features of it are as follows: Business Process Integration: It helps members to raise cases, sales opportunities or campaigns from within the community. Employees can easily share and access files. It helps to drive more sales by connecting your employees with resellers and distributors. Social Collaboration: People can create small groups and can interact easily with goals according to their interest. One can manage social listening, content, engagement, workflow all in one place. Branding/Customisation: Companies can easily customize their websites according to the look and feel they want for their website. Members are free to meet their needs and requirements. One can create...

Read More
SALESFORCE LIGHTNING COMMUNITIES
Feb13

SALESFORCE LIGHTNING COMMUNITIES

What if you can connect your customers directly to their business process?  What if you can interact with your favorite vendors? What if you can get all the information needed even through your mobile devices? What if…What if……these if’s are never-ending. Let’s tighten our belts and dive into what exactly LIGHTNING communities are all about. LIGHTNING Communities are generally an online platform that can connect members directly with each other. It enables rich collaboration between employees, customers, partners, suppliers, and distributors. It helps people to interact with relevant content, data and business processes. Like a magic wizard, it has the power of social with mobile participation, trusted security and direct connection to business processes. “It focuses on deep understanding just for people’s sake.” Communities deepen customer relationships and very well understand the rapidly changing needs of customers. With including enterprise security and tight integration with business processes it goes beyond our thinking by adding social collaboration, extensive branding, customization and mobile access. WHAT I CAN DO OUT OF IT??… To gain deeper relationships with customers you can create communities. You can easily empower employees to connect and collaborate according to the business needs. Since it uses Salesforce so you can easily connect any 3rd party system directly to your community. You can create multiple communities according to your business needs. TYPES OF COMMUNITIES SUPPORTED:   Customer Communities It provides collaboration, mobile access, and consistent branding even for large groups. The benefit is that it enables customers to answer questions from other customers. It is an interactive platform where we can connect and quickly get the information needed. Even the support is provided by sales-rep to resolve the issues. This community build trust with customers and security for long-term engagements. Partner Communities With its power of Role-Based security, it ensures a strong bond with the business process. It helps us to segment data which is shared with different members. It ensures collaborative selling between partners. FEATURES OF SALESFORCE COMMUNITIES: Communities provide deep integration into the business process. The key features of it are as follows: Business Process Integration: It helps members to raise cases, sales opportunities or campaigns from within the community. Employees can easily share and access files. It helps to drive more sales by connecting your employees with resellers and distributors. Social Collaboration: People can create small groups and can interact easily with goals according to their interest. One can manage social listening, content, engagement, workflow all in one place. Branding/Customisation: Companies can easily customize their websites according to the look and feel they want for their website. Members are free to meet their needs and requirements. One...

Read More
Journey Builder
Oct15

Journey Builder

Built on ExactTarget’s FUEL platform for the Salesforce ExactTarget Marketing Cloud, Journey Builder will enable marketers to map customer journeys to digital marketing interactions, such as email, mobile, social and Websites, to power personalized customer experiences that dynamically evolve based on consumer or customer engagement. Journey Builder’s user-friendly interface makes it easy to visualize and map the path of each customer’s journey with your brand. Whether your campaigns include online channels such as email and mobile, or an offline channel such as direct mail, Journey Builder enables you to increase campaign performance and drive customer satisfaction. Journey Builder is another system that is built on top of Contact Builder. In the past, when we set up trigger events for clients, they had to be custom-built by the services implementation team. Journey Builder changes that. Rather than requiring these triggers to be custom-built, this system enables clients to set up their own events that trigger on up to four specific trigger activities. As part of their configuration process, clients choose how long their website will wait for a customer to do something before letting his browsing session expire from inactivity. Most of these triggers are sent soon after a customer’s session expires. The types of available triggers include:  Post-Purchase: This event triggers immediately after an order is placed. Abandon Browse: When the customer allows the browsing session to expire, this event triggers within five minutes of the session expiration. Abandon Cart: If the customer allowed the session to expire while objects were still in the shopping cart, this event triggers within five minutes of the session expiration. Affinity Change: If, by the end of the customer’s browsing session, a new attribute/value pair enters into the top first or second affinity slots of the customer’s profile that was not previously in the top five at all, this event triggers within five minutes of the session expiration. Journey Builder for Apps is the first solution that empowers any company to deliver personalized customer journeys directly from mobile apps, creating interactive experiences that drive brand engagement and loyalty. With Journey Builder for Apps, any company can now unleash the power of the world’s #1 CRM platform to seamlessly connect the customer journey across sales, service, marketing and communities. Companies including FitBit, Sony PlayStation, HSN, SkyMall and Luxury Retreats are making the shift from campaign-focused marketing to personalized 1:1 customer journeys to connect with customers in entirely new ways. The Seven Stages of Successful App Journeys To create this relationship, marketers and developers must understand the stages of highly successful app journeys. #1 Discovery Most app journeys start with discovery in some form, such as a friend’s recommendation or...

Read More
Territory Management In Salesforce
Oct05

Territory Management In Salesforce

Territory management is critical to businesses of all size. By aligning sales teams to specific territories (industry, geographic, product-based), companies can make the most of their resources at the lowest cost. Aside from the boost in productivity, businesses are able to increase overall revenue by ensuring that all market segments are covered. Having an informed, data-driven plan in place allows companies to focus on growth and scaling up for the future. In particular, small businesses can benefit from a thorough territory management plan, where resources and budgets are limited. You don’t have to be a large enterprise company to strategize like one. What is a Territory? Represents a flexible collection of accounts and users where the users have at least read access to the accounts, regardless of who owns the accounts. Only available if territory management has been enabled for your organization.  Customizable Forecasting Since Customizable Forecasting is a prerequisite for Territory Management, We should understand this as well. Customizable Forecasting is a flexible solution for estimating how much revenue your organization can generate or how many items your organization can sell. You can set up customizable forecasting to reflect how your organization forecasts its sales. With it, you can forecast on a monthly or quarterly basis, use different dates when applying amounts to forecasts, a forecast based on revenue or quantity or both, and define additional quotas based on product families. Use customizable forecasts to review your forecast and drill down through your forecast amounts to see the opportunities included in your forecast. Override forecast amounts directly from the opportunity or overrides the forecast from the Forecasts tab without notifying users below you in the forecast role hierarchy.  Territory Management Territory management is an account sharing system that grants access to accounts based on the characteristics of the accounts. It enables your company to structure your Salesforce data and users the same way you structure your sales territories. Particularly if your organization has a private sharing model, you may need to grant users access to accounts based on criteria such as postal code, industry, revenue, or a custom field that is relevant to your business. You may also need to generate forecasts for these diverse categories of accounts. Territory management solves these business needs and provides a powerful solution for structuring your users, accounts, and their associated contacts, opportunities, and cases. When thinking about territory management, it’s natural to assume that you need to use the Territory Management feature to model your territory hierarchy and manage your territory assignments. This assumption might be true for some customers in some situations, but all customers should consider this feature one option...

Read More
Cloud For Business
Sep08

Cloud For Business

According to a recent survey of over 300 tech consumers, it was found that 91% of people heard the term “Cloud” along with knowing what exactly cloud is. There were around 6% of people who heard the term but were not aware of what cloud is and only 3% were there who never heard the term “Cloud”. If you are the one who doesn’t know what cloud is then, it’s right time for you to get familiarized with the term.   HOW CLOUD TECHNOLOGY HELP YOUR BUSINESS? Cloud helps you reducing cost, increase your storage, easy to setup and provides worldwide access. Everyone has come across these pros and cons of Cloud but now let’s dive into a different world. Here instead of looking into the extreme details and writing everything, let’s focus on stats. It will help you clear your doubts and will make your understanding better. 42% It helps to access data from anywhere, at any time and on any device. It helps in increasing productivity and allows the exchange of information in a much faster way. 20% Secure storage of data in a central location and away from the office. This percentage is low because we have a single server and multiple users who are using the same server. Your data is with the third party so this is always a matter of concern especially protection of data from viruses and malware. Though there is always a way out so for the same you can opt for customizable spam filtering and take effective measures. 10% Potential to reduce cost. As everything is online so there is no need to install any software for the same. There are many applications which provide us with free cloud usage. One can easily increase memory size and storage capacity in very low prices. It provides an advantage to the buyers too by providing them to pay on a monthly or yearly basis for their plan. It becomes very flexible as it comes with “Pay and Use” model. It charges only for the services you use and one can terminate it anytime without providing any further costs. 5% Less need for servers and other storage hardware. It provides cloud computing to get set up in a just couple of minutes. One can adjust the settings and setup passwords and choose the platform where to use. It reduces the cost of storage as we no longer need any kind of hardware. With the cloud, we don’t need too many servers which make our lives a lot easier. 4% Better Collaboration and Sharing across the workforce. It provides effective communication among the clients...

Read More
Salesforce Web to Lead Integration with Drupal 7
Feb08

Salesforce Web to Lead Integration with Drupal 7

Drupal is a CMS and Salesforce is a CRM. Ever thought to integrate these two platforms and explore new things and uncover the benefits which you get doing this? Salesforce is quite configurable and Drupal has plenty of modules to work upon as you wish. To make them synchronize to work them similar to web-to-lead form you just have to follow these steps: Install module in your Drupal 7 Org.: https://www.drupal.org/project/sfweb2lead_webform 2) Generate web-2-lead form from your Salesforce org. having fields you want to display in your webform. 3) Create a webform or clone the existing one. As you want. For cloning your webform there is a need to install following module: Node Clone: https://www.drupal.org/project/node_clone In order to create new form: Home>>Administration>>Content>>Add Content 4) Add title to your newly created web form. 5) Add components to your webform 6) In order to link it with Salesforce, click the option “Salesforce Web2Lead”. 7) Check the option asking to submit to Salesforce. Also, provide Lead Source for web form. 8) Now map your form fields with that of the Salesforce fields Administration>>Configuration>>Web Services>>Salesforce Webform While mapping fields you will be seeing a mapping table having two columns: Key: Webform fields Value: Salesforce fields NOTE: Enable debugging mode in it and you can see the logs of the data entered If you are integrating with your Sandbox Environment then provide “test.salesforce.com” instead of “www.salesforce.com” 9) To have a look on your Drupal log reports Administration>>Configuration>>Reports>>Recent log messages 10) Now you can check your leads in Salesforce STYLING YOUR WEBFORM After completion of your webform do you want to style it to make it more attractive? As an example let us show label inline of the form instead of displaying it alongside. What you have to do is just to install a new module Compact Form , configure it and you are done. Now go to: Administration>>Configuration>>User Interface Provide your webform id there NOTE: To know your form id you have to just inspect your form and get form id from there. Now this is how our web form looks like after styling: HOW TO INTEGRATE SALESFORCE PICKLIST VALUE WITHIN DRUPAL WEBFORM? It’s always helpful to know somethings extra. Make your form dynamic. For bringing Salesforce Picklist in Drupal 7 here are few steps to follow: 1 Install the module for it. It requires following: Drupal 7 Salesforce Suite 7.x-3.x Webform Behavior weights 2 Configure the module and you are done. 3 Just go to your webform components and add new Component. Choose type as Salesforce Picklist. 4 Choose a picklist present in your Salesforce Object which you want to join with your...

Read More
SKUID-Scalable Kit for User Interface Development
Jan10

SKUID-Scalable Kit for User Interface Development

SKUID SKUID has always been my favourite since the first time I saw this in Dreamforce 2014. My first interaction was with their team on Dreamforce booth and the after understanding its capabilites I was amazed! SKUID is set of tools that allow you to change almost any element of your Salesforce User Interface, quickly and easily. We can quickly implement any changes as per suggested by your team, across your org and even in Production. It is basically used to build the UI to have a look on the data your company needs. STORY: Salesforce connected Rich (Rich Slack, CFMO of Chrysalis and CEO of Meridian Meds) with a private developer who would charge $300,000 – $500,000 to build out their user interface. It was a non-starter. Rich decided to kill the Salesforce project and hire a team of developers to create their own platform. However, the team hit many roadblocks. Rich realized that Salesforce could do what he needed if he could figure out a way to overcome the gap of user interface. That’s when he found Skuid. Within 2 days, Rich had re-skinned the user interface of his app within Salesforce. He rebuilt his entire system during his nights and weekends in four months.  Let’s get Started with SKUID: Compose your new page from Skuid Central tab in your Salesforce Org Connect your Salesforce objects and external data through models present in Skuid. For each MODEL, choose the standard and custom fields from your Salesforce objects that you want to include in your page, and can even set criteria for the records to get display on your page. You can create as many model as needed. The only thing to know is that they will be loaded the way they are listed. For each model we have: Fields: Fields refer to the fields from the object which we want to show in our page. Conditions: They apply criteria for the records which are to be shown onto the page. Actions: They help us to specify the actions which we want our page to perform after some event. We have two properties for Model which are Basic & Advanced. Basic properties let you define the model Id, data source type, SObject name, model behaviour, number of pages to be displayed etc. Advance properties let you have a look on cloning the data, Query Deleted, Update Salesforce Recently Viewed Info etc. Skuid provides you with pre-built components which can be used to create your own page. Also you can create your own components. There is only the need to drag and drop those pre-built components and you can...

Read More
5 things about Salesforce Certification
Jan03

5 things about Salesforce Certification

This blog is for the Developers who wants to get a Salesforce Developer I Certification . What is Salesforce Certification? Why is it so important for the developers seeking a career in Salesforce? Salesforce certification is vital to the salesforce career path as it differentiates you from other developers, makes you an expert in your field. This Certificate is provided by salesforce.com where people demonstrate and prove their technical Skills in different  areas of Salesforce. It’s a damn good certification, if you are thinking about a career in Salesforce, by enhancing your skills and expertise in respective fields. It is very easy to get hired in an organization with  a salesforce certification in hand. You need to follow these steps  to enroll  for examination : First you have to create your webassessor Account on             https://www.webassessor.com/wa.do?page=createAccount branding=SALESFORCE Secondly Register and schedule your exam Five  things you must know while preparing for salesforce certification:-  Course Content  and their  weightage -: The Salesforce Certified Platform Developer I exam measures a candidate’s knowledge and skills related to the objectives listed below. A candidate should have hands-on experience of developing custom applications on the Force.com platform and have demonstrated the application of each of the features/functions below. 2. Prepare each topic with written practice of programs. Exploring it on trailhead will be a  great start. It will provide huge knowledge for practical implementation. In different areas. Below is the  link to access trailhead: https://trailhead.salesforce.com/ 3. Go through /Solve previous years certification:- Preparing from previous year question papers is always a good strategy to cover frequently asked topics in a short span of time.  4. Practice as many Mock test papers as possible once you think you have a good command on Salesforce syllabus. Mock test papers are available on various websites for free where you can practice them. Do register yourself  if required (as asked by some of the websites)  5. And last but not least, be confident and relaxed while writing the exam and remember the best way to gain confidence is to do more and more practice. According to my exam experience every aspirant must prepare well in the following topics as most of the questions I faced in the exam were from these topics : Validation Rule Workflow Rule Process Builder Object Relationships So all the best guys for exam. The exam is simple and easy. All you need is to do...

Read More
Salesforce Appexchange Checkmarx Major Issues
Dec19

Salesforce Appexchange Checkmarx Major Issues

Every Organization that creates it’s own App faces this huge challenge of getting the clearance from Salesforce Security Review. After completing the checkmarx clearances we submi the app for a final Security Review to Salesforce. This is the step where your app is human tested in testing org as well as in packaging org. This rigorous testing is mostly on the app security and functinality. I have seen several apps not passing this final Salesforce Security review and that too multiple times. Several of my last projects in 2016 have been just to do a line by line code review of the entire app and suggest changes before submitting for final review. Since a final review takes atleast 4-6 weeks most of the intelligent clients strategize this properly and get the code review and indepth analysis done with Salesforce wizards or experts. Now, in this blog I will explain some of the major issues and their solutions which are found in the Salesforce Security Review. Following are the list of major issues found in the app: 1.SOQL SOSL Injection 2.CRUD 3.Stored  XSS 4.Reflected XSS These four are the major as well as the common issues found in the app. I am sure you guys also must have come across these issues if you have worked on the Salesforce app. Now we will discuss one by one about these issues in detail. I will explain you the reason for the occurence of these issues as well as the possible solutions which could help you in overcoming these issues. SOQL and  SOSL Injection So the first major issue that is faced by the developers for developing any Salesforce App is  SOQL SOSL Injection. Reason For Occurrence: The SOQL SOSL Injection issue occurs when there is need for the user supplied input and if this input is being used for the dynamic SOQL query. In such a scenario what happens is if a user provides an unexcepected value which is not validated then it could change the meaning of whole query. Example: String Str= ‘SELECT Id, Name, Employee__c FROM Contact  WHERE  Employee__c= +StrList’  ConList=database.query(Str); Now In this kind of query where special characters are used for fetching data the meaning of whole query changes. SOLUTION: To remove the SOQL-SOSL Injection error from our code. We have to use the String.EscapeSingleQuotes()  method in the dynamic query wherever an user input has been provided in the query. Now we will use the String.EscapeSingleQuotes() method for correcting the above query So that it does not throw the SOQL-SOSL injection Error. ConList=database.query(String.escapeSingleQuotes(Str)); CRUD ISSUE: CRUD issues occurs in Salesforce when we are trying  to insert, update, or...

Read More