Thursday 27 October 2016

Code Coverage Best Practices Part 2

6:56 pm


Last time I have explained to you guys that we can use SOQL and Tooling API to get the estimated code coverage. Read About Part 1: http://forceastute.alexislam.com/2016/09/code-coverage-best-practices.html

And now I would like to the use Tooling API to export as Excel format. 

Step1: Using the below SOQL 


Select id,ApexClassorTrigger.Name,NumLinesCovered,NumLinesUncovered from ApexCodeCoverageAggregate


Step2: Create a Apex class to make a HTTP Callout to the Tooling API Endpoint


HttpRequest req = new HttpRequest();
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());
req.setHeader('Content-Type', 'application/json');
req.setEndpoint(URL.getSalesforceBaseURL().toExternalForm()+'/services/data/v33.0/tooling/query/?q=Select+id,ApexClassorTrigger.Name,NumLinesCovered,NumLinesUncovered+from+ApexCodeCoverageAggregate');
req.setMethod('GET');
Http h = new Http();

HttpResponse res = h.send(req);



You can also test it by using Salesforce workbench.
1. Login workbench.developerforce.com
2. Using "Get" HTTP method and using below request: 
/services/data/v37.0/tooling/query/?q=SELECT+PercentCovered+FROM+ApexOrgWideCoverage
Step3: Create a new Apex function to parse this response JSON 

public class JSON2Apex {

public class Attributes {
public String type;
public String url;
}

public class Records {
public Attributes attributes;
public String Id;
public ApexClassOrTrigger ApexClassOrTrigger;
public Integer NumLinesCovered;
public Integer NumLinesUncovered;
}

public class ApexClassOrTrigger {
public Attributes attributes;
public String Name;
}

public Integer size;
public Integer totalSize;
public Boolean done;
public Object queryLocator;
public String entityTypeName;
public List records;

public static JSON2Apex parse(String json) {
return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
}
}

Step4: Using ContactType in Visualforce Page

<apex:page controller="ExportTestCoverage" contentType="application/vnd.ms-excel#Coverage.xls">

Friday 7 October 2016

Salesforce.com Buys a data management platform, Krux

3:41 pm


Salesforce.com agreed to buy marketing data specialist Krux for a reported $700 million, as Salesforce's acquisition spree overshadows its annual Dreamforce customer conference.

With this agreement, Krux are bringing together Salesforce’s #1 CRM platform with Krux’s category-leading data management platform (DMP), the Intelligent Marketing Hub™. As a part of the Salesforce ecosystem.

Krux will also extend the Salesforce Marketing Cloud’s audience segmentation and targeting capabilities to power consumer marketing with even more precision, at scale. In addition, Krux will feed Salesforce Einstein with billions of new signals, enabling companies to be even smarter about their customers. Krux and Salesforce together will empower every company to deliver more relevant and valuable consumer experiences across every touch-point.

What's Krux?
http://www.krux.com/
Krux was founded in 2010 and specializes in data analysis and intelligence for marketing, sorting first- and third-party data sources to build a more comprehensive picture of consumers. The company had previously raised $50m in funding, and worked with brands including Spotify, Kellogg’s, Warner Brothers and Peugeot.

What's Krux Intelligent Marketing Hub?

Krux helps companies put data to work to orchestrate breakthrough brand experiences, deepen consumer engagement, and drive business results. Having evolved well beyond its DMP roots, Krux now serves as the Intelligent Marketing Hub, a data decision system that helps marketers, media companies, and agencies drive more relevant, more valuable media, content, and commerce experiences.

The Krux platform captures people data from multiple screens and sources, unifies the data to identify and understand individual preferences and expectations, and activates the data across every channel in 'right time' and 'real time'. This allows Krux to help companies create and reinforce consumer relationships through a virtuous cycle of valuable interactions and experiences.


Salesforce + Krux + ExactTarget  + AI Einstein = Marketing Cloud? What's next?
This purchase comes as Salesforce eyes a much larger prize: Twitter. The acquisition of Krux could nicely complement such a deal. Boasting current customers such as Ticketmaster and L’Oréal, Krux deploys AI to analyze audience signals in order to help advertisers develop a holistic view of individual customers. Krux should fit into the Salesforce ecosystem either way, but a possible combination with Twitter would only add to its treasure trove of consumer data and could make the Salesforce marketing cloud an even more significant player in ad-tech.

Monday 3 October 2016

Skype for Salesforce is currently in beta!

4:56 pm


According to the Blogs.Office.com's recent post, the Microsoft and Salesforce partnership is growing. And now the Skype Web SDK has been used to create Skype for Salesforce.

Skype for Salesforce
Skype for Salesforce surfaces the capabilities of Skype for Business Online directly within Salesforce to give sellers the ability to communicate in real-time with colleagues straight from the Salesforce Lightning Experience.

Simply hover your mouse over a name in the activity timeline, a record or a list and you can immediately see whether a coworker is online and available. The ability to see a person’s status, within the context of a CRM activity, allows you to choose the most effective form of communication. For example, if you need feedback on an action and that person is on a call, an email may be appropriate, but if that person is available, you could get an instant response via chat. You can start a chat, voice call or video call with a single click and without the need to switch to a different application. With real-time communications embedded directly in Salesforce, you can significantly reduce the turnaround time on sales tasks and customer queries.

Q. What Microsoft and Salesforce subscriptions are required to use Skype for Salesforce?
A Skype for Business Online and Salesforce Enterprise or Unlimited Edition subscription is needed to use Skype for Salesforce. Skype for Business Online is included with many of the Office 365 plans, including Office 365 Business Essentials, Office 365 Business Premium, Office 365 Enterprise E1, Office 365 Enterprise E3 and Office 365 Enterprise E5.


Q. What browser can we use this feature?
Skype for Salesforce is currently in beta and only available to Salesforce Enterprise or Unlimited Edition customers who also have a Skype for Business Online sign in. The beta is also only supported currently in Microsoft Edge and Apple Safari, but there are plans for additional support in Chrome and Firefox in the near future.

Q. How do I enable Skype for Salesforce?
A. Salesforce administrators can enable Skype for Salesforce for your organization. Detailed instructions can be found at Enable Skype for Salesforce.
http://docs.releasenotes.salesforce.com/en-us/winter17/release-notes/skype_for_salesforce_enable.htm


Q. Is the new Lightning Experience required to use Skype for Salesforce?
Yes, you will need the Lightning Experience to use Skype for Salesforce.

Back to Top

What I Can Help

SALESFORCE CUSTOM SOLUTION DESIGN

SALESFORCE STRATEGY AND PLANNING

Do you wanna share posts

I am always looking for writers that have something interesting to say about Salesforce. Whether you have a post in mind or would like to collaborate on one, get in touch! - Click Contact Me