VIDEO Instructions

Step By Step Instructions

Step 1

Begin by launching the automation tool interface. We’ll utilize an AI, like ChatGPT or Gemini, to target updates on the supplier price list for aluminum.

Step 2

For the IP script, select the iChat block. Decide whether to use Gemini or ChatGPT. Set up the authorization parameters for your chosen AI model.

Step 3

Configure the authorization settings to access the model via IPA. Choose a response format, such as JSON, and prepare to extract necessary data. You can easily copy and paste the necessary scripts.

Step 4

Set up the parameters for returning text values that provide information. Create and define your variables, utilizing JSON, to form a text message for the model.

Step 5

Duplicate the configuration as needed. Pose the query for a list of the top 10 metal prices, including aluminum, especially for transactions with Canadian companies.

Step 6

Since Canadian dollars will be used, ensure the script is set to parse data correctly. Implement logic to verify that the response code is satisfactory.

Step 7

Define return value settings to output text. In case of errors, utilize the last API error message feature, or use function responses in JSON format.

Step 8

Wait for the JSON response, which will provide the required data. Use a parser for the JSON format to extract the necessary information, such as prices.

Step 9

Iterate through each key in the JSON data, which might include both uppercase and lowercase formats, and ensure the logic accommodates these variations.

Step 10

Transform all text to lowercase to maintain consistency. Initialize variable prices with a value of zero, and accept one response at a time.

Step 11

Conclude by deleting any unnecessary components or scripts that are no longer required.

Step 12

Review the logs to ensure everything is functioning correctly. If you encounter a token issue, make sure that response.json is properly implemented.

Step 13

Confirm that the price is set to 3. You can modify this setting using text, numbers, or decimals depending on your requirements and timing.

Step 14

Assess all resources being utilized. This step involves using precise tools such as metal price APIs or similar services to locate the necessary information from the supplier.

Step 15

To update the price, use 1.122 as a test value to observe changes. Locate the supplier and identify the specific SKU that requires an update.

Step 16

Manage data by searching the database for supplier information. Filter by the key attribute of the supplier. For this example, use 001 to retrieve the necessary details.

Step 17

Identify the supplier. Load the supplier using its ID and navigate to ‘persons’ to find the supplier prices by iterating through the object.

Step 18

Examine the supplier list to find if the SKU matches the ROV-I SKU.

Step 19

Duplicate the purchase price for ROV-II. Save this supplier’s data in a block. Load the supplier’s block in memory and search for it using its ID.

Step 20

Iterate through suppliers that have SKU1. If a supplier’s SKU matches, update the purchase price accordingly. Execute the script to apply the changes.

Step 21

The updated purchase price should now be 3.8. This update will propagate to all components that include these elements.

Step 22

Utilize the updated prices in scenarios where they are relevant, such as ROV profiles. The process is now complete and successfully implemented.

Read More

Related Posts

Custom document and Tesla Fleet API integration (DIY)

Custom document and Tesla Fleet API integration (DIY)

Today, the need for automation is increasing. The foundation of automation is machine-to-machine communication. Today this is achievable through API integrations (today it is the de facto industry standard). Transferring data from one system to another works through...

read more
Conditional formatting in ERPAG

Conditional formatting in ERPAG

What is conditional formatting? Conditional formatting is a feature commonly found in spreadsheet software, such as Microsoft Excel, Google Sheets, and similar applications. It allows users to automatically apply formatting—such as font color, background color, font...

read more
JSON / XML Designer

JSON / XML Designer

JSON/XML Designer in ERPAG is a visual tool that will allow users to transform data from the ERPAG database into JSON or XML format. This can be further used for future integration with API services. This tool provides a user-friendly interface where users can define...

read more
💬 Start Chat