Apps
Priority ERP
18 min
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 /#getting started with priority erp prerequisites /#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 (see below) 34 159 217 185 34 141 24 31 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 /#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 https //app engini io/connections 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 choose a significant 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 “ 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 websdk url optional used when using a dedicated priority connector x app id & x app key websdk username optional used when using a priority’s form activations, for example, for printing a price quotation document websdk password optional used when using a priority’s form activations, for example, for printing a price quotation document time zone choose the correct time zone of your location, or you enterprise location 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 note 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 /#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 triggers sales order updated /#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 https //prioritysoftware github io/webhooks 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 /#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 /#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 /#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 /#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 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) /#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 /#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 /#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 ) 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 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) 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 https //app engini io/connections 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 form activation activity /#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 /#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 to see all mandatory fields, fill in the initial values and click run the procedure is iterative, and clicking run may reveal new required fields that were previously hidden 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