RDN Custom Lookup

The Custom Lookup feature in RDN provides greater flexibility, enabling users to tailor data to meet their unique requirements. Unlike Standard Lookups, which only allow data viewing, Custom Lookups empower users to manage and modify lookup entries completely.

The Custom Lookup feature in RDN offers enhanced flexibility for users who need to tailor data to their specific needs. Unlike Standard Lookups, where you can only view data, Custom Lookups allow you to fully manage and modify the lookup entries. You can create custom lookups with up to ten columns, giving you the ability to structure and organize your data precisely as needed.

With Custom Lookups, you can:

  • Add new values to the lookup table.
  • Modify existing entries to meet evolving requirements.
  • Remove unwanted data as necessary.

This feature ensures that you have full control over the data, making it ideal for specialized tasks where Standard Lookups may not suffice.

Data Management and Integration

You can insert data into custom lookups in two ways:

  1. Manual Entry: Add individual records directly into the lookup.
  2. CSV Upload: Import bulk data to quickly populate the lookup table with new values.

Additionally, you can access custom lookups via the API or use JavaScript functions for integration into web applications or automated workflows, offering seamless integration and support for a wide range of use cases.

Key Features

  • Create Up to 10 Columns: Structure your lookup to match specific business needs.
  • Full Control: Add, modify, and delete entries as required.
  • Data Insertion Options: Insert data manually or upload in bulk using CSV files.
  • API & JavaScript Support: Integrate custom lookups into your systems using API or JavaScript.

The Custom Lookup feature is ideal for businesses that require more complex and dynamic data structures, allowing for a high degree of customization while maintaining easy integration with existing workflows.

Steps to Create Custom Lookup:

  1. Click on CUSTOM LOOKUPS, then click  +  to create a new custom lookup.

2. Enter the Lookup Name:  It is the name of the lookup by which you can identify the lookup. The name should not contain space.

CSV column name which you want as key in the Lookup (Max 3 keys allowed): There can be one key (Primary key) or a composite key (which can contain max 3 keys). The combination of different keys in the composite key should be unique.

Number of columns: It represents the number of columns in a CSV file. There can be a maximum of 10 columns.

Description: It describes the lookup created.

Import from CSV file: A CSV file can be uploaded by clicking on the ‘Choose File’ button. A CSV file can contain a maximum of 10 columns and 5000 data rows. 

2.1 Upload CSV file.

2.2 Choose either of two options- 

       2.2.1 Return blank value in case data is not matched with lookup 

       2.2.2 Return input value in case data is not matched with the lookup

2.3 By clicking on the ‘Create Lookup’ button, the Custom Lookup will be created.

  1. Edit Lookup: The user can edit the value of the custom lookup by double-clicking on their respective key values.
  1. Export CSV: By clicking the ‘Export CSV’ button, the user has the ability to extract the values created within the custom lookup in CSV format.
  2. Change Lookup details: The user can use this option for updating the Lookup Name and Description.
  3. Add Values using import CSV: If users intend to import data in large quantities, this service can be utilized.
  4. Add Single Record: Utilize this choice to include a solitary record within a lookup.

How to Use the Custom Lookups Service

The Custom Lookups service can be easily accessed through two methods: using the API directly or integrating it into custom services via JavaScript functions.

1. Using the Custom Lookups API

To use the Custom Lookups API, you will typically make a request with specific query parameters. The query includes key columns and operators that define the relationship between those columns.

Key Parameters:

  • Key Columns: These are the columns you want to query. For example, “Name” could be a column in a country lookup.
  • Operators: Operators like AND or OR are used to specify how the conditions are related.

Example Use Case: Country Lookup

If you want to perform a lookup to retrieve country information for Afghanistan, your API query would look like this:

https://api.rightwave.com/rdn/api/lu/RightWaveCountryLookup?Name=Afghanistan&op=and

Here:

  • Name: Represents the column you want to query (in this case, the country name).
  • op=and: The operator used to combine conditions. You can modify the operator to suit your specific needs.

Operator Details:

  • AND: This operator ensures that all conditions must be true for the query to return results.
  • OR: This operator will return results if at least one condition is true.

If you don’t specify the “op” parameter, the default operator used will be AND.

2. Modifying Operators and Query Parameters

  • Users can modify the operator in the API query to either AND or OR based on the conditions they want to apply.
    • AND ensures all conditions are satisfied.
    • OR requires only one condition to be met.

