Data Enrichment


This guide will show you how to make your first call to the RD Station API.

Learn how to integrate your application for data enrichment using the RD Station APIs.

By definition, a data enrichment application should be able to, based on some information, return other data that will be useful in the qualification of the Contact or to enable automation flows.

Another user case that can be applied is that when the external app keeps "enriching" lead data in background and, when a new information is discovered or updated, it updates lead information in RD Station.

The main process is summarized in this graphic:

Enrichment en

We’ll show you how to retrieve a single lead using the Get Lead by UUID REST API endpoint. To do this, we will walk you through the authentication process to generate an access token, which you will use to make a HTTP GET request. Then we’ll provide you with the code to make the request that returns lead information formatted as JSON.


How to generate an Authentication Token

  1. Create a trial account on this link.
  2. The authentication token must be obtained by following the steps in Authorization.


How to use webhooks as a trigger to your app

Logged into your RD Station account, follow these links: Your Account -> Integrations -> Webhooks. Click the Create Webhook button.

  1. Define a name for your integration. The idea here is to create a name that will help you identify to which tool this information is being sent.

  2. The URL of the tool that will receive the RDStation notification with the Lead information.

  3. The trigger that should activate the sending of the notification


In this case you can request that the notification be sent:

New conversion: Send to the leads tool that perform some conversion in RDStation. You can select what these conversions will be or leave them blank, in which case every lead that performs a conversion will be sent.

or

Opportunity: Send the Leads marked as opportunity (starlet). Example: Send the RD Station Contact to the tool only when it is marked as an opportunity manually or through an automation flow.


How to use automation flows as a trigger to your app

The automation flow will allow you to send the Lead according to the defined conditions of the flow itself, while through the normal integration, you can only choose to send the Lead with each conversion or when it is marked as an opportunity.

All you need is to enter in your automation flow the URL to which you want the Lead information to be sent, using the action Send Lead to URL.

This URL is the one of your system that will receive the RD Station request with the Lead notification. The request for the URL is made through a POST-type Http request.

The information will be sent as a JSON. An example of JSON is at this link.


How to create a webservice to receive a RD Station lead

The creation of the web service that will receive the RD Station leads must have the following requirements:

  • Be able to receive a JSON in RD Station format;
  • Be able to receive a specific parameter to identify which customer is sending the request (it could be a specific domain to each customer too). The complete URL with parameters should be easy for the customer to retrieve and use in RD Station Webhooks / Automation Flows;
  • Store the Lead UUID (field UUID in the Json, that is the primary key to the lead API) and the Lead Email (used as key to other applications in RD).

How to use the API to retrieve information about Contact (GET)


Returns data about a specific Contact
Request Parameter
uuid Type: String The unique uuid associated to each RD Station Contact.

Response Body Parameters
uuid Type: String The unique uuid associated to each RD Station Contact.
name Type: String Name of the Contact.
email Type: String Email of the Contact.
bio Type: String Notes about the Contact.
website Type: String Website of the Contact.
job_title Type: String Job title of the Contact.
personal_phone Type: String Phone of the Contact.
mobile_phone Type: String Mobile phone of the Contact.
city Type: String City of the Contact.
state Type: String State of the Contact.
country Type: String Country of the Contact.
twitter Type: String Twitter of the Contact.
facebook Type: String Facebook of the Contact.
linkedin Type: String Linkedin of the Contact.
tags Type: Array of Strings Tags of the Contact.

Empty Fields
For empty value fields the following behavior will be adopted:
String and Numbers attributes will not be returned
Array an empty array will be returned []
Boolean Always true or false will be returned
Example:
  {
  "name": "Nome",
  "email": "novo@email.com",
  "job_title": "Developer",
  "website": "http://website.com",
  "mobile": "48 99999-9999",
  "tags": [],
  "city": "Florianópolis",
  "state": "SC",
  "country": "Brasil",
  "cf_custom_field_2": "custom field value2",
  "linkedin": "http://linkedin.com/lead"
}

How to use the API to update Contact information (PATCH)


Updates the properties of a Contact.
Request Parameter
uuid Type: String The unique uuid associated to each RD Station Contact.
Request Body Default Parameters
email Type: String Email of the Contact
name Type: String Name of the Contact
job_title Type: String Job title of the Contact
linkedin Type: String Linkedin profile of the Contact
facebook Type: String Facebook profile of the Contact
state Type: String State of the Contact.
country Type: String Country of the Contact.
twitter Type: String Twitter profile of the Contact
personal_phone Type: String Personal phone of the Contact
mobile_phone Type: String Mobile phone number of the Contact
website Type: String Website of the Contact
tags Type: String[] Tags of the Contact

Request Body Custom Field Parameters
When updating the custom fields information, the attribute keys should be sent as the API name of the custom field. The custom field value should also be adequated accordingly to the field's type.

cf_text_field Type: String Custom field of type text.
cf_text_area Type: String Custom field of type text area.
cf_multiple_choice Type: Array of Strings Custom field of type multiple choice.
cf_radio_button Type: String Custom field of type radio button.
cf_number Type: Integer Custom field of type number.
cf_url Type: String Custom field of type URL.
cf_telephone Type: String Custom field of type telephone.
cf_email Type: String Custom field of type email.
cf_checkbox Type: Boolean Custom field of type checkbox.
cf_combobox Type: String Custom field of type combobox.

Response Body Parameters
uuid Type: String The unique uuid associated to each RD Station Contact.
name Type: String Name of the Contact.
email Type: String Email of the Contact.
bio Type: String Notes about the Contact.
website Type: String Website of the Contact.
job_title Type: String Job title of the Contact.
personal_phone Type: String Phone of the Contact.
mobile_phone Type: String Mobile phone of the Contact.
city Type: String City of the Contact.
state Type: String State of the Contact.
country Type: String Country of the Contact.
twitter Type: String Twitter of the Contact.
facebook Type: String Facebook of the Contact.
linkedin Type: String Linkedin of the Contact.
tags Type: Array of Strings Tags of the Contact.

Empty Fields
For empty value fields the following behavior will be adopted:
String and Numbers attributes will not be returned
Array an empty array will be returned []
Boolean Always true or false will be returned
Example:
  {
  "name": "Nome",
  "email": "novo@email.com",
  "job_title": "Developer",
  "website": "http://website.com",
  "mobile": "48 99999-9999",
  "tags": [],
  "city": "Florianópolis",
  "state": "SC",
  "country": "Brasil",
  "cf_custom_field_2": "custom field value2",
  "linkedin": "http://linkedin.com/lead"
}


How to use custom fields API to verify and create necessary fields

In order to be able to update the lead information, it is necessary that the fields that are being updated are properly created in the RD Station. If they are not created, the information can not be used for specific purposes (ex: segmentations, automation flows or lead scoring).

Ideally, at the time of the integration setup, the external system must check the existence of the necessary fields for lead enrichment in the mapped use cases and. If they are not found, the system must create these fields without the need of manual setup. These details can be checked in the custom fields section.