Image Flow
Last updated
Was this helpful?
Last updated
Was this helpful?
The image flow facilitates the transfer of image information like image urls, image orders from ERP systems to Omnitron.
- Inbound Flow: Indicates that the flow will read data from the ERP system. A cron schedule is set up to ensure it runs, for example, every 5 minutes.
- Outbound Flow: Signifies that product data will be posted to the flow from the ERP system, skipping the step of reading data from the ERP system.
- Login Step: Handles logging into Omnitron and (if configured) the ERP system. If an error occurs during this step, the details are logged.
- Read Data From ERP Step: For inbound flows, image queries are made from the ERP system. Outbound flows proceed directly to the next step.
- Script Step (Optional): Transformation operations on the data are performed using Python, if required.
- Mapping Step (Optional): Transformation operations on the data are performed using the Jolt Transform library. Further details can be found at the [Jolt Transform](https://jolt-demo.appspot.com/#inception) address.
- Write Data to Omnitron Step: The incoming data is divided into rows and written to Omnitron. Logs are created for each row. In case of an error, details of the error are logged.
- ERP Query Settings: Configures the key values to be used for single and date-based queries from ERP. Ex:
-Domain URL: Omnitron's domain URL.
- Timezone Settings: Timezone used for date-based queries from ERP.
- Filename Template: It defines that images should assign the images based on what. For example, if the images will be assigned based on SKU, value should be {sku}, if it is Base code, value should be {base_code}
- Enabled: Fetch missing setting, when enabled, allows fetching products from ERP that have been newly productized but lack image information. The 'fetch missing' functionality is a cron job operating every 4 hours for all enabled flows. It queries products missing images and triggers CSVs to flow for the identified products.
- Omnitron Identifier Path for ERP: Path for reading products from Omnitron.
- Fetch Images After Productization Date Limit: Determines how many days within which productized products will be queried from Omnitron.
- Add Extra Headers as Dict Format: During the image query from ERP, additional headers to be sent.
- Modified Date Key: The value of the date parameter thrown to receive the changes made since the last successful request. (e.g. modified_date\_\_gt, modified_date, modified )
- Extra Params: Additional parameters used when ERP request is made, it must be a valid dict if a GET request is made which will be used to send query parameters in the URL or it can be used on a POST request in which the extra params value will be used to be sent in request body.
- Endpoint URL: URL for reading data from the ERP system.
Dynamic URL Usage:
HTTP Method: GET or POST.
Pagination:
Offset pagination is a method of pagination where a fixed number of items are retrieved from a data source in each request, starting from a specified offset. This offset indicates the position from which to begin fetching data.
Seek pagination is a method of pagination that relies on a unique identifier or a specific value to retrieve subsequent sets of data. Instead of using offsets, like in offset pagination, seek pagination uses a marker or token that indicates where the previous set of data ended.
Next field pagination is a method of pagination where each response from the server includes a "next" field or token that points to the next page of data.
This is a base script. The process step within this script can be updated to enable the use of the script step. Script should be used in case Mapping can not be used to correctly transform response data to target structure. In the case it is not needed you can leave script input empty.
Script Testing: The response from ERP is placed in the input field, and the result of the script is viewed in the result field.
Expected Output:
Mapping Testing: The response from the script is placed in the input field, and the result of the mapping is viewed in the result field.
Example post request from Integrator to Omnitron.
POST Path: /api/v1/downloadable-image/
In outbound flows, triggers will be configured to send a POST request to the URL specified in the "Outbound Request URL" setting under the Configuration card. The content of the POST request will include JSON data containing details such as SKU and Images for each product.
Expected Payload:
The authorization token will be obtained by logging in with the Integrator user and must be included in the request headers for authentication purposes.
More details can be found at the website.