Plugins (or Extensions) are DataJet JSON scripts that sit in the DataJet plugins folder and have a wrapper around a standard Script Editor script. The wrapper contains the following elements:
Key | Value(s) | Description |
---|
type | "PluginType" | - "DJPLUGIN" - DataJet Plugin
|
version | versionNo |
|
help | "Help Text" | Paragraph providing brief explanation of how to use the Plugin or Extension |
helpURL | "URL to detailed help source" |
|
name | "Plugin Name" |
|
title | "Plugin Menu Display Text" | Menu item text |
classification | "Desktop Menu Location" | Plugin Menu Location. Can be:- "ANALYTICS"
- "ENGINEERING"
- "MODELLING"
|
"menuGroup | "Desktop Sub-menu" | Menu sub-group. On ANALYTICS and ENGINEERING will appear under the menu item "Extensions" On Modelling, will be the Sub Menu heading |
uivariables[] | [ { "variable": "%VARIABLE_NAME%", "name": "Variable Name", "type": "Variable type", "description": "Variable display description" "default": {datasetelement} "options":{"opt1", "opt2", "opt3"}, } ] | - Convention is to use %XXXXX% for variable names
- Supported types:
- string
- Table
- Field
- integer
- dataset
- choice
- "default" only required for type "dataset"
- "options" only required for type "choice"
|
script [] | [ScriptEditorScript] | script should contain a series of well-formed script-editor methods |
onView {} | [ { "action": "onView action", "report": "ReportName", } ] | |
{
"type": "DJPLUGIN",
"version": 1,
"help": "Recency Frequency Value Model\r\n\r\nUse Filter to restrict modeling universe",
"helpURL": "https://en.wikipedia.org/wiki/RFM_(market_research)",
"name": "RFM (Filtered)",
"title": "RFM (Filtered)",
"classification": "ANALYTICS",
"menuGroup": "RFM",
"uivariables": [
{
"variable": "%MODELNO%",
"name": "Model Name",
"type": "string",
"description": "Name for this models's results"
},
{
"variable": "%STABLE%",
"name": "Table",
"type": "Table",
"description": "Table to Model"
},
{
"variable": "%RECENCY%",
"name": "Recency Field",
"type": "Field",
"description": "Field that measures recency"
},
{
"variable": "%FREQUENCY%",
"name": "Frequency Field",
"type": "Field",
"description": "Field that measures frequency"
},
{
"variable": "%VALUE%",
"name": "Value Field",
"type": "Field",
"description": "Field that measures value"
},
{
"variable": "%DECILES%",
"name": "Quantile Size",
"type": "integer",
"description": "Size of quantile for combined-dimension (5-10)"
},
{
"variable": "%FILTER%",
"name": "Filter",
"type": "dataset",
"description": "Filter",
"default": {
"logic": "or",
"name": "%STABLE%",
"strict": true,
"set": [
{
"logic": "or",
"stype": "TABLE",
"entity": "%STABLE%"
}
]
}
}
],
"script": [
],
"onView": [
{
"action": "OpenReport",
"report": "%MODELNO%-RFV_REPORT"
}
]
}
uivariable examples;