Data Pipeline Proccesing Views
After some time, we have organized data in our CRM. Sometimes it would be nice to process them somehow and show the report with some type of a graph. Python language is a standard choice in data processing (in similar cases), so there should be core API to interconnect it with CRM Data Pipeline Processing Views. We can also define input fields to make custom forms and calculators over CRM data.
Scripts are written in making data pipeline view part. Every script consists with two methods.
def init(core):
# here is area for form defining input fields
pass
def process(core):
# processing data and making calculations
pass
For example:
def init(core):
core.addField("field1", "Field1", "text", "required|number", "@is_required");
core.addField("field2", "Field2", "text", "required|decimal", "@is_required");
core.generateForm();
def iterate(field1, field2):
# arguments are in order of fields, we can define all fields we want
# do some calculations over field values
core.putFieldData("field3",(field1*field2));
def process(core}:
core.addResultField("field3", "Field3")
# register iterate method for data iteration
core.iterateFields(iterate)
core.generateThreeAxisGraph(...)
We are registering two fields to generate input form (which is validated as two required numbers), then we are registering method called iterate for making some calculations and returning result. After that we are generating report in one three axis graph. Is it possible to interconnect with another systems.
There are several other methods to make CRM Data Pipeline Processing Views easier.