Embedded workflow
It is possible to integrate ForecastingApp directly into Erply backoffice to enhance the existing workflow and keep your users at a single familiar work environment.
In order to set up embedded views you need to configure backoffice plugins. Depending on your backoffice version the access path may be different.
Go to Settings->Configuration->Edit plugins
Insert the following code snippet to the editor box. Please refer to the Erply plugins API for full details.
// ------------- region start - ForecastingApp iframe -------------
$(document).ready(function () {
let url = `https://analytics-api.erply.com/erply/session-login?sid=${apiSessionKey}&cc=${customerCode}&embed=true&redirect=true¶ms=style:erply,hidemenu:1,go:app`
ErplyJsApi.addSubmenuButtonToOpenIframe('ForecastingApp', 'menugroup_reports', url, 'ForecastingApp')
})
// ------------- region end -------------
If you have new Backoffice menu enabled you can do this using the menu editor. Please follow the guide here:
Adding Items Using New Menu Editor
Once this is done the menu item ForecastingApp appears in the Reports/Additional Links menu group.
You can add as many items as needed. Below is the list of options you can use to configure the behaviour of the embedded view.
https://analytics-api.erply.com/erply/session-login?sid=${apiSessionKey}&cc=${customerCode}&embed=true&redirect=true
This is the base URL which will invoke ForecastingApp. If the embed parameter is set to "true" then ForecastingApp navigation bar and access to user/configuration menus is removed. If redirect is set to "true" then ForecastingApp is integrated directly into the backoffice view, otherwise it will be opened in a new tab or window.
List of URL parametyers:
sid = Erply session key (required)
cc = Erply customer code (required)
embed=Remove the ForecastingApp title bar from the view (optional)
redirect=if true or 1 then the page will remain inside Backoffice IFrame, otherwise the report will be openeed in a new tab (optional)
go=If set then ForecastingApp opens the specified report directly in the IFrame, if not set then the default landing page will be opened (optional, see below)
params=change the behaviour of the page (optional, see below)
To customise the behaviour you can add additional parameters to the request using ¶ms=variable1:value1,variable2:value2 format.
List of supported variables below. Each variable can have one value of one or more options as variable:option1|option2
style:erply - whether to apply visual style matching Erply backoffice for enhanced experience.
hidemenu:1|0 - whether to hide the ForecastingApp sidemenu. If the sidemenu is disables the user can only access one specific ForecastingApp view
collapsemenu:1|0 - whether to collapse the sidemenu by default. Only useful if hidemenu is not enabled.
Each form and report has its own navigation path:
Each form and report has its own navigation path:
In order to access Inventory Days report (https://demo.targetta.co/#/view/analytics-inventory-dsi) directly from the backoffice menu item set the go parameter as follows:
&go=view;analytics-inventory-dsi
Pre-populating the context variables via navigation is currently not supported.
How do I get access to title bar and menu after I used embedded view?
Navigate to your ForecastingApp URL and wait until page has finished loading
Append to address bar the following: ?embed=false&hidemenu=false
Reload the page and make sure the appended code gets transferred to the page