Question
Is there any API to change CCP version for customer?
Answer
API to check CCP version: am.getCustomerCPVersion
XML body:
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>am.getCustomerCPVersion</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>account_id</name>
<value>
<i4>1000055</i4>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
API to set CCP version for a customer: am.setAccountCCPVersion
XML body:
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>am.setAccountCCPVersion</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>account_id</name>
<value>
<i4>1000055</i4>
</value>
</member>
<member>
<name>ccp_version</name>
<value>
<i4>2</i4>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
If you have a lot of end-customers for switching, you can use the attached script switchToUX.sh
How to use it:
1) Prepare a list with end-customers
account_id:
1016084 1016085 1016086 ...
2) Execute the script:
To do so, just run:
#bash /root/9376/switchToUX.sh
or
./switchToUX.sh
3) The script asks you to provide a list with end-customers
account_id:
Please specify a path where a file with customer ID where is located, i.e. '/tmp/list.txt':/tmp/list.txt
4) Then press 1 if you want to switch from UX1 to CCPv1 and 2 - from CCPv1 to UX1:
If you want to switch customers to UX1 please press 2, if CCPv1 - press 1:2
5) After that, the script starts switching end-customer from one ccp to another.
6) When the script finished, you will see an amount of switched end-customers and then it will suggest open the logfile /var/log/switchToUX.log
NOTE Character in the list should be set as UNIX. To check it:
# cat -A <file_with_account_ids>
If you see something like 1000007^M$
convert the file via dos2unix:
#dos2unix <file_with_account_ids>
the file should contain $
at the and of all rows:
1000007$