Example of an OR Operator Query:

If you wanted to create a lookup where the country name could be either United States or India, the query could look like this:

https://api.rightwave.com/rdn/api/lu/RightWaveCountryLookup?Name=United States&ISO_Name=&ISO_Code2=IN&ISO_Code3=IND&op=or

Parameters:

  1. Name=United States:
    • This specifies that you are looking for a country with the name “United States.”
  2. ISO_Name=:
    • This parameter is empty, meaning no specific ISO name is being used as a search condition.
  3. ISO_Code2=IN:
    • This filters the lookup by the ISO 2-code, which corresponds to “IN,” the ISO code for India.
  4. ISO_Code3=IND:
    • This filters by the ISO 3-code, corresponding to “IND,” which is also the ISO 3 code for India.
  5. op=or:
    • This specifies the operator used to combine conditions. In this case, OR means that the lookup will return results if either of the conditions (the name “United States”, the ISO 2-code “IN”, or the ISO 3-code “IND”) match.

Expected Behavior:

  • The API query will return results if any of the conditions are true, based on the OR operator. This means it will:
    • Return data for “United States” based on the Name parameter.
    • Return data for India based on the ISO Code 2 (“IN”) or ISO Code 3 (“IND”).
  • Since you’re using the OR operator, the query is designed to match any of the specified conditions, whether it’s the country name, ISO 2-code, or ISO 3-code.

Result Example:

The response would likely return:

  • United States if the Name matches.
  • India if the ISO_Code2 or ISO_Code3 matches.

3. Using JavaScript Functions

In addition to the API, JavaScript functions can be used to integrate the custom lookups into your own services or applications. This method is ideal for developers looking to create a more seamless user experience within web-based platforms or applications.

Live Test Case Examples

RDN provides the Show Live Test Cases feature, allowing you to test queries and see how changing operators affects the results. By using these examples, users can experiment with different query configurations before finalizing their requests.

Summary of Key Features

  • Flexible Operators: Use the AND or OR operators to control how conditions are combined.
  • Customizable Parameters: Provide specific column names and values as request parameters.
  • Default AND Operator: If no operator is specified, the system defaults to using AND.
  • Test Cases: Leverage live examples to refine your queries and get immediate feedback.

With this flexibility, you can efficiently create custom lookups tailored to your needs, whether through the API or JavaScript functions, ensuring smooth integration into your workflows or applications.

Steps to follow in Marketo:

Service Name: Custom Lookups

Service Type: Multi-Column Lookups

Service Description:  RightWave offers Country Lookup as a conventional service. This service provides access to ISO_Name, ISO_Code2, and ISO_Code3. To illustrate, suppose you wish to retrieve ISO values for the United States. In this scenario, you would provide “United States” as the key, and the service would yield ISO_Name as “United States,” ISO_Code2 as “US,” and ISO_Code3 as “USA.”

It’s important to note that the values for request parameters (in Step 2) and Marketo Fields (in Step 4) are presented as examples. Users should input values according to their specific service requirements.

Steps to configure service Custom Lookups in Marketo

1. Go to Admin and click Webhooks. Click New Webhook.

2. Name and configure your webhook for Service Custom Lookups.

Webhook Name: This field specifies the title of the webhook. In the example above, the Webhook name matches the Service name. User is free to furnish a Webhook name based on their specific needs.

URL: This field outlines the URL for the Service Custom Lookups. The URL comprises domain and query parameters, which will remain consistent. The user can update the parameter values from Marketo.

Token. To insert a token, click Insert Token.

Template: This field will remain blank.

Request Token Encoding: It will remain None in case of POST, in case of GET field will be uneditable.

Response type: Select the response format as JSON.

Request Type: The Request Type will remain the same (i.e.) GET as given in the example.

  1. Add Authentication Header:

It’s important to recognize that the auth key displayed above is the authentic authentication key. As a result, when configuring the Webhook as depicted, make sure to utilize the identical values for both the auth-key and Content-Type.

  1. Response Mappings

Response Mappings are generated by associating them with a Response Attribute. The choice of Response attribute is contingent upon the output derived from the Custom Service JavaScript function. Opting to return JSON from the Custom Service is advisable as it simplifies the process of mapping it with the corresponding Marketo field.