Engini’s Priority ERP activities allow you to create and modify records, activate form activations, and make API calls from your Priority ERP using Priority’s Webhooks module.
Getting Started with Priority ERP #
Prerequisites #
- Priority API License.
- Open access to Priority via port 443. If you can’t open this access, you can also just whitelist our IP. send us an email to support@engini.io.
- Enabled API access to FORMLIMITED form.
- Optional – Dictionary Module: To enable language-specific operations for both CRUD operations (Create, Read, Update, Delete) and procedures, ensure that the dictionary module is activated in your Priority ERP system. By default, the API will operate according to the system language unless specified otherwise.
Connecting Engini to Priority ERP #
- Enter your Engini account at https://app.engini.io.
- Navigate to Connections page by clicking on the Connections on the left sidebar or by clicking here.
- Click on the Add connection option located at the topbar.
- Choose Priority’s option from the available applications.
- Enter the following details in the “Edit Connection” form:
- Connection name
- API Url including the tabula.ini. for example https://erp.engini.io/odata/Priority/tabula.ini.
- To specify the language for API operations, append a comma and the language code to the end of the URL.
For example, for American English, use “https://erp.engini.io/odata/Priority/tabula.ini,3“.
- To specify the language for API operations, append a comma and the language code to the end of the URL.
- Database name (company id in companies form)
- API Username (Companies that use Priority identity management module should place their personal access token)
- API Password (Companies that use Priority identity management module should place “PAT” in all caps)
- X-App-Id & X-App-Key (Optional. used when using a dedicated priority connector)
- WebSDK Username & WebSDK Password (Optional. used when using a Priority’s form activations, for example, for printing a Price quotation document)
- Communication Channel
Choose the appropriate connection type based on your setup:- Cloud- If you are connecting to a database hosted in a cloud environment, select “Cloud”.
- OPA- If your database is on-premises and you are using an On-Premises Agent (OPA) for the connection, select “OPA”.
In this case, an additional field will appear:
On-Prem Agent- Choose the specific On-Premises Agent that you want to use for this connection if you have multiple agents configured.
- Click on the Save button located at the bottom of the form.
- Engini will now try to reach your Priority and read the forms marked for access by API in the FORMLIMITED form. Each opened form will get it’s unique action type Activities for Creating, Updating, Reading records and trigger type Activity to use in Priority webhooks for triggering Workflows in Engini.
Main Form Records #
Engini’s main form activities let you interact with main form entity records such as Customers, Sales Orders, Purchase Orders etc and do the following:
- Create a record
- Update a record
- Get a record
- Get records
- Get notified when a record is created / modified (depending on the business rule defined in Priority)
To describe how to use Engini’s Priority main form activities we’ll use the Priority’s Sales Orders form.
Sales Order updated #
Triggers when a “Send webhook” business rule defined in the Sales Orders form / Sales Orders BPM is activated.
- Choose Priority’s “Sales Order Updated” trigger.
- Copy the provided url and create a new webhook in Priority “Webhook Definitions” form in the following path – System Management > System Maintenance > Periodic Maintenance > BPM Maintenance > Webhook Definitions and paste the url in the “URL” field.
Priority Developer Portal (prioritysoftware.github.io) - Add a new rule to send a webhook using the Sales Order BPM (defined only on statuses) / Business Rules (can be defined on any field in the Sales Orders form).
- Name the business rule (only English characters are supported).
- Add the form fields that will be sent in the webhook body when triggered in the business rule body.
- Define the conditions in which the business rule will send the webhook.
- Define the user / users group and company/ies in which the business rule will send the webhook.
- Save the business rule.
- Back in Engini, add you can setup conditions that only when the conditions are met the Workflow will continue passed the trigger activity.
- Save the workflow.
You have successfully setup a Priority trigger in Engini.
Create Sales Order #
Creates a new Sales Order.
- Choose Priority’s “Create Sales Order” activity.
- Click on the “Add field” button.
- Choose the form field you want to populate from the fields list.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 1-3 for all the fields you want to populate.
Update Sales Order #
Updates an existing Sales Order.
- Choose Priority’s “Update Sales Order” activity.
- Enter the Sales Order number of the record you want to update.
- Click on the “Add field” button.
- Choose the form field you want to populate from the fields list.
- You can populate the field in one of the following options:
- Static value – number / string. when using strings you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- Repeat steps 2-4 for all the fields you want to populate.
Get Sales Order #
Retrieves a specified Sales Order.
- Choose Priority’s “Get Item Sales Order” activity.
- Enter the Sales Order number of the record you want to get.
Get Sales Orders #
Retrieves a list of Sales Orders.
- Choose Priority’s “Get Items Sales Order” activity.
- Output fields
You can select specific fields from a column dropdown menu to retrieve only relevant information instead of getting all fields by default. - Add Sorting
You can sort the retrieved list by multiple Sales Order fields either Ascending or Descending. - Add Filter
You can add filters to query the Sales Orders and retrieve only the records that met the conditions. - Top N
You can set the maximum number of Sales Order records Engini will return during one workflow cycle (default = all records).- If you set
Top N = 1
, a single record will be returned instead of an array. If no record is found, the action will fail, allowing you to implement an IF condition within the workflow. This can be useful for processes where the existence of a record determines the next steps in the workflow.
- If you set
- Offset
The offset parameter allows you to skip a certain number of records from the beginning of the result set (default = 0 records).
Uploading Files to Priority (Version 21 and Above) #
To upload files in Priority, follow these steps starting from version 21:
Download File from URL Activity
#
- Add the “Download File from URL” activity.
- In the URL field, specify the URL from which the desired file is to be downloaded.
- You can populate the field in one of the following options:
- String Static value – when using strings you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
Create Attachments Activity
#
- For example, for the specific screen where you wish to upload files, add the “Create Attachments” activity.
- You can attach files to any screen in Priority that allows you to upload files.
- Click the “Add field” button. Priority requires the following details to populate:
- File Path: The structure by Priority should follow this pattern-
“data:();base64,()”. To execute this process, use the following functions:- Concat- This function enables the merging of various elements into a single string, crucial for constructing the file path structure required by Priority.
- For your convenience, you can copy the contents of the Concat function. Don’t forget to include the BASE 64 as a property and the “GetMimeType” function:
Concat(‘data:’,GetMimeType(Populate here the file extension),‘;base64,’,Base64 String)
- For your convenience, you can copy the contents of the Concat function. Don’t forget to include the BASE 64 as a property and the “GetMimeType” function:
- GetMimeType- This function is utilized to fetch the MIME type associated with a specific file extension, a vital component within the file path construction process.
For example:
- Concat- This function enables the merging of various elements into a single string, crucial for constructing the file path structure required by Priority.
- File Name: The file name should include the extension of the specific file. You can populate the field in one of the following options:
- Static value – number / string. When using strings you need to surround them with single quotes (‘).
- Property value from a previous activity (Using the tooltip that opens when clicking on the field).
- Expression – using functions and/or Previous activity properties and/or static values (Using the tooltip that opens when clicking on the field).
- File Path: The structure by Priority should follow this pattern-
Form Activations #
To use Priority’s form activations, follow these steps:
WebSDK details #
- Navigate to Connections page by clicking on the Connections on the left sidebar or by clicking here.
- Press on the 3 dots on the right side of the Priority connection and click on the “Edit” option.
- Enter the WebSDK username and password and press Save.
- If your Priority On the public cloud (AWS), you have to enter the WebSDK URL as well.
- For production environments, the url is:
https://p.priority-connect.online/wcf/service.svc - For test environments, the prefix is an s, instead:
https://s.priority-connect.online/wcf/service.svc
- For production environments, the url is:
- If your Priority On the public cloud (AWS), you have to enter the WebSDK URL as well.
Form Activation Activity #
- Add the “Form Activation” activity of Priority.
- Choose the Form name from the drop down menu. The available forms are the open parent screens and child screens from your Priority account.
- Choose the Activation from the drop down menu.
- According to the Form name, an identifier field will appear. Enter a static value as you can see at the image below:
- Press Run. Each Run can add new fields to fill in.
- Repeat steps 4-5 until all required fields are filled up and “Ran successfully” message will appear.
- Now you can replace the static value (step 4) with dynamic value from previous activities.
Run Procedure Activity #
Prerequisites:
- EPROG form is accessible to API in FORMLIMITED form.
- The user used for the integration should have at least read privileges to EPROG form.
- The user used for the integration should have privileges to execute the relevant procedure.
To use Priority’s run procedure, follow the following steps:
- Add the “Run Procedure” activity of Priority.
- Choose the procedure name from the field options tab in the tooltip menu. All the available procedures.
- Fill in the required fields with static values first to setup the activity.
- Press Run. Each Run can add new fields to fill in. When you need to reset the values you can press the “Reset” button.
- Repeat steps 3-4 until all required fields are filled up and “Ran successfully” message will appear.
- After the procedure ran successfully, you can now change the relevant static values to parameters to allow the workflow to run using dynamic values.