Mapping Request Parameters

Introduction

In the vDesigner application, you can integrate different API to bind an action to different elements and controls. You can integrate two types of APIs, which are given as below:

  • Sync API
  • Other APIs

The sync API is specially used to insert the mobile app data into two tables: tb_cop_buss_obj_txn and tb_image_data_obj. The tb_cop_buss_obj_txn table stores the text and numeric data, while the tb_image_data_obj table stores image related data.

APIs that falls in the Other APIs category captures the response from third party server, apart from manipulating data on the database level such as fetching data from the database table. The database APIs are mainly used to retrieve the old data from the database tables. In the database APIs, internally implemented stored procedure executes and then calls corresponding service to perform the function.

To map request parameters:

To map request parameters:

  1. In the vDesigner application, locate the control/element (For example: – Submit (Bottom button)) where you want to integrate the API.
  2. To locate the control, locate the right navigation pane.
  1. In the right navigation pane, click the tab (For example: – Component) to locate the form/control where you want to integrate the API.
  1. After you locate the element/control (For example: – Submit), double-click the name of element in the right pane, and a dialog box (For example: – Bottom Button dialog box) opens.
  2. In the dialog box, click Edit Action, and the Action dialog box opens.
  1. In the Action dialog box, locate the Added Action area in the right pane.
  2. Under Added Action, click ON CLICK, and the Task dialog box opens.

Note:- In the last screen capture, if you view the list of added tasks in the right pane, you will find that the Save task has been configured on the priority basis. The reason of configuring the Save task is described as below:

On a specific form, If you are taking input from the mobile app user and you want that the form continues to hold the input data after the user navigates to another page, you need to apply the Save task on the Next button or Submit button of that form where you have asked the user to enter the data.

  1. In the left pane, locate the Search by task box.
  2. In the Search by task box, enter API Integration.
  3. After you locate the Api Integration task, click it, and the Api Integration dialog box opens.
  4. In the Api Integration dialog box, click Parameter’s Mapping, and the Data Connect dialog box opens.
  1. In the Data Connect dialog box, the left navigation pane displays the list of available APIs that are deployed on the vConnect portal.
  2. In the Data Connect dialog box, search the API that you want to integrate.
  3. After you search and find the API (For example: – Verify_professional), click to select that API.
  4. After you select the Verify_professional API, click the API’s version number, and the right panel displays the Request Parameters and Response Parameters tabs.
  1. Click the Request Parameters tab (If not selected).
  2. The Request Parameters tab displays the following fields:
    • Name
    • Source Type
    • Value
  3. In these fields, enter or select values as follows:
FieldsDescription
NameIn this field, enter the name of parameter (For example: – nik or name).  

Note:- In the Name field, the parameter’s name must match with the parameter’s name that you define in the Value field on the vConnect portal. On the vConnect portal, you enter the name of parameter in the Value field when you define the template body parameter while configuring an API.
Source TypeClick this list to select any of the following values:
–> Special
–> Value
–> Fixed
–> JSON
–> Table
–> Control

Selecting any of these values as source type determines the type of data source or format from where the parameter will pick the data or in which insert the data.
ValueIn this box, enter the value as follows. In the Source Type list, if:
i. You select: Special Value
In the Value box, enter hardcoded value: [Random_number]. In case of special value, the API will fetch the random number.

ii. You select: Fixed
In the Value box, enter any constant value that the respective parameter will store.

iii. You select: JSON
In the Value box, enter the json path (For example: – $.POD.nik). The API will pick the data from the JSON path.

iv. You select: Table
1. Click the Table Name list and then select the table (For example: – Image Table) from where the API will fetch the data.
2. After you select the table, the Column Name list and the Where box appear.
3. Click the Column Name list and then select the column (For example:- Image_stream) from where API will fetch the data.
4. In the Where box, enter/write the where clause of the SQL query if you want that the API fetch the data from the selected column with special conditions.

v. You select: Control
In the Value/Control box, enter the control ID (For example: – 79229) of the control/element (For example: – Text box/Text field) from where API will pick the data and store in the respective parameter.
  1. After you map the first parameter by following steps as described in the last table, map other parameters.
  2. To map other parameters, click Add Row, and another row of the following fields appears.
    • Name
    • Source Type
    • Value
  3. In these fields, enter values to map next parameter as described in the last table.
  1. After you map all the request parameters, click Save, and the Data Connect dialog box closes.
  2. In the API Integration dialog box, click Save, and the API Integration dialog box closes.
  3. In the Task dialog box, click Save, and the Task dialog box closes.
  4. In the Action dialog box, click Save, and the Action dialog box closes.
  5. In the Bottom Button dialog box, click Save, and the Bottom Button dialog box closes, and thus all request parameters are successfully mapped.
Was this article helpful?
YesNo