cancel
Showing results for 
Search instead for 
Did you mean: 

How can we reset counters in SAP CC 5.0?

dlopezbelandia
Explorer
0 Kudos

Hi

We are using counters in our logics at the charge plan level in the provider contract and we would like to be able to be able to manipulate them (for some tests and particular scenarios (e.g. sth goes wrong)).

What is the best approach to do this?

Is it possible to do this through any web service or through some java method in the API?

Thanks a lot!

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member428395
Active Participant

Hello,

The only way to modify counter value is by using rating request. It could be done by using a recurring fee (ex: each day at midnight, the counter is updated) or by using an usage fee. It means that you have to implement the counter reset in your logic by adding the recurring fee or the usage fee.

If you decide to use a specific usage fee, you can use the Charging web service to execute this specific usage fee which allow to set the counter value.

Best regards,

Eric Fremont

dlopezbelandia
Explorer
0 Kudos

Thanks a lot for your response Eric!

Answers (2)

Answers (2)

Hi Eric,

you are right.

Playing with counters is "dengerous" and should not take place on the production env. Especially that there is no logging possibility for such change on CC side. I mean that there is no info in Operational or Change object logs that counter was modified.

But...

for tests or fixing issues we miss SAP standard functionality to modify counters and to log the changes(with old and new value). For example from CRM or ERP or CoreTool. They can be even marked as "changed manually by user XXXXXX".

best regards

Rafal

0 Kudos

Maybe sombody might be interested also in another way.

Counters can be modified without calling recurring or usage charges by Webservice chargingContractStateChange.

  <soapenv:Body>
      <sch:chargingContractStateChangeRequest> 
<date>2018-03-20T13:43:00</date> <chargingContractState>
<chargingContractId>00000000000000000001</chargingContractId>
<!--Zero or more repetitions:-->
<counter>
<name>COUNTER_001</name>
<value>0</value>
<!--Optional:-->
<namespace>COUNTER_001_NAMESPACE</namespace>
</counter>
</chargingContractState>
</sch:chargingContractStateChangeRequest>
</soapenv:Body>
former_member428395
Active Participant
0 Kudos

Keep in mind that this way is not recommended. This chargingContractStateChange webservice is dedicated for migration purpose only. This web service should not be used for a regular business process.