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...

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,which is promoted on social media networks with real likes and views, provided by the professionals from the trusted social media company, 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...