How to start calculation of accruals manually
The following command is used to calculate accruals manually:
/usr/local/mgr5/sbin/billmaintain --command affiliatemonthly --date YYYY-MM-DD
If you need to recalculate the accruals for the referral program:
- Delete the referral program payments.
- Delete the reward accruals from the affiliatereward table. Read more in How does the affiliate program work?
- Execute the command above.
How to set the reward greater than 100%
It is not possible to specify the amount of reward more than 100% through the BILLmanager interface. However, to do so:
-
Create the following record into the database:
An example of a DB table recordUPDATE affiliate SET reward = 1000;
Comments to a DB record -
Clear the DB cache with the command:
Clear DB cacherm -rf /usr/local/mgr5/var/.db.cache*
-
Restart BILLmanager with the command:
Restart BILLmanager/usr/local/mgr5/sbin/mgrctl -m billmgr exit
How to link a referral to another client
To link a referral to another client:
-
Create the following record into the database:
An example of a DB table recordUPDATE account2project SET affiliatereferer = 3 WHERE account = 6;
Comments to a DB record -
Clear the DB cache with the command:
Clear DB cacherm -rf /usr/local/mgr5/var/.db.cache*
-
Restart BILLmanager with the command:
Restart BILLmanager/usr/local/mgr5/sbin/mgrctl -m billmgr exit
If the referrer, to which the client has been linked, does not have access to the referral program, under which the client is attracted, then the referrer will not receive rewards. The log will contain an error in the form below:
An example of a log errorJan 24 15:25:49 [272:152] libmgr ERROR Error: Type: 'access' Object: 'affiliate' Value: '1'
When considering the reward, BILLmanager uses the value of the affiliateprogram field in the account2project table for the referral.
For example, if the referrer is connected to the first referral program, and the referral has the second referral program in account2project, the referrer will be rewarded at the rate of the second program. This should be taken into account if the client changes the referral program, because the field affiliateprogram does not change.