Salesforce is a great CRM tool, but what happens when all the data collected is not being used to its full potential? Unfortunately, the ML tools that are available to work with Salesforce data are only for CRM data and template-based. Meaning, they only work with Salesforce CRM data. You cannot bring data from other places, you cannot run other algorithms, nor prepare the data as needed, and the results cannot be put into production instantly. That’s where Datagran comes in. It allows you to bring in data from other sources, make data workflows that are completely customizable and it provides you with the tools to send that outcome to any of our available applications.


Introducing:

Salesforce as an Action


It's incredible how much data you can collect about your customers over time. It all starts with adding a contact in Salesforce, logging your emails, calls, and other interactions with them, and linking them to their company and colleagues. Add in purchases from your store, emails to your support team, form entries to join webinars and events, and more, and over time you have the data that could help you predict what customers will do, insights that could point you to the next action to take to close the deal.


One group of customers does one thing, so odds are other similar customers would follow the same patterns. If you can figure out what works for them, and find similar people, you can replicate your success and grow your business faster. As Bespoke Collection president Paul Leary described his team’s data-driven marketing:


“When someone makes a purchase with us, the next morning at 10 o’clock, they automatically get a personalized email... By placing emphasis on relationship-based sales instead of transaction-based, we’re able to increase customer retention and satisfaction, referrals, and order value.”


You’re probably already gathering data on your customers’ behavior, but predicting what customers will do based on that data is much more complex than what a CRM can do on its own. Plus, most of the best data is in other apps—not Salesforce.


Datagran can pull all your data together, find the needles in the haystack—the data that can help your team market more effectively, and then push it to Salesforce. With Datagran you are not only able to take advantage of relationship-based sales, but you can centralize all of your company’s data in one place, run models to predict how customers will act, and communicate with customers in a much more personal way.

If you’re already familiar with Datagran, you probably already know what a Pipeline is–if not, it’s a visual editor that lets you extract data from your favorite Apps, automate data workflows, run ML models and send the output to an App like Salesforce. It’s the companion you’ve always wanted for Salesforce.


Salesforce as an Action lets you build ML models and send the results to your Salesforce Marketing Cloud—or any of our supported Apps to build more detailed workflows. You can import data from several data sources—your Woocommerce-powered eCommerce store, MySQL customer database, and more—run a machine learning model like an RFM analysis, a Product Recommendation, or a Spark Regression algorithm, and send the results (like a cluster of customers) to your Salesforce Marketing Cloud to build targeted marketing workflows.



How to use Datagran with Salesforce?


Tutorial:


You’ll learn how to create or update a Salesforce contact list in Datagran from two different data sources: My SQL and Woocommerce. This will give you the ability to grab transactional data from Woocommerce and My SQL, and run machine learning models with specific algorithms like RFM analysis, Clusterization, and more, with the goal of segmenting your users to provide them with a better experience with your brand. This workflow can be run with other combinations of apps from our available Integrations list, we’re only using this one set as an example.


Integrate your data sources:


First, integrate the data sources you want to extract information from with Datagran. For example, you can connect a server database like MySQL, and data from Woocommerce. Connect any apps with data that will help you better market to your Salesforce contacts.


Tip: New to Datagran? Here’s a guide to learn how to integrate data sources.



A data source dashboard





Create a pipeline:

Now, let’s create a pipeline to create or update a Salesforce contact list in Datagran from two different data sources from the results of an ML model.


Go to your Workspace, select a Project, or make a new one for your Salesforce workflows. Learn how to create a new Workspace here.


A data pipeline example



Click on Pipelines to create a new one.


A data pipeline example










Drag and drop both Woocommerce and MySQL data sources into the pipeline canvas.


A data pipeline example




Then, add an operator to process the information inside your Woocommerce and MySQL data sources. Connect the sources to the processing operator (CustomSQL). This provides ultimate control over the information inside of your datasets by allowing you to choose specific columns, variables, and values within the source, via our SQL editor. 


A data pipeline example



Edit the MySQL Operator by clicking on the Edit button, to see the tables inside of your dataset. You must do this step for each data source. For example, select order information from your Woocommerce source by clicking on the dropdown menu and then select the table displayed below. Drag the table’s code snippet from the right sidebar to the coding canvas. Replace the code with the new one. To do this, simply highlight the old table code snippet, delete it and paste the new one into the same space.


A data pipeline example




Run the query and save the table. 


Repeat the process with the MySQL data source and choose the user table to join with the woo-commerce data.


Connect the MySQL data source to the CustomSQL operator and click Edit. Then, choose the MySQL data source from the dropdown menu on the right-hand side of the screen.


A data pipeline example



Select the table CRM_company_users to pull user data out of the MySQL data source and prepare the respective join query.

Drop the code snippet into the editor.


A data pipeline example






Tip: Our code editor located on top of the canvas provides code-less options to build an SQL script. You can choose your data source, tables, add filters, and more.


A data pipeline example


Now, click the CustomSQL operator button to run each of your queries. Datagran will pull the data you selected from each app into one database, ready to process with machine learning before sending it on to Salesforce.


A data pipeline example



Now it’s time to add machine learning to find the most valuable customers to target from your data. 

To segment your customers by shopping behavior, for example, you can add an RFM operator to your Pipeline. To do so just drag and drop the element from the sidebar, and connect it to the MySQL operator. Then click edit to customize the RFM model. There, select the table and match the columns to make sure the necessary fields are available when you run your ML model. In RFM analysis, it is mandatory to include Customer ID, Invoice Date, and Order Value, so prepare your query based on this.


Tip: Watch this video to learn more about the RFM Operator if you haven’t used it before.


A data pipeline example



Now, drag and drop the Salesforce app from the Actions section so the pipeline knows it has to send the results to your Salesforce account. Click on the edit button in the Salesforce app element and login to your Salesforce account, or choose an account if you have already logged one in. 


A data pipeline example


Now you will create your new and machine learning optimized contact list. Select the Action “Create/Update Contact” from the drop-down list and plug in the information for each field as shown below.


A data pipeline example





Save your work, and once back in your Pipeline, go ahead and run it. Your new contact list will now be exported to your Salesforce account. 

With this list, you can now create personalized communication catered specifically to those contacts who showed similar shopping behavior as your best customers.

*Note that the time for your ML model to send the output to Salesforce varies based on the size of your dataset. Typically, it is transferred in a few minutes and can take up to days.


A data pipeline example



A survey from MIT Technology Review found that sales and marketing will be leading areas of AI growth over the next three years, following on the success teams in quality control, inventory management, and more have already found with machine learning. Here’s your chance to get ahead of the curve and start increasing your sales and retention today using machine learning.