Usm hydra EN: различия между версиями

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
 
Строка 61: Строка 61:
  $logPath            - Path for logging
  $logPath            - Path for logging
  $isSilence          - Silence Mode flag ''(hide the output of information messages from the module to the console)''
  $isSilence          - Silence Mode flag ''(hide the output of information messages from the module to the console)''
 
  $billingDBHost      - address of the billing server
  $billingDBHost      - address of the billing server
  $billingDBUser      - user name for access to the billing database
  $billingDBUser      - user name for access to the billing database
Строка 67: Строка 67:
  $billingDBName      - billing database name
  $billingDBName      - billing database name
  $billingCodePage    - billing database encoding
  $billingCodePage    - billing database encoding
 
  $confBillingVersion                - billing version [3|4|5|5.1] ''(default: 3)''
  $confBillingVersion                - billing version [3|4|5|5.1] ''(default: 3)''
  $confIsCustomerWoAgreenentToOld    - flag - move users without contract number to former users
  $confIsCustomerWoAgreenentToOld    - flag - move users without contract number to former users

Текущая версия от 14:30, 25 октября 2023

en | ru

This function is one of the possibilities
to update the activity date of an object

usm_hydra - module for organising the import of data from ACP's billing system Hydra into ERP UserSide

This module is a replacement for the deprecated us_hydra module - See: Migrating from us hydra to usm hydra

Module Language: PHP

Current version: See: Modules

Module Status: Paid

For more information and a list of imported data, see the page: Hydra

Information on installing the module

The usm_hydra.zip archive contains the files

usm_hydra.php
usm_hydra.conf.php-example

1. On any server (no difference - billing server, userside or third machine) allocate a separate (arbitrary) directory for the module and place these files in it

2. Allocate a separate directory for the module logs. Give write permissions to this directory.

3. Rename the example configuration file usm_hydra.conf.php-example to usm_hydra.conf.php and make the required changes (the list of parameters is given below) in it

4. Run the module manually several times (*) with the command

php usm_hydra.php

It should work without error and return the data:

usm_hydra
====================================
 Start module at 2015-11-22 17:32:03
Finish module at 2015-11-22 17:32:14
====================================

* - At the first run - many objects will be pre-created only. The more objects the module imports - the longer it will take. The second and subsequent runs will reconcile the changed data and only these will be updated. The second run will also take a long time, because after the first run the newly created objects do not contain any data. But the third and subsequent runs will be much faster.

5. Visually check the completeness of the imported data in ERP "UserSide"

6. When it becomes clear that the module works stably - add it to the system cron for periodic operation (specify the necessary paths)

*/10 * * * * php usm_hydra.php

You may need to install additional modules: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703

Parameters

The module is configured in the usm_hydra.conf.php file

You can also use the default parameters from the usm_billing module

$usersideUrl         - URL to the ERP "UserSide"
$usersideApiKey      - API-key of ERP "UserSide"
$billingId           - Billing number in ERP "UserSide" ("Settings - Billings")
$logPath             - Path for logging
$isSilence           - Silence Mode flag (hide the output of information messages from the module to the console)

$billingDBHost       - address of the billing server
$billingDBUser       - user name for access to the billing database
$billingDBPassword   - password for access to the billing database
$billingDBName       - billing database name
$billingCodePage     - billing database encoding

$confBillingVersion                - billing version [3|4|5|5.1] (default: 3)
$confIsCustomerWoAgreenentToOld    - flag - move users without contract number to former users
$confIsImportMacFromEpSessions     - flag - import MAC addresses from EP_SESSIONS (Custom Latera Function) table
$confAddressHierarchyTypeIdExpr    - import address hierarchy with specified types only
$confIsImportAddressWithPrefix     - flag - import address objects with prefixes
$confIsCustomImportCustomerState   - flag - special import of subscriber statuses (private solution)
$confIsSkipAddressAdditionalPrefix - flag - whether to import address object prefixes in object name 
$confImportTariffGoodId            - list of id types of tariff packages that will be imported
$confHierarchy                     - array with address hierarchy types
$confIsSkipEquipmentAddress        - flag - do not import equipment addresses
$confImportCustomerRealLogin       - import "User Real Login" into UserSide (you must specify the id of the additional field)
$confIsImportHierarchyPrefix       - flag - import prefixes in address hierarchy (suffixes are imported by default)
$confStateWithPositiveBalance      - user's state/status at positive balance ((balance + credit) >= 0) (1 - Pause, 2 - Active, 3 - Stop)
$confStateWithNegativeBalance      - user's state/status at negative balance ((balance + credit) < 0) (1 - Pause, 2 - Active, 3 - Stop)
$confUserExprString                - additional string with user import condition
$confImportCustomerPPPoELogin      - import "User PPPoE Login" into additional UserSide data (need to specify additional field id)
$confImportCustomerTaxNumber       - import user's tax number into UserSide (you need to specify additional field id) additional data
$confImportCustomerIdentityNumber  - import user's document number into UserSide (need to specify additional field id) additional data