<?xml version="1.0" encoding="UTF-8"?>
<dashboard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <layout>DashboardLayoutOneCol</layout>
  <title>Sourcerer Usage Statistics</title>
  <auto_reload>
    <enabled>true</enabled>
    <interval>60</interval>
  </auto_reload>
  <cells xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <cell id="0">
      <rank>0</rank>
      <dashlets>
        <dashlet id="CUSTOM__ID_row1_col1_9" xsi:type="DashletGroupByPie">
          <rank>0</rank>
          <title>Sourcerers with no transactions in the last 3 months by distributor</title>
          <query>SELECT c
FROM WebApplication AS c
JOIN Organization AS child ON c.org_id = child.id
JOIN Organization AS root ON child.parent_id BELOW STRICT root.id
WHERE root.distributor = 'True'
  AND c.recent_transactions != 'True'</query>
          <group_by>distributor</group_by>
          <style>pie</style>
          <aggregation_function>count</aggregation_function>
          <aggregation_attribute/>
          <limit/>
          <order_by>attribute</order_by>
          <order_direction>desc</order_direction>
        </dashlet>
        <dashlet id="CUSTOM__ID_row1_col0_3" xsi:type="DashletObjectList">
          <rank>1</rank>
          <title>Sourcerers with no transactions in the last 3 months</title>
          <query>SELECT WebApplication WHERE recent_transactions = 'False' AND org_id_friendlyname != 'Inventor-e' AND org_id_friendlyname != 'Dev' AND org_id_friendlyname != 'Fastenal' AND status = 'active' </query>
          <menu>false</menu>
        </dashlet>
      </dashlets>
    </cell>
    <cell id="1">
      <rank>1</rank>
      <dashlets>
        <dashlet id="CUSTOM__ID_row2_col1_8" xsi:type="DashletGroupByPie">
          <rank>0</rank>
          <title>Sourcerers with less than 250 vending transactions in last 30 days by distributor</title>
          <query>SELECT WebApplication WHERE cabinet_transactions_last_30_days &lt;= 250 AND solution LIKE '%Vending%'</query>
          <group_by>distributor</group_by>
          <style>pie</style>
          <aggregation_function>count</aggregation_function>
          <aggregation_attribute/>
          <limit/>
          <order_by>attribute</order_by>
          <order_direction>desc</order_direction>
        </dashlet>
        <dashlet id="CUSTOM__ID_row1_col0_11" xsi:type="DashletObjectList">
          <rank>1</rank>
          <title>Sourcerers with less than 250 vending transactions in the last 30 days</title>
          <query>SELECT WebApplication WHERE cabinet_transactions_last_30_days &lt;= 250 AND solution LIKE '%Vending%' AND org_id_friendlyname != 'Inventor-e'</query>
          <menu>false</menu>
        </dashlet>
      </dashlets>
    </cell>
    <cell id="2">
      <rank>2</rank>
      <dashlets>
        <dashlet id="CUSTOM__ID_row1_col1_7" xsi:type="DashletGroupByPie">
          <rank>0</rank>
          <title>Sourcerers with less than 250 SmartStore transactions in last 30 days by distributor</title>
          <query>SELECT WebApplication WHERE store_transactions_last_30_days &lt;= 250 AND solution LIKE '%SmartStores%'</query>
          <group_by>distributor</group_by>
          <style>pie</style>
          <aggregation_function>count</aggregation_function>
          <aggregation_attribute/>
          <limit/>
          <order_by>attribute</order_by>
          <order_direction>desc</order_direction>
        </dashlet>
        <dashlet id="CUSTOM__ID_row0_col1_2" xsi:type="DashletObjectList">
          <rank>1</rank>
          <title>Sourcerers with less than 250 SmartStore transactions in the last 30 days</title>
          <query>SELECT WebApplication WHERE solution LIKE '%SmartStores%' AND store_transactions_last_30_days &lt;= 250 AND org_id_friendlyname != 'Inventor-e'</query>
          <menu>false</menu>
        </dashlet>
      </dashlets>
    </cell>
    <cell id="3">
      <rank>3</rank>
      <dashlets>
        <dashlet id="0" xsi:type="DashletEmptyCell">
          <rank>0</rank>
        </dashlet>
      </dashlets>
    </cell>
  </cells>
</dashboard>
