{"id":87165,"date":"2024-12-08T04:55:47","date_gmt":"2024-12-08T12:55:47","guid":{"rendered":"https:\/\/rightwave.com\/rwi\/?page_id=87165"},"modified":"2024-12-09T20:11:36","modified_gmt":"2024-12-10T04:11:36","slug":"custom-service","status":"publish","type":"page","link":"https:\/\/rightwave.com\/rwi\/rdn-help\/custom-service","title":{"rendered":"RDN Custom Service"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"87165\" class=\"elementor elementor-87165\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0cfdca2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0cfdca2\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;gradient&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b45b270\" data-id=\"b45b270\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-8100547 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8100547\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-8446356\" data-id=\"8446356\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2b62785 elementor-widget elementor-widget-heading\" data-id=\"2b62785\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<p class=\"elementor-heading-title elementor-size-default\">RDN Custom Service<\/p>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04a17b5 elementor-widget elementor-widget-heading\" data-id=\"04a17b5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<p class=\"elementor-heading-title elementor-size-default\">Custom services allow users to create customized REST services by implementing their own business logic with JavaScript. To use these services effectively, you need a basic understanding of JavaScript. This includes familiarity with the language\u2019s syntax, functions, and key concepts.<\/p>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c4429d1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c4429d1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7369be4\" data-id=\"7369be4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cf54f81 elementor-widget elementor-widget-text-editor\" data-id=\"cf54f81\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">It\u2019s also important to follow <\/span><b>JavaScript best practices<\/b><span style=\"font-weight: 400;\"> when coding to ensure that the service is efficient, secure, and maintainable. Writing clean, optimized, and error-free code will help create a smooth and effective REST service.<\/span><\/p><p><b>To get started with the Custom service, please follow the instructions below:<\/b><\/p><ol><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Click on \u2018+\u2019\u00a0 icon to create a new Custom service.<\/span><\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cffc899 elementor-widget elementor-widget-image\" data-id=\"cffc899\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1889\" height=\"827\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3.png\" class=\"attachment-full size-full wp-image-87264\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3.png 1889w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3-300x131.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3-1024x448.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3-768x336.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image11-3-1536x672.png 1536w\" sizes=\"(max-width: 1889px) 100vw, 1889px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-643ef6e elementor-widget elementor-widget-text-editor\" data-id=\"643ef6e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">2. Enter the Service Name and click on the \u201cSave\u201d button to create a service.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ac4550 elementor-widget elementor-widget-image\" data-id=\"4ac4550\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1904\" height=\"865\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5.png\" class=\"attachment-full size-full wp-image-87265\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5.png 1904w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5-300x136.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5-1024x465.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5-768x349.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image8-5-1536x698.png 1536w\" sizes=\"(max-width: 1904px) 100vw, 1904px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-71cf0f4 elementor-widget elementor-widget-text-editor\" data-id=\"71cf0f4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">3. After entering and saving the service name, proceed to select the script type. Choose either <\/span><b>Draft Script<\/b><span style=\"font-weight: 400;\"> or <\/span><b>Production Script<\/b><span style=\"font-weight: 400;\"> based on your requirements. The <\/span><b>Draft Script<\/b><span style=\"font-weight: 400;\"> will be selected by default, while the <\/span><b>Production Script<\/b><span style=\"font-weight: 400;\"> will be selected once the service is deployed to production. Select the appropriate radio button to make your choice.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-feec2e7 elementor-widget elementor-widget-image\" data-id=\"feec2e7\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1896\" height=\"894\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4.png\" class=\"attachment-full size-full wp-image-87266\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4.png 1896w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4-300x141.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4-1024x483.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4-768x362.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image12-4-1536x724.png 1536w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f1399d6 elementor-widget elementor-widget-text-editor\" data-id=\"f1399d6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><b>3.1 Draft Script<\/b><span style=\"font-weight: 400;\">: The Draft Script allows you to make edits and modifications to your code. It is typically used during development or testing phases and may contain unfinished or experimental changes. As such, it may include errors in the code since updates are still being made. <\/span><b>You need to select Draft mode<\/b><span style=\"font-weight: 400;\"> to make any changes to the Production script. Once you have made and tested the necessary changes, you will need to redeploy the script to the production environment.<\/span><\/p><p><b>3.2 Production Script<\/b><span style=\"font-weight: 400;\">: The Production Script contains the finalized, error-free code that runs in the production environment. Once deployed, the Production Script cannot be modified directly, ensuring stability and reliability in the live environment.<\/span><\/p><p><b>3.3 Font Size<\/b><span style=\"font-weight: 400;\">: To adjust the font size of your script for better readability, use the &#8220;Font Size&#8221; button.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-af2c453 elementor-widget elementor-widget-image\" data-id=\"af2c453\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1890\" height=\"841\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5.png\" class=\"attachment-full size-full wp-image-87267\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5.png 1890w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5-300x133.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5-1024x456.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5-768x342.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image7-5-1536x683.png 1536w\" sizes=\"(max-width: 1890px) 100vw, 1890px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4d567d0 elementor-widget elementor-widget-text-editor\" data-id=\"4d567d0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><b>3.4\u00a0 Writing a Script for a Custom Service Using the JS Editor<\/b><\/p><p><span style=\"font-weight: 400;\">This section provides guidance on how to write and implement a custom service script using the integrated JavaScript (JS) editor. Leverage the editor to define your business logic, interact with external systems, and customize the behavior of your service efficiently and securely.<\/span><\/p><p><b>Main Function for Custom Services<\/b><\/p><p><span style=\"font-weight: 400;\">The main function serves as the entry point for the custom service, where the execution flow begins. It is essential that the name of the main function be prefixed with &#8220;srv_&#8221;. When you create a custom service, the system automatically adds the &#8220;srv_&#8221; prefix to the function name, so there is no need to manually add it. Additionally, the name of the main function must be unique across the instance. For example, if you create a main function named <\/span><span style=\"font-weight: 400;\">srv_addScore()<\/span><span style=\"font-weight: 400;\">, you cannot reuse the name <\/span><span style=\"font-weight: 400;\">srv_addScore<\/span><span style=\"font-weight: 400;\"> in any other custom service within the same instance.<\/span><\/p><p><b>Input Arguments<\/b><span style=\"font-weight: 400;\"> All input arguments to the main function are treated as strings by default. If you intend to perform any numeric operations, you must first convert these string arguments into numbers. For instance, you can use the <\/span><span style=\"font-weight: 400;\">parseInt()<\/span><span style=\"font-weight: 400;\"> method to convert integer strings before performing arithmetic operations.<\/span><\/p><p><b>Code Modularity<\/b><span style=\"font-weight: 400;\"> If your business logic is relatively simple (e.g., no more than 10 lines of code), you can write the entire logic within the main function. However, if your logic is more complex or needs to be more organized, you can create helper functions to modularize the code. These helper functions can then be invoked from the main function to maintain clean and reusable code.<\/span><\/p><h3><b>Return Types of the Main Function<\/b><\/h3><p><b>1. Returning a Single Value<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">If you want the main function to return a single value, use the <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> statement followed by the value. For example:<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-930293a elementor-widget elementor-widget-image\" data-id=\"930293a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"231\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image15-1.png\" class=\"attachment-full size-full wp-image-87268\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image15-1.png 903w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image15-1-300x77.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image15-1-768x196.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c8a6e52 elementor-widget elementor-widget-text-editor\" data-id=\"c8a6e52\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">In this case, when the function <\/span><span style=\"font-weight: 400;\">srv_add(num1, num2)<\/span><span style=\"font-weight: 400;\"> is called with the arguments <\/span><span style=\"font-weight: 400;\">3<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">2<\/span><span style=\"font-weight: 400;\">, the output will be <\/span><span style=\"font-weight: 400;\">5<\/span><span style=\"font-weight: 400;\">.<\/span><\/p><ol start=\"2\"><li><b> Returning Multiple Values<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">If you need to return more than one value, you can package the output into a map (object) and return it. For example:<\/span><\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d9f11a3 elementor-widget elementor-widget-image\" data-id=\"d9f11a3\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"258\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image4-6.png\" class=\"attachment-full size-full wp-image-87269\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image4-6.png 903w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image4-6-300x86.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image4-6-768x219.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d3c963c elementor-widget elementor-widget-text-editor\" data-id=\"d3c963c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">If the function <\/span><span style=\"font-weight: 400;\">srv_addAndSubtract(num1, num2)<\/span><span style=\"font-weight: 400;\"> is called with the arguments <\/span><span style=\"font-weight: 400;\">3<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">2<\/span><span style=\"font-weight: 400;\">, the returned output will be:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cf48d54 elementor-widget elementor-widget-image\" data-id=\"cf48d54\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"137\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image17-1.png\" class=\"attachment-full size-full wp-image-87270\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image17-1.png 885w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image17-1-300x46.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image17-1-768x119.png 768w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-05d2983 elementor-widget elementor-widget-text-editor\" data-id=\"05d2983\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">This approach ensures that the custom service&#8217;s logic is clear, concise, and properly modular, allowing for efficient implementation and maintenance of business rules.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\"><br \/><\/span><b>RDN Functions<\/b><\/p><p><span style=\"font-weight: 400;\">RDN provides various built-in functions that can be utilized as helper functions in custom services. These functions are categorized into two types: <\/span><b>Service Functions<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Utility Functions<\/b><span style=\"font-weight: 400;\">.<\/span><\/p><h4><b>4.1 Service Functions<\/b><\/h4><p><span style=\"font-weight: 400;\">These functions are available in RDN as REST services and can be used directly within your custom service logic. Service functions cover a range of common use cases, including basic operations, data lookups, categorization, and lead-to-account matching. You can find these functions via the <\/span><b>INSERT Widget<\/b><span style=\"font-weight: 400;\"> in the JS editor, which helps you insert the function calling code at the cursor position, along with an output template in comments that you can delete later.<\/span><\/p><h5><b>4.1.1 Basic Services<\/b><\/h5><p><span style=\"font-weight: 400;\">RDN provides a set of standard functions, referred to as <\/span><b>Basic Services<\/b><span style=\"font-weight: 400;\">, that can be integrated into your custom services. These functions handle common operations that can be reused across various services. More details on each individual <\/span><b>Basic Service<\/b><span style=\"font-weight: 400;\"> can be found in the <\/span><a href=\"https:\/\/rdn.rightwave.com\/rdn\/BasicUtilityServices\/AllBasicUtilityServices\"><b>Basic <\/b><\/a><b>Services Help Section<\/b><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">To insert a basic service function into your code, use the <\/span><b>INSERT \u2192 STANDARD FUNCTIONS \u2192 {Function Name}<\/b><span style=\"font-weight: 400;\"> widget.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5903b49 elementor-widget elementor-widget-image\" data-id=\"5903b49\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1896\" height=\"909\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2.png\" class=\"attachment-full size-full wp-image-87271\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2.png 1896w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2-300x144.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2-1024x491.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2-768x368.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image16-2-1536x736.png 1536w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0c670ff elementor-widget elementor-widget-text-editor\" data-id=\"0c670ff\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3><b>4.1.2 Multi-Column Lookups<\/b><\/h3><p><span style=\"font-weight: 400;\">RDN provides both <\/span><b>Standard<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Custom Lookups<\/b><span style=\"font-weight: 400;\"> for retrieving data from multiple columns. These lookup functions are available as service functions and can be inserted into your code in the same manner as basic services. For more information, refer to the <\/span><a href=\"https:\/\/rdn.rightwave.com\/rdn\/mcl-lookup\/all-lookup\"><b>Multi-Column Lookup Help Section<\/b><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/a><span style=\"font-weight: 400;\">To add a lookup function to your code, use the <\/span><b>INSERT \u2192 LOOKUP FUNCTIONS \u2192 {Function Name}<\/b><span style=\"font-weight: 400;\"> widget.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2509ab3 elementor-widget elementor-widget-image\" data-id=\"2509ab3\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1887\" height=\"897\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2.png\" class=\"attachment-full size-full wp-image-87272\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2.png 1887w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2-300x143.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2-1024x487.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2-768x365.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image14-2-1536x730.png 1536w\" sizes=\"(max-width: 1887px) 100vw, 1887px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-14ae25d elementor-widget elementor-widget-text-editor\" data-id=\"14ae25d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3><b>4.1.3 Categorization Service<\/b><\/h3><p><span style=\"font-weight: 400;\">RDN offers a <\/span><b>Categorization Service<\/b><span style=\"font-weight: 400;\"> to categorize data based on specific criteria. This service can be particularly useful for classifying large datasets. Details on how to use the <\/span><b>Categorization Service<\/b><span style=\"font-weight: 400;\"> can be found in the <\/span><a href=\"https:\/\/rdn.rightwave.com\/rdn\/all-categorization-service\"><span style=\"font-weight: 400;\">relevant help section.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/a><span style=\"font-weight: 400;\">To integrate this service, use the <\/span><b>INSERT \u2192 CATEGORIZATION FUNCTIONS \u2192 {Function Name}<\/b><span style=\"font-weight: 400;\"> widget.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f2f1e4 elementor-widget elementor-widget-image\" data-id=\"3f2f1e4\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1877\" height=\"879\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1.png\" class=\"attachment-full size-full wp-image-87273\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1.png 1877w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1-300x140.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1-1024x480.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1-768x360.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image19-1-1536x719.png 1536w\" sizes=\"(max-width: 1877px) 100vw, 1877px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d292247 elementor-widget elementor-widget-text-editor\" data-id=\"d292247\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3><b>4.1.4 Lead to Account Match Service<\/b><\/h3><p><span style=\"font-weight: 400;\">The <\/span><b>Lead to Account Match Service<\/b><span style=\"font-weight: 400;\"> allows you to match leads with accounts in your CRM or data system. For more details on this service, consult the <\/span><a href=\"https:\/\/rdn.rightwave.com\/rdn\/all-account-tagging\"><b>Lead to Account Match Help Section<\/b><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/a><span style=\"font-weight: 400;\">You can insert this function into your code by using the <\/span><b>INSERT \u2192 LEAD TO ACCOUNT MATCH FUNCTIONS \u2192 {Function Name}<\/b><span style=\"font-weight: 400;\"> widget.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4a319ea elementor-widget elementor-widget-image\" data-id=\"4a319ea\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1880\" height=\"901\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5.png\" class=\"attachment-full size-full wp-image-87274\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5.png 1880w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5-300x144.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5-1024x491.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5-768x368.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image9-5-1536x736.png 1536w\" sizes=\"(max-width: 1880px) 100vw, 1880px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e47ec9e elementor-widget elementor-widget-text-editor\" data-id=\"e47ec9e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><b>Utility Functions<\/b><span style=\"font-weight: 400;\">: These are the utility functions that you can call as Javascript functions. Following are the utility functions RDN provides:<\/span><\/p><ol><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Log Functions<\/b><span style=\"font-weight: 400;\">: RDN offers logging capabilities for debugging JavaScript logic. You can utilize the rdn.debug.log() function, which accepts a string as input and displays the string&#8217;s value in the Log area. It&#8217;s important to emphasize that these logs are exclusively accessible for troubleshooting and testing during the development of Custom Service.<\/span><\/li><\/ol><p><span style=\"font-weight: 400;\">Suppose you want to print the value of a variable named \u201ccountry\u201d.<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0Let country = \u201cIndia\u201d;<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0rdn.log.debug(\u2018Value of country is \u2018\u2019+ country);<\/span><\/p><p><span style=\"font-weight: 400;\">If you want to print a JSON then you have to convert it first to String by using JSON.stringify()\u00a0<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0For example, you have a JSON\u00a0<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0const obj = {name: &#8220;John&#8221;, age: 30, city: &#8220;New York&#8221;};<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0Use the JavaScript function JSON.stringify() to convert it into a string.<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0const myJSONInString = JSON.stringify(obj);<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0rdn.log.debug(myJSONInString);<\/span><\/p><h4><b>4.2 Utility Functions<\/b><\/h4><p><span style=\"font-weight: 400;\">In addition to service functions, RDN provides a set of utility functions that can be invoked directly from JavaScript. These utility functions serve specific purposes such as logging, making external API calls, and more.<\/span><\/p><h5><b>4.2.1 Log Functions<\/b><\/h5><p><span style=\"font-weight: 400;\">RDN provides logging capabilities through the <\/span><span style=\"font-weight: 400;\">rdn.debug.log()<\/span><span style=\"font-weight: 400;\"> function, which can be used for debugging JavaScript logic. This function outputs the log message to the <\/span><b>Log area<\/b><span style=\"font-weight: 400;\"> and is particularly useful during development and testing of custom services. Note that logs are only accessible for troubleshooting and testing purposes.<\/span><\/p><p><span style=\"font-weight: 400;\">For example, to log the value of a variable:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ea47767 elementor-widget elementor-widget-image\" data-id=\"ea47767\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"164\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image5-4.png\" class=\"attachment-full size-full wp-image-87275\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image5-4.png 934w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image5-4-300x53.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image5-4-768x135.png 768w\" sizes=\"(max-width: 934px) 100vw, 934px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d6658e5 elementor-widget elementor-widget-text-editor\" data-id=\"d6658e5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">let country = &#8220;India&#8221;;<\/span><\/p><p><span style=\"font-weight: 400;\">rdn.log.debug(&#8216;Value of country is &#8216; + country);<\/span><\/p><p><span style=\"font-weight: 400;\">To log a JSON object, first convert it to a string using <\/span><span style=\"font-weight: 400;\">JSON.stringify()<\/span><span style=\"font-weight: 400;\">:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8582b45 elementor-widget elementor-widget-image\" data-id=\"8582b45\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"195\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image10-4.png\" class=\"attachment-full size-full wp-image-87276\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image10-4.png 925w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image10-4-300x63.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image10-4-768x162.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d239637 elementor-widget elementor-widget-text-editor\" data-id=\"d239637\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">const obj = {name: &#8220;John&#8221;, age: 30, city: &#8220;New York&#8221;};<\/span><\/p><p><span style=\"font-weight: 400;\">const myJSONInString = JSON.stringify(obj);<\/span><\/p><p><span style=\"font-weight: 400;\">rdn.log.debug(myJSONInString);<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52925b4 elementor-widget elementor-widget-image\" data-id=\"52925b4\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1875\" height=\"901\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6.png\" class=\"attachment-full size-full wp-image-87277\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6.png 1875w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6-300x144.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6-1024x492.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6-768x369.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image6-6-1536x738.png 1536w\" sizes=\"(max-width: 1875px) 100vw, 1875px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-104af76 elementor-widget elementor-widget-text-editor\" data-id=\"104af76\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3><b>4.2.2 External API Calling Functions<\/b><\/h3><p><span style=\"font-weight: 400;\">RDN offers several utility functions for making HTTP API calls. These functions support GET, POST, and PUT methods.<\/span><\/p><p><b>GET Request<\/b><span style=\"font-weight: 400;\">: Use <\/span><span style=\"font-weight: 400;\">rdn.call.GET(URL, headers)<\/span><span style=\"font-weight: 400;\"> to make a GET request. You can pass the URL and headers as parameters.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">Example:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-39288bb elementor-widget elementor-widget-image\" data-id=\"39288bb\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"275\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image2-10.png\" class=\"attachment-full size-full wp-image-87278\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image2-10.png 875w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image2-10-300x94.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image2-10-768x241.png 768w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52796a7 elementor-widget elementor-widget-text-editor\" data-id=\"52796a7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">function srv_test() {<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0return rdn.call.GET(&#8220;https:\/\/api.rightwave.com\/rdn\/api\/ss\/aContainsBWithCase?inputA=news paper&amp;inputB=paper&#8221;, {<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;auth-key&#8221;: &#8220;6da-73de93a2e5a3a787d0262535&#8221;<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 });<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">}<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/p><p><b>POST Request<\/b><span style=\"font-weight: 400;\">: Use <\/span><span style=\"font-weight: 400;\">rdn.call.POST(URL, headers, payload)<\/span><span style=\"font-weight: 400;\"> to send data via a POST request. Provide the URL, headers, and the payload in the request.<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">Example:<\/span><span style=\"font-weight: 400;\"><br \/><\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-76aba36 elementor-widget elementor-widget-image\" data-id=\"76aba36\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"466\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image3-9.png\" class=\"attachment-full size-full wp-image-87279\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image3-9.png 881w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image3-9-300x159.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image3-9-768x406.png 768w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ca49fc elementor-widget elementor-widget-text-editor\" data-id=\"4ca49fc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">function srv_test2() {<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0return rdn.call.POST(&#8220;https:\/\/api.rightwave.com\/rdn\/api\/adv\/genrateQRCode&#8221;, {<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;auth-key&#8221;: &#8220;6c0-fb33163b75035789ef4c3587&#8221;,<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;Content-Type&#8221;: &#8220;application\/json&#8221;<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}, {<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;email&#8221;: &#8220;abc123@example.com&#8221;,<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;QrCodeInfo&#8221;: {<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;Name&#8221;: &#8220;Mike Jordan&#8221;,<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;Company&#8221;: &#8220;Nvidia Corporation&#8221;<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0});<\/span><\/p><p><span style=\"font-weight: 400;\">}<\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><b>PUT Request<\/b><span style=\"font-weight: 400;\">: Use <\/span><span style=\"font-weight: 400;\">rdn.call.PUT(URL, headers, payload)<\/span><span style=\"font-weight: 400;\"> for PUT requests. You can pass the URL, headers, and payload into the utility function.<\/span><\/li><\/ul><h4>\u00a0<\/h4><p><span style=\"font-weight: 400;\">These service and utility functions can be integrated into your custom service to streamline operations, perform data lookups, interact with external systems, and log information for debugging.<\/span><\/p><h4>\u00a0<\/h4><h3><b>5. Restricted Keywords<\/b><\/h3><p><span style=\"font-weight: 400;\">To ensure the stability, security, and performance of custom services, certain JavaScript keywords and functions are restricted within the custom service scripts. The use of the following keywords is prohibited:<\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><b>js_harmful_keyword_list<\/b><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">process<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">setTimeout<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">setInterval<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">async<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">eval<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">require<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">XMLHttpRequest<\/span><span style=\"font-weight: 400;\">.<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">Additionally, it is recommended to avoid using the following JavaScript features in custom services to prevent potential issues:<\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ajax class<\/b><span style=\"font-weight: 400;\">: Using AJAX for asynchronous requests can lead to issues with service execution.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>API calls<\/b><span style=\"font-weight: 400;\">: Direct API calls should be avoided unless specifically required for the service.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Nested functions<\/b><span style=\"font-weight: 400;\">: Highly nested functions can affect code readability and maintainability.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Arrow functions<\/b><span style=\"font-weight: 400;\">: While concise, arrow functions can sometimes cause issues with context binding in certain cases and should be used cautiously.<\/span><\/li><\/ul><h3><b>6. Deployment Status<\/b><\/h3><p><span style=\"font-weight: 400;\">Custom services in RDN have two primary deployment statuses:<\/span><\/p><h4><b>6.1 Draft<\/b><\/h4><p><span style=\"font-weight: 400;\">The <\/span><b>Draft<\/b><span style=\"font-weight: 400;\"> status is assigned when a custom service is first created or in the process of development. During this phase, the service is not yet deployed to production and can still be modified and tested.<\/span><\/p><h4><b>6.2 Deployed<\/b><\/h4><p><span style=\"font-weight: 400;\">The <\/span><b>Deployed<\/b><span style=\"font-weight: 400;\"> status indicates that the custom service has been successfully developed, tested, and deployed to production. The service is considered error-free and has passed all necessary test cases.<\/span><\/p><h3><b>7. Testing Custom Service<\/b><\/h3><p><span style=\"font-weight: 400;\">To evaluate the functionality of a custom service, you need to provide the necessary input parameters for testing. These input parameters should be submitted as a comma-separated list. If any parameter value contains a comma, it must be escaped using a backslash (<\/span><span style=\"font-weight: 400;\">\\<\/span><span style=\"font-weight: 400;\">). For example, a parameter like <\/span><span style=\"font-weight: 400;\">&#8220;Global Director, Crisis Management &amp; Business Continuity&#8221;<\/span><span style=\"font-weight: 400;\"> should be written as <\/span><span style=\"font-weight: 400;\">&#8220;Global Director\\, Crisis Management &amp; Business Continuity&#8221;<\/span><span style=\"font-weight: 400;\">, ensuring there is no space between the backslash and the comma.<\/span><\/p><p><span style=\"font-weight: 400;\">Please note that deploying the script to production is contingent on passing all test cases. When attempting to deploy a custom service, the system will automatically run the test cases, and the service will only be deployed if all tests are successful.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8109bf1 elementor-widget elementor-widget-image\" data-id=\"8109bf1\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1535\" height=\"514\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image13-3.png\" class=\"attachment-full size-full wp-image-87280\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image13-3.png 1535w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image13-3-300x100.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image13-3-1024x343.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image13-3-768x257.png 768w\" sizes=\"(max-width: 1535px) 100vw, 1535px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-16550fa elementor-widget elementor-widget-text-editor\" data-id=\"16550fa\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3><b>8. Default Service<\/b><\/h3><p><span style=\"font-weight: 400;\">When you create an RDN account, a default custom service for country standardization, named <\/span><span style=\"font-weight: 400;\">srv_standardize_country<\/span><span style=\"font-weight: 400;\">, is automatically provided. This service helps standardize country names and formats within the system, offering an out-of-the-box solution for common use cases related to geographic data processing.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aaafa4b elementor-widget elementor-widget-image\" data-id=\"aaafa4b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1726\" height=\"776\" src=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1.png\" class=\"attachment-full size-full wp-image-87281\" alt=\"\" srcset=\"https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1.png 1726w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1-300x135.png 300w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1-1024x460.png 1024w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1-768x345.png 768w, https:\/\/rightwave.com\/rwi\/wp-content\/uploads\/2024\/12\/image18-1-1536x691.png 1536w\" sizes=\"(max-width: 1726px) 100vw, 1726px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>RDN Custom Service Custom services allow users to create customized REST services by implementing their own business logic with JavaScript. To use these services effectively, you need a basic understanding of JavaScript. This includes familiarity with the language\u2019s syntax, functions, and key concepts. It\u2019s also important to follow JavaScript best practices when coding to ensure&hellip;<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":86839,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-87165","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/pages\/87165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/comments?post=87165"}],"version-history":[{"count":4,"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/pages\/87165\/revisions"}],"predecessor-version":[{"id":87284,"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/pages\/87165\/revisions\/87284"}],"up":[{"embeddable":true,"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/pages\/86839"}],"wp:attachment":[{"href":"https:\/\/rightwave.com\/rwi\/wp-json\/wp\/v2\/media?parent=87165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}