API - FILE IFlow

Steps :

  1. Token step

  2. Get Api - fetches data

  3. File create - creates file

  4. File upload - uploads data

The Steps involved can vary if we implement Global Variable.

Process:

• Delivers a scheduled integration portal-based solution that can be automated to flow data from one system to another ftp/sftp System.

• Get the data from GET API and place the data in the required FTP/SFTP.

• Simplify maintenance and minimize coding with seamless integration into delivery.

  1. Token step

This is a Bizom API step, to generate a token using username and password credentials.

Step Type: REST adapter

Sub Type: POST|application/xml

API URL: https://api.bizom.in/oauth/directLogin/xml

Sample Request:

<User>

<username>ecom_apiadmin</username>

<password>Pir@m@|</password>

</User>

  1. Retrieve Data using Get API

With the Get API, we retrieve the data using page filters.

In the response formatter, the structure and format of the retrieved data is stored in an object with the help of Nashorn template.

Pagination filters to fetch data from API:

  • Start & end sequence

  • date / time filter

  • Batch count & size

Step Type: REST adapter

Sub Type: POST|application/xml

API URL: https://api.bizom.in/salesreturns/getSalemansalesreturn/?access_token=${configs['0'].values['1']['Token']}&responsetype=json&fromdate=${lastScheduledStartTime?date} &todate=${nextRunTime?date}&startseq=${startSequence}&endseq=${endSequence}&fromtime=${lastScheduledStartTime?time}&totime=${nextRunTime?time}&is_primary=1&groupbytransactions=1

  1. File Create Step

It is a SFTP/FTP step and here a file is created on the server.

In this step, settings are given to detail on the file format, delimiter, extension and structure.

Step Type: File Create Adapter

Sub Type: SFTP

  1. File Upload Step

The generated file in the 3rd step is uploaded to sftp server at this time.

As in the third step, here also step settings are added to detailing.

Step Type: File Upload Adapter

Sub Type: SFTP

File path in OIP:

Parameters:

  • user name

  • Password

  • Host name/IP address

  • Port

  • Main folder path

  • New folder path

  • Processed folder path

  • inProgress folder path

Separated by delimiter.

Example:

PiramalGroup|LpDGNCkP0o|integrationdata.bizom.in|22|/integrationftp.bizom.in/PiramalGroup/bizom/Trishul/prod/PrimaryOrder_BizomToSAP|new|processed|inProgress

Step Settings:

Step Setting

Description

CSV_DELIMITER

To configure the Delimiter by which the values in the file are separated.

FILE_NAME_FOR_FILE_UPLOAD

Name with which the file is uploaded in the server

FILE_EXTENSION_FOR_FILE_UPLOAD

Extension with which the file is uploaded in the server

DATE_FORMAT_FOR_FILE_UPLOAD

Date format with which the file is uploaded in the server

APPEND_DATA_IN_SINGLE_FILE

This setting is given when the data of different batch or API to be uploaded to the same file or in different file

WINDOWS_LINE_DELIMITER

To configure the Windows command line Delimiter by which the values in the file can be separated.

UPLOAD_EMPTY_FILE

To configure whether to upload an empty file into the server or not

Notes:

  • The Step Type and Type are based on the adapter used for the step.

  • The Logging enabled is to show the log for the step in step history.

  • In the 3rd and 4th step, there is no request and response involved since we are only creating a file and uploading the data into it.

Last updated