<div id="main-content" class="wiki-content group"> <p> <span style="color: rgb(51, 51, 51);"> </span> </p> <div class="aui-message problem shadowed information-macro"> <p class="title">Warning</p> <span class="aui-icon icon-problem">Icon</span> <div class="message-content"> <p> Starting with <strong>Fluig 1.2</strong>, the <em>Analysis and Processes Central</em> was discontinued and evolved into <strong>Fluig Analytics</strong>. </p> </div> </div> <p> <span style="color: rgb(51, 51, 51);"><br /></span> </p> <p> <span style="color: rgb(51, 51, 51);">Fluig has an advanced Analytics feature, which enables the creation of Dashboards and Views for monitoring information indicators that occur within the Fluig platform. This service is available in cloud only, which ensures that the entire broad processing of new information and data analysis occurs with great scalability.</span> </p> <div class="aui-message hint shadowed information-macro"> <p class="title">Note</p> <span class="aui-icon icon-hint">Icon</span> <div class="message-content"> <p> <span>As the Analytics service is in cloud, the server must be enabled for communication on port <strong>443</strong> to <strong>analytics.fluig.com</strong>; if it is not enabled, it will not be possible to send the data. </span> </p> </div> </div> <p>To enable Analytics in your environment, the following steps should be followed.</p> <a name="composition-deck-enable-analytics-steps"></a> <div id="enable-analytics-steps" class="deck" history="true" loopcards="false" effecttype="" effectduration="1.0" nextafter="0.0"> <ul class="tab-navigation"></ul> <!-- // .tab-navigation --> <div class="deck-cards panel" style=""> <div id="1" class="deck-card active-pane" style="" cssclass="" accesskey="" label="Passo 1" title="" nextafter="0" effecttype="default" effectduration="-1.0"> <p> Open a call via the </span><a href="http://suporte.fluig.com/" class="external-link" rel="nofollow"><span>Customer Portal</span></a><span> in "Calls > Software > Fluig" using the following parameters: </p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <td class="confluenceTd"><p> <span style="color: rgb(0, 51, 102);"><strong>Version</strong></span> </p></td> <td class="confluenceTd"><p>Fluig</p></td> </tr> <tr> <td class="confluenceTd"><p> <span style="color: rgb(0, 51, 102);"><strong>Module/Product</strong></span> </p></td> <td class="confluenceTd"><p> <span>Fluig</span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span style="color: rgb(0, 51, 102);"><strong>Process or Routine</strong></span> </p></td> <td class="confluenceTd"><p> <span>Analytics</span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span style="color: rgb(0, 51, 102);"><strong>Summary</strong></span> </p></td> <td class="confluenceTd"><p> <span>Creating project Analytics</span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span style="color: rgb(0, 51, 102);"><strong>Incident</strong></span> </p></td> <td class="confluenceTd"><p> <span>Information for creating context: </span> </p> <ol> <li><span>Company Name</span></li> <li><span>CNPJ (Corporate Taxpayer's Registry)</span></li> <li><span>TOTVS customer code</span></li> <li><span>Code of context to be created (usually company name, may contain space, characters without diacritics and numbers)</span><span> </span></li> <li><span>Administrator’s name and last name</span></li> <li><span>Analytics environment administrator’s e-mail</span></li> </ol></td> </tr> </tbody> </table> </div> <p> <br class="atl-forced-newline" /> <span>As a result of the call, two environments will be released: one for production and the other for testing, in which the administrator will receive an e-mail invitation to participate in the Analytics project, and will receive, in the call, the codes of the projects created.</span> </p> </div> <div id="2" class="deck-card " style="" cssclass="" accesskey="" label="Passo 2" title="" nextafter="0" effecttype="default" effectduration="-1.0"> <p> <span>In the environment with Fluig that you want to connect the integration with Analytics, you will need to access the WCM administrator environment (with the WCMAdmin user). In this environment, go to:</span> </p> <ol> <li><span> </span><span>Menu option: Control panel</span></li> <li><span>Click on the WCM tab</span></li> <li><span>then go to the Companies option</span></li> </ol> <p> <span>In this option, select the company you want to enable Analytics, then click Edit. Then go to <strong>Register additional data</strong> and on the following screen add the following keys and values </span> </p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <td class="confluenceTd"><p> <strong>Key</strong> </p></td> <td class="confluenceTd"><p> <strong>Value</strong> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span>analytics.gd.project.id</span> </p></td> <td class="confluenceTd"><p> <span style="color: rgb(255, 0, 0);"><your project code sent by support></span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span>analytics.gd.user</span> </p></td> <td class="confluenceTd"><p> <span style="color: rgb(255, 0, 0);"><e-mail in which you received the invitation from support></span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span>analytics.gd.pass</span> </p></td> <td class="confluenceTd"><p> <span style="color: rgb(255, 0, 0);"><password registered after the invitation></span> </p></td> </tr> <tr> <td class="confluenceTd"><p> <span>analytics.gd.active</span> </p></td> <td class="confluenceTd"><p> <span>true</span> </p></td> </tr> </tbody> </table> </div> <p> <strong><img class="confluence-embedded-image" src="attachments/107381593/107185677.png" data-image-src="attachments/107381593/107185677.png"></strong> </p> </div> <div id="3" class="deck-card " style="" cssclass="" accesskey="" label="Passo 3" title="" nextafter="0" effecttype="default" effectduration="-1.0"> <p> <span>With the invitation received by mail, complete your registration on Fluig</span> <span>Analytics. With this user and password, you will be able to monitor the data being sent.</span> </p> </div> </div> </div> <!-- // .deck --> <div class="aui-message problem shadowed information-macro"> <p class="title">Notification</p> <span class="aui-icon icon-problem">Icon</span> <div class="message-content"> <p>Do not disclose your project code, this is the key to access to your project.</p> </div> </div> <p> </p> <h1 id="GuiadeImplantaçãoFluigAnalytics-EnviodosDados"> <span style="color: rgb(51, 51, 51);">Sending Data</span> </h1> <p> <span style="color: rgb(51, 51, 51);">Data is sent in <u>regular intervals of 15 minutes</u>. Only data that has changed over this period is sent. Communication is always made from the server to analytics.fluig.com. The firewall must be disabled for this address. </span> </p> <p> <span style="color: rgb(51, 51, 51);">To send specific Workflow processes data, </span><span style="line-height: 13.0pt; font-size: 10.0pt;">the event </span><em style="line-height: 13.0pt; font-size: 10.0pt;">beforeSendData </em>must be used for configuration of the data sent to Analytics<span style="line-height: 13.0pt; font-size: 10.0pt;">. </span> </p> <p> <span style="font-size: small;"><span style="line-height: 13.0pt;">The function to treat this process event has two </span></span>parameters<span style="font-size: small;"><span style="line-height: 13.0pt;"> </span></span><em style="line-height: 13.0pt; font-size: 10.0pt;">customField and customFact</em><span style="font-size: small;"><span style="line-height: 13.0pt;">. The first parameter is an <em>array</em> of <em>strings</em> already instantiated, with 10 positions (0 to 9). The second parameter is an <em>array</em> of 10 positions, but the data must be <em>double</em> type and its  </span></span>content<span style="font-size: small;"><span style="line-height: 13.0pt;"> will be treated as a "fact". The big difference between a <em>customField and a customFact</em> field is that in a <em>fact</em> field (<em>customFact</em>), as it is a number, operations such as sum, average, maximum and minimum can be calculated. These are some examples of field types and the value that should read: </span></span> </p> <div class="table-wrap"> <table class="confluenceTable"> <tbody> <tr> <th class="confluenceTh">Field</th> <th class="confluenceTh">Field to be sent</th> <th class="confluenceTh">Justification</th> </tr> <tr> <td class="confluenceTd">Purchase order region</td> <td class="confluenceTd"><em>customField</em></td> <td class="confluenceTd">Since the goal is to tell in which regions the applications were requested, it doesn’t have to be a fact field.</td> </tr> <tr> <td class="confluenceTd">Requester name</td> <td class="confluenceTd"><em>customField</em></td> <td class="confluenceTd">It will only be used as a cluster</td> </tr> <tr> <td class="confluenceTd">Total order amount</td> <td class="confluenceTd"><em>customFact</em></td> <td class="confluenceTd">To retrieve information such as average order amount of a region</td> </tr> <tr> <td class="confluenceTd">Number of items in order</td> <td class="confluenceTd"><em>customFact</em></td> <td class="confluenceTd">Add up how many items were requested by a requester<span style="line-height: 13.0pt; font-size: 10.0pt;"> </span> </td> </tr> </tbody> </table> </div> <p>Below is a sample implementation of the event, with two fields filled out:</p> <div class="aui-message warning shadowed information-macro"> <p class="title">Warning</p> <span class="aui-icon icon-warning">Icon</span> <div class="message-content"> <p>Note the conversion of the field to Double</p> </div> </div> <div class="code panel pdl" style="border-width: 1px;"> <div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"> <b>Example of Workflows Event</b> </div> <div class="codeContent panelContent pdl"> <pre class="theme: Confluence; brush: javascript; gutter: false" style="font-size: 12px;">function beforeSendData(customField, customFact) { customField[0] ="1"; customField[1] =hAPI.getCardValue("campo_do_formulario"); customFact[0]=10.53; customFact[1]=java.lang.Double.parseDouble(hAPI.getCardValue("campo_valor")); }</pre> </div> </div> <p> <span style="color: rgb(51, 51, 51);"><br /> <span class="confluence-anchor-link" id="GuiadeImplantaçãoFluigAnalytics-_GoBack"></span></span> </p> </div> |