Getting Started
Pepperi JS Client Side API enables you to extend our Native and Web Apps. The run-time of the API is either from our Rule-Engine-based User Define Fields or from our Workflow's Custom Web Forms
Namespace: pepperi.api
pepperi.api VS pepperi.app
The pepperi.api namespace functions do not trigger any auto-calculation of the app's business logic (rule engine) for that purpose the namespace "app" should be used instead.
Both "api" and "app" can be used inside a web custom form (visible or hidden) as a step in a workflow
Only "api" functions can be called from the rule engine = calculated user defined fields
the only functions supported in the "app" namespace are:
pepperi.app.accounts.update
pepperi.app.activities.update
pepperi.app.transactions.update
pepperi.app.transactionLines.update
pepperi.app.transactionScopeItems.update
pepperi.app.transactions.addLines
pepperi.app.transactions.removeLines
Async: Custom Web Forms VS calculated UDF (rule engine)
In web custom forms only - the Client API work Async - for all functions , so that 2 parameters are always added: responseCallback and requestID - requestID is optional - recommended to identify the request upon getting the Async response.
For example:
Date and Time: UTC only
Date format in the API : Dates are retrieved and should be updated in UTC only, in the ISO 8601 format: 2018-12-18T12:29:02Z or 2018-12-18Z
Rule Engine Date format: dates are retrieved in the Rule Engine GetValueByAPIName
function in the unix timestamp format - seconds since Jan 01 1970. (UTC) see here : https://www.unixtimestamp.com/ and therefor will need to be converted in order to change the field value and update it back through the API . code sample for the Rule Engine calculated fields :
Filters : Dates can be provided to the filter object in a non-UTC format, and the function will convert it internally to UTC.
Logs : send logs to our servers to track issues
On iOS and Android - the logs will be sent in case the app crashes - and on the web app logs are sent to our servers constantly in real-time
Verbosity' is optional. (Low, Medium , High ) default is 'Low'
Error Handling
On Error - all functions returns the same error object:
Context : Run-time scope of data retrieval and data update
this function is more important for the web custom forms - since the code in the custom form is always a part of a workflow and therefore its important to be able to get it's run-time scope
This function also works in calculated fields.
Returns an object to the call back function:
Filter object for the "search" functions
A "search" function is used all over the Client API to search for multiple objects.
Below is the most simple example for filter:
A filter can contain unlimited number of condition nodes, for example:
Operators supported grouped by Data Type :
Last updated