Author Topic: How to invoke formula from api sdk?  (Read 2420 times)

Offline apu321X

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
How to invoke formula from api sdk?
« on: June 26, 2017, 10:08:22 PM »
Hi friends, good day.

I am currently doing a program that does is check statistics with the api of genesys, I consulted and reviewed the documentation but only mention how to capture and configure a single object. But I need to get the formulas. Here is my code:

[code]
                RequestOpenStatistic request = RequestOpenStatistic.create();

                StatisticObject objeto = StatisticObject.create();
                objeto.setObjectId(rs.getString("name_objeto"));
                objeto.setObjectType(Util.getStatistic(rs.getInt("type_object")));
                objeto.setTenantName("XXX");
                objeto.setTenantPassword("");
                StatisticMetric metrica = StatisticMetric.create();
                metrica.setStatisticType(rs.getString("desc_metric"));
                metrica.setFilter(rs.getString("filter_name"));

                request.setReferenceId(indice);
                request.setStatisticMetric(metrica);
                request.setStatisticObject(objeto);
                request.setNotification(notificacion);
 
[/code]

Up to that point everything comes to perfection, but as I described above I need to capture the formulas eg (A = B + C) I need to get the value A;


Thanks..!!!!




Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: How to invoke formula from api sdk?
« Reply #1 on: June 27, 2017, 08:11:09 PM »
[quote author=apu321X link=topic=10448.msg47429#msg47429 date=1498514902]
Hi friends, good day.

I am currently doing a program that does is check statistics with the api of genesys, I consulted and reviewed the documentation but only mention how to capture and configure a single object. But I need to get the formulas. Here is my code:

[code]
                RequestOpenStatistic request = RequestOpenStatistic.create();

                StatisticObject objeto = StatisticObject.create();
                objeto.setObjectId(rs.getString("name_objeto"));
                objeto.setObjectType(Util.getStatistic(rs.getInt("type_object")));
                objeto.setTenantName("XXX");
                objeto.setTenantPassword("");
                StatisticMetric metrica = StatisticMetric.create();
                metrica.setStatisticType(rs.getString("desc_metric"));
                metrica.setFilter(rs.getString("filter_name"));

                request.setReferenceId(indice);
                request.setStatisticMetric(metrica);
                request.setStatisticObject(objeto);
                request.setNotification(notificacion);
 
[/code]

Up to that point everything comes to perfection, but as I described above I need to capture the formulas eg (A = B + C) I need to get the value A;


Thanks..!!!!




[/quote]

can't you do that via your code? (get two values and assign the sum in a variable)

The 'custom formula' formula should be inside the statistictype, though

Offline apu321X

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: How to invoke formula from api sdk?
« Reply #2 on: June 28, 2017, 05:32:28 PM »
Hello, thanks for answering.

What happens that I currently have to gather statistics to make the corresponding calculation using a library of the Java execute the logic to process the calculation. So there is no way to invoke the statistics already formulated since the SDK of Genesys?