Custom Modules
Custom modules are user- defined modules in the source application that handle specific types of information or data that are not available in the pre-built modules of the source application.
Custom Modules - API Configuration
This section allows you to configure the API process for custom modules.
- Step Name: Provide a suitable name for the API configuration of custom modules. This will help you track and distinguish the different API calls.
- Base URL: A Base URL is the foundational part of a web address (URL) that remains the same across multiple requests or endpoints in a web application. It serves as the starting point for all API calls Provide the base URL to which the request should be sent.. Eg: https://api.example.com/
- Method: Choose the method, Get or Post to receive the response from the source application.
- Response Type: Choose the format in which the data should be returned by the server in response to an API request.
Parameters
- Query parameters are parameters that are included in the URL of a request. Query parameters are appended to the URL after a question mark (?) and separated by ampersands (&) if there are multiple parameters. For example, in the URL https://api.example.com/users?username=jane_doe & status=active, username and status are query parameters.
- A header parameter in HTTPS requests is a key-value pair that is sent in the request header to provide information about the request or client. These headers help the server understand the context of the request, handle authentication, or provide metadata.
- URL-encoded form data is used primarily in POST requests to send data in the body of the request. It is also encoded in key-value pairs, but it is not part of the URL.
Time Period
Records in the custom module might get frequently updated, and the Time Period section allows you to define the parameter settings to fetch the new and updated records added to the custom module dynamically.
- Choose the method in which the request should be sent from the Send As drop-down menu.
- Specify the Parameter Name and Values.
- Specify the Date Format.
- Granularity lets you define the time intervals for fetching data, while values specify the exact range, such as retrieving data for the past year or the last month.
Responses
This section allows you to configure the fields or columns of the custom module. Specify the Field Name and the corresponding Path. Click the Add icon to include more fields.
Transformation
API responses received from the server (resource applications) can follow different formats and structure. The transformation sections allow you to change the format of the responses received to the desired format.
- Choose the Format Type from the drop-down menu.
- Specify the required details applicable for the chosen format.
The following are the transformation options available:
- JSON Array to String: Specify the Path for which the transformation should be applied. Specify the Delimter that separates the data and the Key. Select the checkbox Allow duplicate values
- JSON Array to JSON Object: Specify the Path and the JSON Object Key.
- JSON Object Array to JSON Object: Specify the Path and the JSON Object Key.
- JSON Object to JSON Object Array: Specify the Path and the JSON Object Key.
- JSON Array to String: Specify the Path, Child Key Name, and Parent Key Name.
- Change Data Format: Specify the Path and the Date Format in the response, Date format to Convert, and the Timezone.
Pagination
Pagination is a process that enables you to break up the number of records that are returned from a retrieve API action into more manageable sizes. It allows you to import data in batches.
Custom Pagination
Custom Pagination allows you to configure the rules and parameters to be used for pagination. It provides greater flexibility and control over the pagination process. Custom pagination can define specific conditions that indicate when to stop fetching data.
End Condition:
- Type: Choose the condition based on which the data fetch should be stopped from the drop-down menu.
- Look in: Indicates the location or field in the data where the pagination parameters should be applied.
- End Condition Path: Specify the End Condition Path.
- Comparator: Choose the Comparator value for pagination.
- End Condition Value: Specify the End Condition Value.
Iteration Logic
Iteration Logic allows you to configure how to send the parameters in an HTTPS request. Choose the method in which the request should be sent from the Send As drop-down menu and specify the Parameter Name and Path.
Page Number
You can use this option when your data is stored in multiple pages and you want to import them in the same sequence into Zoho Analytics.
General
- Limit: The Limit specifies how many records should be fetched in one request. For example, if you set a limit of 100, the API will return up to 100 records per request/page.
- End Condition Path: This defines the point at which the pagination should stop. It’s often based on a field in the API response, such as a boolean flag (has_more) or checking if there are no further pages to fetch (next_page is null). This ensures the system knows when to terminate the request cycle.
Iteration Logic
Iteration Logic allows you to configure how to send the parameters in an HTTPS request. Choose the method in which the request should be sent from the Send As drop-down menu and specify the Parameter Name.
Next Page URL
The Next Page URL is used to retrieve or fetch the next set of data when the results are split across multiple pages.
- In the Look In field, specify whether the response can be found in the request's response headers or response body.
- Specify the Path to identify the page's URL.
Offset
Offset pagination fetches the subset of records based on the offset parameters. This works by defining an offset (starting point) and a maximum number of records (limit) to return, facilitating efficient data retrieval across multiple pages.
General
- In the Limit option, specify the maximum number of records to be fetched in one request.
- Specify the End Condition Path that determines when pagination should stop.
Iteration Logic
Iteration Logic allows you to configure how to send the parameters in an HTTPS request.
- Choose the method in which the request should be sent from the Send As drop-down menu.
- Specify the Parameter Name.
Entities Configuration
Entities Configuration allows you to define or map the level from which the data should be fetched for the custom module. Please note that this is not a mandatory step.
- Select the Entity Name from the drop-down menu.
- Specify the number of records to be fetched in one API call in the Count Per Call field.
- Choose the format in which the records should be rendered from the Input Type drop-down menu.