Import Usage Data to CRM via DataPrep
This guide will assist you in setting a pipeline for extracting unprocessed data from your app/website, cleaning and organizing it with DataPrep to import it to your CRM account.
Import data to DataPrep
To transfer data from any source to DataPrep for data manipulation for the subsequent importation into CRM, follow the steps outlined below:
- Sign in to your DataPrep account.
- To create a new connection, go to Pipelines → + Create New and name the new pipeline. Alternatively open the existing pipeline in your workspace and edit it
- Click Add Data and select the data source. For example, if your data source is a URL from Google Analytics, select URL.

- To configure the URL Connection, enter your dataset name. If you have created a new pipeline, change the API method to POST; else, let the API method be GET. Enter the request URL. To know where to find the request URL, click here.
- In the Add request body field, click the plus sign.
6. Add the request body similar to the below-mentioned template and structure it based on the examples that follow. All the keys mentioned in the sample request body are mandatory.
Sample Request Body
{
"limit": [max_results],
"dimensions": [
{
"name": "eventName"
},
{
"name": "dateHour"
},
{
"name": "customUser:[uniqueUserID]"
}
],
"dateRanges": [
{
"startDate": "[start_date]",
"endDate": "[end_date]"
}
],
"keepEmptyRows": false],
"orderBys": [
{
"desc": [false],
"dimension": {
"dimensionName": "[dayHour]",
"orderType": "NUMERIC]"
}
}
]
}
]
}
Field Descriptions: All key
- limit (required):
Defines the maximum number of records to return. For example, "limit": 100 will return up to 100 records. The recommended limit is 1,00,000. - Type: Integer
- uniqueUserID:
Specifies the particular key used to identify the user record in CRM like CRM record ID or email ID. - Example: "user_uid"
- Type: Array of objects
- dateRanges:
Specifies the date range for the data query. You need to provide a startDate and endDate for the range you want to retrieve. The endDate refers to today's date and the startDate can be 365daysAgo or 180daysAgo or 90daysAgo. The most recent data is more helpful for the AI models. - Example: "startDate": "365daysAgo", "endDate": "2024-04-06"
- Type: Array of objects
- Note: Use relative date formats (e.g., "365daysAgo") or specific dates in the YYYY-MM-DD format.
- keepEmptyRows:
If set to false, rows with no data are excluded. - Example: "keepEmptyRows": false
- Default: true (if omitted)
- Type: Boolean
- orderBys
Defines the sorting order of the data. You can sort the results based on a dimension or metric. - Example: "desc": true sorts in descending order, "dimension": { "dimensionName": "dateHour", "orderType": "NUMERIC" } sorts based on a numeric dimension.
- Type: Array of objects
- Note: You can customize the orderBys array to define multiple sorting preferences.

7. Go to the Headers tab below. Add the content type under Keys. Switch to the Authorization tab, choose the Authorization method, fill in the other details, and click Authenticate.
8. Switch to the Authorization tab, choose the Authorization method, fill in the other details, and click Authenticate.
When the data import is successful, you have created a new connection.
Set ruleset
1. Click on the blue plus icon beside the intermediate stage and select to insert ruleset. The addition of ruleset eases the pre-processing of data.

2. On the page that appears, click on the Ruleset icon, as highlighted in yellow
3. Set the ruleset as in the image below.
Complete your pipeline
Now that your data has been prepared to process adhering to the given ruleset, the next step is to complete your pipeline by choosing your destination for export.
1. In the same page, click
Add Destination in the right-top corner and choose
Zoho CRM as your destination and fill in the other fields.

2. Fill in the configuration fields
3. Click Save.
Your pipeline is now complete and looks similar to the below image.
Target Matching
The next step is Target Matching, where the matching of the column names of the imported database with the fields of the chosen destined CRM module happens.
1. Go to Prepare Data once again and click the Target Matching icon. Select Show Target in the top-right corner.

2. Those columns with red cross marks indicate a mismatch of column names and need to be renamed. Click the cross mark and select the relevant column name to map the column with it. Map all the columns in similarly

3. If the red mark turns to yellow and displays the below message, click on it until it automatically turns green, as shown in the image below.

4. Repeat this for the other columns having the red cross marks.
5. The final step is to get back to the pipeline and click Run in order to initiate the export.
The data exported will automatically be imported into the chosen CRM module.
To import usage data to CRM directly from any Analytics tool, refer to
here.