2015-1Q: Triggered based interface for remote APIs
This new feature allows to set triggers on pre-defined events in SIMPLer system. For each enabled trigger (such as updating customer details) - once it happens an action or set of actions will be executed. These actions can for example notify remote API and submit modified customer account data to a remote system or notify remote systems on customer status changes. Following is a list of currently available triggers:
Customer Details Change - once this trigger is enabled - each time a customer record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated customer details to remote JSON API or to a log.
Customer Status Change - once this trigger is enabled - each time a status on customer record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated customer details to remote JSON API or to a log.
Product Change - once this trigger is enabled - each time a product record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated product details to remote JSON API or to a log.
Credit Card Change - once this trigger is enabled - each time a credit card record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated credit card details to remote JSON API or to a log.
EFT Change - once this trigger is enabled - each time a bank account (EFT) record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated bank account details to remote JSON API or to a log.
Invoice Change - once this trigger is enabled - each time an invoice record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated invoice details to remote JSON API or to a log.
Subscription Change - once this trigger is enabled - each time a subscription record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send updated subscription details to remote JSON API or to a log.
Customer Subscriptions - once this trigger is enabled - each time a subscription record is changed in the SIMPLer platform (regardless whether it has happened through GUI, SIMPLer API or from db console) appropiate 'endpoint' related action will be executed - these actions for example can send all customer subscriptions details to remote JSON API or to a log.
Customer SAND Notification - once this trigger is enabled - each time a SAND notification is set/cleared on a customer record appropiate 'endpoint' related action will be executed - these actions for example can send current SAND status details to remote JSON API or to a log.
Triggers can be enabled from "Setting->External API(triggers)" page.
Each particular trigger can be enabled/disabled from the 'External API (triggers)' page. Once enabled when a particular event happens (such as updating customer details) for each 'Trigger Endpoint Definition' an action will be executed. Operator can add as many trigger endpoints as they like. Currently we have following trigger endpoints available:
generic Filelog - on a trigger - set of details related to the trigger (such as customer record details for customer details update trigger) will be saved to a file specified in the Filename field. This log can be viewed from "View Log" button
generic JSON - on a trigger - set of details related to the trigger will be sent to a remote endpoint using JSON. Below find descriptions of each JSON interface attribute:
Base_URL - [optional] common part of each trigger endpoint URL addresses can be defined here
Customer_details_change_endopint - [optional] if defined - a JSON message on customer details change will be sent to specified URL. Note that if defined Base_URL will be added as a prefix.
Customer_status_change_endpoint - [optional] if defined - a JSON message on customer status change will be sent to specified URL. Note that if defined Base_URL will be added as a prefix.
Fail_Notification_Email - [optional] a notification email will be sent to an email address specified in this attribute if for whatever reason SIMPLer will fail to send a JSON message
Password - [mandatory] authentication password
Username - [mandatory] authentication username
Transaction_Attempts - [optional] this field defines how many times should SIMPLer try to re-send the JSON message to remote API if transaction was not succesfull
Example Trigger Response Structure:
Customer Details Change
Example:
$customer_details_change = {
'install_street2' => undef,
'town' => 'Pogwizdow',
'install_postcode' => undef,
'state' => 'Alaska',
'email' => 'maciej.gawlowski@gmail.com',
'communitycode' => undef,
'install_county' => undef,
'initial_contact_date' => '2012-05-26',
'macaddresses' => [
'00-20-D6-CC-D5-29',
'00:15:6D:93:47:6F',
'00-20-D6-DC-31-E8'
],
'installation_date' => '2012-05-27',
'customerstatus' => 'current',
'OPERATOR' => 'testss',
'name' => 'Maciej Gawlowski',
'macaddress' => '00-20-D6-CC-D5-29,00:15:6D:93:47:6F,00-20-D6-DC-31-E8',
'street2' => 'I tyle',
'customerid' => '27737',
'county' => 'Idaho',
'customer_name' => 'Maciej Gawlowski',
'ID' => '1',
'Triggers' => '',
'LABEL' => 'Generic Filelog',
'ipaddresses' => [
'192.168.106.94',
'10.32.124.25',
'192.168.106.179'
],
'start_date' => '2012-11-05',
'postcode' => '83501',
'NAME' => 'generic_filelog',
'nickname' => 'te18252',
'Filename' => 'logfile.log',
'LogType' => 'customer_details_change',
'phone' => '606473915',
'street1' => 'Cieszynska 1461',
'install_state' => undef,
'install_street1' => undef,
'action' => 'update',
'install_town' => undef,
'ipaddress' => '192.168.106.94,10.32.124.25,192.168.106.179'
};
Customer Status Change
Example:
$customer_status_change = {
'ID' => '1',
'Triggers' => '',
'status_assigned' => '',
'LABEL' => 'Generic Filelog',
'status' => 'current',
'status_reason' => '',
'status_notes' => '',
'isDeliquent' => 0,
'status_date' => '',
'NAME' => 'generic_filelog',
'nickname' => 'te18252',
'OPERATOR' => 'testss',
'Filename' => 'logfile.log',
'name' => 'Maciej Gawlowski',
'LogType' => 'customer_status_change',
'customerid' => '27737',
'action' => 'update'
};
Product Change
Example:
$product_change = {
'non_prorating' => '0',
'tax_mode' => 'fixed',
'eup_product_tied' => undef,
'formula' => undef,
'dynamic_product_tied' => undef,
'tax_zipcode' => undef,
'traffic_limit_exempted' => undef,
'traffic_limit' => '5',
'code' => 'BBGOLD',
'time_excluded' => '{}',
'OPERATOR' => 'testss',
'description' => 'Broadband Gold',
'tax_rate' => '10.900',
'tax_zone' => undef,
'tax_flat_rate' => undef,
'type' => undef,
'ID' => '1',
'free_service' => 'No',
'Triggers' => '',
'status' => undef,
'valid_from' => undef,
'LABEL' => 'Generic Filelog',
'eup_description' => undef,
'round' => 'aritmethic',
'product_type' => undef,
'eup_available' => '0',
'deffered' => '0',
'valid_to' => undef,
'NAME' => 'generic_filelog',
'Filename' => 'logfile.log',
'cycles' => undef,
'LogType' => 'product_change',
'tax_zone_group' => undef,
'action' => 'update',
'nominal' => undef,
'productprice' => '50.00000',
'productid' => '54'
};
Credit Card Change
Example:
$creditcard_change = {
'ID' => '1',
'cc_id' => '7441',
'Triggers' => '',
'LABEL' => 'Generic Filelog',
'cc_holder' => 'Maciej Gawłowski',
'failed_payment_counter' => '0',
'cc_address' => '{"Cieszyńska 146","",Pogwizdów,"",43-418,Alabama,Poland,Maciej,Gawłowski}',
'NAME' => 'generic_filelog',
'cc_last4' => '4321',
'autobilling' => '0',
'Filename' => 'logfile.log',
'OPERATOR' => 'testss',
'cc_preferred' => '1',
'LogType' => 'creditcard_change',
'cc_type' => 'other',
'cc_year' => '2019',
'cc_token_date' => undef,
'action' => 'update',
'customerid' => '27737',
'cc_token' => undef,
'cc_month' => '01'
};
EFT Change
Example:
$eft_change = {
'ID' => '1',
'eft_autopayment' => '0',
'eft_sepa_signaturedate' => '',
'Triggers' => '',
'LABEL' => 'Generic Filelog',
'eft_banksortcode' => '235162351w',
'eft_sepa_debtorremittancedata' => 'Remitance',
'eft_sepa_country' => 'ie',
'eft_sepa_bic' => '21433433w',
'eft_sepa_iban' => 'PL07105010831000002312394014',
'eft_sepa_sequencetype_original' => undef,
'eft_iban' => 'PL07105010831000002312394014',
'eft_preferred' => '0',
'eft_bankonlineref' => '3453245234523455w',
'NAME' => 'generic_filelog',
'eft_id' => '65',
'Filename' => 'logfile.log',
'OPERATOR' => 'testss',
'eft_last4' => undef,
'eft_bankaccounttype' => 'checking',
'LogType' => 'eft_change',
'eft_sepa_sequencetype' => 'FRST',
'eft_bankaccountnumber' => '898989898934',
'eft_sepa_debtorname' => '21433433w',
'customerid' => '27737',
'eft_bankaccountname' => 'w234234',
'action' => 'update',
'eft_bankdetailschanged' => undef,
'eft_cajamar_iban' => undef
};
Invoice Change
Example:
$invoice_change = {
'ID' => '1',
'eft_once_off' => undef,
'paymentstatus' => 'failed',
'Triggers' => '',
'LABEL' => 'Generic Filelog',
'invoiceid' => '171',
'automated' => '1',
'sageinvid' => '171',
'reference' => 'A76 [436]',
'billingperiod_startdate' => '2015-04-07',
'setup_rate' => undef,
'postmethod' => 'custom',
'NAME' => 'generic_filelog',
'Filename' => 'logfile.log',
'OPERATOR' => 'testss',
'posteddate' => '2015-04-07',
'eft_reference' => '8989898989',
'invoicedate' => '2015-04-07',
'LogType' => 'invoice_change',
'invoiceperiod' => '1',
'vat_rate' => '-1',
'amount' => '1488.30',
'filename' => 'te18252_2015-04-07_171_001.pdf',
'prorated' => undef,
'customerid' => '27737',
'action' => 'update',
'tax_flat_rate' => undef,
'paymentdate' => undef
};
Subscription Change
Example:
Customer Subscriptions
Example:
$customer_subscriptions = {
'operator' => 'testss',
'customerid' => '27882'
'customername' => 'SJS7175',
'customerinvoicingid' => 'SJS-7175',
'customernickname' => 'SJS7175',
'customerstatus' => 'current',
'subscription_total_amount' => '12276672158.60',
'campaign_subscription_total_amount' => '0.00',
'future_subscription_total_amount' => '0.00',
'future_campaign_subscriptions_total_amount' => '0.00',
'next_invoice_date' => '2014-09-27',
'next_invoice_isfirst' => '1',
'next_invoice_subscriptions' => '12276672158.60',
'next_invoice_total_amount' => '12276672158.60',
'setupfees_inctax' => '0.00',
'subscription_error' => '',
'subscriptions' => [
{
'PRODUCT_TAX_MODE' => 'fixed',
'CUSTOMER_SETUP_FEE' => undef,
'PRODUCT_ROUND' => 'aritmethic',
'QUANTITY' => 1,
'NOW' => '2015-04-10 01:05:41.644851-04',
'PREMIUM' => '0.000',
'SUBACCOUNT_DISPLAY' => '',
'DISCOUNT' => '0.000',
'TIME_EXCLUDED' => '{}',
'PERIOD' => undef,
'EFFECTIVE_PRICE' => '34567650.00000',
'PRODUCT_FORMULA' => '%%IMPORTVALUE%%',
'FREQUENCY' => '1',
'EFFECTIVE_DESCRIPTION' => 'Broadband Gold',
'CUSTOMER_STATUS' => 'current',
'TAX_MODE' => '',
'TOTAL' => '38335523.85',
'SUBACCOUNT_CUSTOMERID' => '',
'PRODUCT_TAFFIC_ALLOWANCE_EXEMPTED' => '',
'FORMULA_CHANGED' => 0,
'CUSTOMER_STATUS_LABEL' => 'current',
'CUSTOMER_VAT_EXEMPT' => '{No}',
'EFFECTIVE_TAX_MODE' => 'fixed',
'DEFAULT_REFERRAL_SYSTEM' => '0',
'EFFECTIVE_SUBACCOUNT_CUSTOMERID' => '',
'CUSTOMERID' => '27882',
'EFFECTIVE_TAX_ZONE_DISPLAY' => undef,
'OVERAGE_ID' => undef,
'NOT_USED_UP' => '1',
'PREMIUM_EXISTS' => 0,
'SUBACCOUNT_STATUS' => '',
'PRODUCTID' => '54',
'EFFECTIVE_TAX_MODE_DISPLAY' => 'Fixed',
'NOMINAL_NEGATIVE' => '',
'ROUND' => 'aritmethic',
'CURRENT_FROM' => '1',
'TAX_ZONE' => '',
'PRODUCT_NON_PRORATING' => '0',
'TAX_MODE_DISPLAY' => 'Default',
'INVOICE_FROM_MASTER' => undef,
'NOMINAL' => '',
'ON_NEXT_INVOICE_FROM' => '1',
'PRODUCT_TAX_ZONE' => '',
'EFFECTIVE_FORMULA' => '',
'CYCLES_LEFT' => '',
'VALID_TO' => '',
'EFFECTIVE_TAX_RATE' => '10.900',
'ON_NEXT_INVOICE_TO' => '1',
'PRODUCT_TAFFIC_ALLOWANCE' => '5',
'PRICE' => '34567650.00000',
'DISCOUNT_EXISTS' => 0,
'TAX_MODE_MULTI' => 0,
'CURRENT_TO' => '1',
'CUSTOMER_STATUS_COLOR' => '#339933',
'FREE_SERVICE' => 'Yes',
'PRICE_CHANGED' => 1,
'DESCRIPTION_CHANGED' => 0,
'date_VALID_FROM' => '',
'OVERAGE_FLAG' => undef,
'PRODUCT_CODE' => 'BBGOLD',
'PRODUCT_PRICE' => '50.00000',
'CUSTOMER_DISPLAY' => 'SJS7175 (SJS-7175)',
'PRIORITY' => '5',
'DESCRIPTION' => '',
'VALID_FROM' => '',
'ID' => '551',
'DYNAMIC_TIED' => undef,
'EFFECTIVE_TAX_ZONE' => '',
'CUSTOMER_POST_CODE' => '',
'TAX_EXEMPTION' => 'No',
'PRODUCT_DESCRIPTION' => 'Broadband Gold',
'PRODUCT_TAX_RATE' => '10.900',
'FREQUENCY_MULTIPLER' => '',
'EFFECTIVE_TAX_MODE_MULTI' => 0,
'CUSTOMER_TYPE' => 'customer home',
'PRORATED' => undef,
'PRODUCT_TYPE' => '',
'IMPORT_POSITION_ID' => '',
'date_VALID_TO' => '',
'FORMULA' => undef,
'TAX_EXEMPTION_CODE' => '',
'EFFECTIVE_TAX_RATES' => [],
'VAT_EXEMPTION_FLAG' => 0,
'HTML' => '',
'TAX_RATES' => [],
'CUSTOMER_INSTALLATION_POST_CODE' => '',
'TAX_RATE_DEFAULT' => '10.900',
'DYNAMIC_DESCRIPTION' => '',
'TYPE' => '',
'CYCLES' => undef,
'OVERAGE' => undef,
'USAGE' => undef,
'TAX_ZONE_DISPLAY' => undef,
'TAX_RATE' => '10.900'
},
{
'PRODUCT_TAX_MODE' => 'fixed',
'CUSTOMER_SETUP_FEE' => undef,
'PRODUCT_ROUND' => 'aritmethic',
'QUANTITY' => 1,
'NOW' => '2015-04-10 01:05:41.644851-04',
'PREMIUM' => '0.000',
'SUBACCOUNT_DISPLAY' => '',
'DISCOUNT' => '0.000',
'TIME_EXCLUDED' => '{}',
'PERIOD' => undef,
'EFFECTIVE_PRICE' => '50.00000',
'PRODUCT_FORMULA' => '%%IMPORTVALUE%%',
'FREQUENCY' => '1',
'EFFECTIVE_DESCRIPTION' => 'Broadband Gold',
'CUSTOMER_STATUS' => 'current',
'TAX_MODE' => '',
'TOTAL' => '55.45',
'SUBACCOUNT_CUSTOMERID' => '',
'PRODUCT_TAFFIC_ALLOWANCE_EXEMPTED' => '',
'FORMULA_CHANGED' => 0,
'CUSTOMER_STATUS_LABEL' => 'current',
'CUSTOMER_VAT_EXEMPT' => '{No}',
'EFFECTIVE_TAX_MODE' => 'fixed',
'DEFAULT_REFERRAL_SYSTEM' => '0',
'EFFECTIVE_SUBACCOUNT_CUSTOMERID' => '',
'CUSTOMERID' => '27882',
'EFFECTIVE_TAX_ZONE_DISPLAY' => undef,
'OVERAGE_ID' => undef,
'NOT_USED_UP' => '1',
'PREMIUM_EXISTS' => 0,
'SUBACCOUNT_STATUS' => '',
'PRODUCTID' => '54',
'EFFECTIVE_TAX_MODE_DISPLAY' => 'Fixed',
'NOMINAL_NEGATIVE' => '',
'ROUND' => 'aritmethic',
'CURRENT_FROM' => '1',
'TAX_ZONE' => '',
'PRODUCT_NON_PRORATING' => '0',
'TAX_MODE_DISPLAY' => 'Default',
'INVOICE_FROM_MASTER' => undef,
'NOMINAL' => '',
'ON_NEXT_INVOICE_FROM' => '1',
'PRODUCT_TAX_ZONE' => '',
'EFFECTIVE_FORMULA' => '',
'CYCLES_LEFT' => '',
'VALID_TO' => '',
'EFFECTIVE_TAX_RATE' => '10.900',
'ON_NEXT_INVOICE_TO' => '1',
'PRODUCT_TAFFIC_ALLOWANCE' => '5',
'PRICE' => undef,
'DISCOUNT_EXISTS' => 0,
'TAX_MODE_MULTI' => 0,
'CURRENT_TO' => '1',
'CUSTOMER_STATUS_COLOR' => '#339933',
'FREE_SERVICE' => 'Yes',
'PRICE_CHANGED' => 0,
'DESCRIPTION_CHANGED' => 0,
'date_VALID_FROM' => '',
'OVERAGE_FLAG' => undef,
'PRODUCT_CODE' => 'BBGOLD',
'PRODUCT_PRICE' => '50.00000',
'CUSTOMER_DISPLAY' => 'SJS7175 (SJS-7175)',
'PRIORITY' => '5',
'DESCRIPTION' => '',
'VALID_FROM' => '',
'ID' => '553',
'DYNAMIC_TIED' => undef,
'EFFECTIVE_TAX_ZONE' => '',
'CUSTOMER_POST_CODE' => '',
'TAX_EXEMPTION' => 'No',
'PRODUCT_DESCRIPTION' => 'Broadband Gold',
'PRODUCT_TAX_RATE' => '10.900',
'FREQUENCY_MULTIPLER' => '',
'EFFECTIVE_TAX_MODE_MULTI' => 0,
'CUSTOMER_TYPE' => 'customer home',
'PRORATED' => undef,
'PRODUCT_TYPE' => '',
'IMPORT_POSITION_ID' => '',
'date_VALID_TO' => '',
'FORMULA' => undef,
'TAX_EXEMPTION_CODE' => '',
'EFFECTIVE_TAX_RATES' => [],
'VAT_EXEMPTION_FLAG' => 0,
'HTML' => '',
'TAX_RATES' => [],
'CUSTOMER_INSTALLATION_POST_CODE' => '',
'TAX_RATE_DEFAULT' => '10.900',
'DYNAMIC_DESCRIPTION' => '',
'TYPE' => '',
'CYCLES' => undef,
'OVERAGE' => undef,
'USAGE' => undef,
'TAX_ZONE_DISPLAY' => undef,
'TAX_RATE' => '10.900'
},
{
'PRODUCT_TAX_MODE' => 'fixed',
'CUSTOMER_SETUP_FEE' => undef,
'PRODUCT_ROUND' => 'aritmethic',
'QUANTITY' => '1',
'PREMIUM' => '0.000',
'NOW' => '2015-04-10 01:05:41.644851-04',
'DISCOUNT' => '0.000',
'SUBACCOUNT_DISPLAY' => '',
'TIME_EXCLUDED' => '{}',
'PERIOD' => undef,
'FREQUENCY' => '1',
'PRODUCT_FORMULA' => '%%IMPORTVALUE%%',
'EFFECTIVE_PRICE' => '10000000819.67210',
'EFFECTIVE_DESCRIPTION' => 'Extensive product',
'CUSTOMER_STATUS' => 'current',
'TAX_MODE' => '',
'TOTAL' => '12200001000.00',
'SUBACCOUNT_CUSTOMERID' => '',
'PRODUCT_TAFFIC_ALLOWANCE_EXEMPTED' => '',
'FORMULA_CHANGED' => 0,
'CUSTOMER_STATUS_LABEL' => 'current',
'CUSTOMER_VAT_EXEMPT' => '{No}',
'EFFECTIVE_TAX_MODE' => 'fixed',
'DEFAULT_REFERRAL_SYSTEM' => '0',
'EFFECTIVE_SUBACCOUNT_CUSTOMERID' => '',
'CUSTOMERID' => '27882',
'NOT_USED_UP' => '1',
'OVERAGE_ID' => undef,
'EFFECTIVE_TAX_ZONE_DISPLAY' => undef,
'PREMIUM_EXISTS' => 0,
'SUBACCOUNT_STATUS' => '',
'PRODUCTID' => '60',
'EFFECTIVE_TAX_MODE_DISPLAY' => 'Fixed',
'NOMINAL_NEGATIVE' => '0004734',
'CURRENT_FROM' => '1',
'ROUND' => 'aritmethic',
'TAX_ZONE' => '',
'PRODUCT_NON_PRORATING' => '0',
'TAX_MODE_DISPLAY' => 'Default',
'INVOICE_FROM_MASTER' => undef,
'NOMINAL' => '1234',
'ON_NEXT_INVOICE_FROM' => '1',
'PRODUCT_TAX_ZONE' => '',
'CYCLES_LEFT' => '',
'EFFECTIVE_FORMULA' => '',
'EFFECTIVE_TAX_RATE' => '22.000',
'VALID_TO' => '',
'PRODUCT_TAFFIC_ALLOWANCE' => '',
'ON_NEXT_INVOICE_TO' => '1',
'PRICE' => undef,
'TAX_MODE_MULTI' => 0,
'DISCOUNT_EXISTS' => 0,
'CURRENT_TO' => '1',
'DESCRIPTION_CHANGED' => 0,
'PRICE_CHANGED' => 0,
'FREE_SERVICE' => 'Yes',
'CUSTOMER_STATUS_COLOR' => '#339933',
'PRODUCT_CODE' => '88MT_P2',
'OVERAGE_FLAG' => undef,
'date_VALID_FROM' => '',
'PRODUCT_PRICE' => '10000000819.67210',
'CUSTOMER_DISPLAY' => 'SJS7175 (SJS-7175)',
'PRIORITY' => '5',
'DESCRIPTION' => '',
'VALID_FROM' => '',
'ID' => '555',
'DYNAMIC_TIED' => undef,
'EFFECTIVE_TAX_ZONE' => '',
'CUSTOMER_POST_CODE' => '',
'TAX_EXEMPTION' => 'No',
'PRODUCT_DESCRIPTION' => 'Extensive product',
'PRODUCT_TAX_RATE' => '22.000',
'FREQUENCY_MULTIPLER' => '',
'EFFECTIVE_TAX_MODE_MULTI' => 0,
'CUSTOMER_TYPE' => 'customer home',
'PRORATED' => undef,
'PRODUCT_TYPE' => '',
'IMPORT_POSITION_ID' => '',
'date_VALID_TO' => '',
'FORMULA' => undef,
'TAX_EXEMPTION_CODE' => '',
'EFFECTIVE_TAX_RATES' => [],
'VAT_EXEMPTION_FLAG' => 0,
'HTML' => '',
'TAX_RATES' => [],
'CUSTOMER_INSTALLATION_POST_CODE' => '',
'TAX_RATE_DEFAULT' => '22.000',
'DYNAMIC_DESCRIPTION' => '',
'TYPE' => '',
'CYCLES' => undef,
'OVERAGE' => undef,
'USAGE' => undef,
'TAX_ZONE_DISPLAY' => undef,
'TAX_RATE' => '22.000'
},
{
'CUSTOMER_SETUP_FEE' => undef,
'PRODUCT_TAX_MODE' => '',
'QUANTITY' => 1,
'PRODUCT_ROUND' => 'aritmethic',
'NOW' => '2015-04-10 01:05:41.644851-04',
'PREMIUM' => '0.000',
'SUBACCOUNT_DISPLAY' => '',
'DISCOUNT' => '0.000',
'TIME_EXCLUDED' => '{}',
'PERIOD' => undef,
'EFFECTIVE_PRICE' => '10.00000',
'PRODUCT_FORMULA' => '%%CUSTOMER_PRODUCT_SUM%%',
'FREQUENCY' => '1',
'EFFECTIVE_DESCRIPTION' => 'Dynamic Product',
'CUSTOMER_STATUS' => 'current',
'TAX_MODE' => '',
'TOTAL' => '38335579.30',
'PRODUCT_TAFFIC_ALLOWANCE_EXEMPTED' => '',
'SUBACCOUNT_CUSTOMERID' => '',
'FORMULA_CHANGED' => 0,
'CUSTOMER_VAT_EXEMPT' => '{No}',
'CUSTOMER_STATUS_LABEL' => 'current',
'EFFECTIVE_TAX_MODE' => '',
'DEFAULT_REFERRAL_SYSTEM' => '0',
'EFFECTIVE_SUBACCOUNT_CUSTOMERID' => '',
'CUSTOMERID' => '27882',
'EFFECTIVE_TAX_ZONE_DISPLAY' => undef,
'OVERAGE_ID' => undef,
'NOT_USED_UP' => '1',
'PREMIUM_EXISTS' => 0,
'SUBACCOUNT_STATUS' => '',
'PRODUCTID' => '68',
'EFFECTIVE_TAX_MODE_DISPLAY' => 'Default',
'NOMINAL_NEGATIVE' => '',
'ROUND' => 'aritmethic',
'CURRENT_FROM' => '1',
'TAX_ZONE' => '',
'PRODUCT_NON_PRORATING' => '0',
'TAX_MODE_DISPLAY' => 'Default',
'ON_NEXT_INVOICE_FROM' => '1',
'NOMINAL' => '',
'INVOICE_FROM_MASTER' => undef,
'PRODUCT_TAX_ZONE' => '',
'EFFECTIVE_FORMULA' => '',
'CYCLES_LEFT' => '',
'VALID_TO' => '',
'EFFECTIVE_TAX_RATE' => '14.000',
'ON_NEXT_INVOICE_TO' => '1',
'PRODUCT_TAFFIC_ALLOWANCE' => '',
'PRICE' => undef,
'DISCOUNT_EXISTS' => 0,
'TAX_MODE_MULTI' => 0,
'CURRENT_TO' => '1',
'CUSTOMER_STATUS_COLOR' => '#339933',
'FREE_SERVICE' => 'Yes',
'PRICE_CHANGED' => 0,
'DESCRIPTION_CHANGED' => 0,
'date_VALID_FROM' => '',
'OVERAGE_FLAG' => undef,
'PRODUCT_CODE' => 'dynamicp1',
'PRODUCT_PRICE' => '10.00000',
'CUSTOMER_DISPLAY' => 'SJS7175 (SJS-7175)',
'PRIORITY' => '5',
'DESCRIPTION' => '',
'VALID_FROM' => '',
'ID' => '554',
'EFFECTIVE_TAX_ZONE' => '',
'DYNAMIC_TIED' => '54,55',
'CUSTOMER_POST_CODE' => '',
'PRODUCT_TAX_RATE' => '',
'PRODUCT_DESCRIPTION' => 'Dynamic Product',
'TAX_EXEMPTION' => 'No',
'FREQUENCY_MULTIPLER' => '',
'EFFECTIVE_TAX_MODE_MULTI' => 0,
'PRODUCT_TYPE' => 'Dynamic',
'PRORATED' => undef,
'CUSTOMER_TYPE' => 'customer home',
'FORMULA' => undef,
'date_VALID_TO' => '',
'IMPORT_POSITION_ID' => '',
'TAX_EXEMPTION_CODE' => '',
'EFFECTIVE_TAX_RATES' => [],
'HTML' => '',
'VAT_EXEMPTION_FLAG' => 0,
'TAX_RATES' => [],
'TAX_RATE_DEFAULT' => '14.000',
'CUSTOMER_INSTALLATION_POST_CODE' => '',
'DYNAMIC_DESCRIPTION' => '',
'CYCLES' => undef,
'TYPE' => '',
'OVERAGE' => undef,
'USAGE' => undef,
'TAX_ZONE_DISPLAY' => undef,
'TAX_RATE' => '14.000'
}
],
};
Customer SAND Notification - Key things to note in the example below are that it contains attributes that cover:
trigger details (LogType, NAME, LABEL, Triggers, Filename, ID, OPERATOR) - these attributes can be ignored in general
Customer Account base details (customerid, customername, customerstatus, customernickname) - this set of attributes provide base details for account for which trigger has been sent
SAND status:
status - final SAND status an account is on it can be one of following: clear, billing_issue, email_1, email_2, email_3, overage, throttling, disconnection. These statuses correspond to SAND settings.
type - it can either be:
invoice - when invoice due threshold has been hit
lodgement - when lodgement processing error threshold has been hit
traffic - when cusotmer went over his monthly/weekly CAP
condition - gives details on condition/threshold that has been breached
details - provide further details related to the threshold breached
specific SAND sections status - (traffic, invoice and lodgement trees will cover each particular status)
Example:
$customer_sand_notification = {
'ID' => '1',
'OPERATOR' => 'testss',
'LogType' => 'customer_sand_notification',
'NAME' => 'generic_filelog',
'LABEL' => 'Generic Filelog',
'Triggers' => '',
'Filename' => 'logfile.log',
'customerid' => '27737',
'customername' => 'Maciej Gawlowski',
'customerstatus' => 'installed',
'customernickname' => 'te18252',
'status' => 'disconnection',
'type' => 'lodgement',
'condition' => '10 days',
'details' => {
'171' => {
'faildate' => '2015-04-10',
'amount' => '1488.30',
'customerid' => '27737',
'paymentdate' => '2015-04-07',
'sageinvoiceid' => '171'
}
},
'traffic' => {
'status' => 'disconnection',
'condition' => '101 %',
'details' => {
'weekdown' => 0,
'captotal' => 0,
'w1up' => 0,
'm1down' => 0,
'd2down' => 0,
'm1up' => 0,
'd1down' => 0,
'w1down' => 0,
'capup' => 0,
'capdown' => 0,
'blackout' => 0,
'd1up' => 0,
'd2up' => 0,
'weekup' => 0
},
},
'lodgement' => {
'status' => 'disconnection',
'condition' => '10 days',
'details' => {
'171' => {
'faildate' => '2015-04-10',
'amount' => '1488.30',
'customerid' => '27737',
'paymentdate' => '2015-04-07',
'sageinvoiceid' => '171'
}
},
},
'invoice' => {
'status' => 'disconnection',
'condition' => '10 days',
'details' => {
'95' => {
'invoiceno' => '95',
'amountcredited' => 0,
'amount' => '410.00',
'balance' => 410,
'customerid' => '27737',
'age' => '1 year 11 mons 5 days',
'amountpaid' => 0
},
'111' => {
'invoiceno' => '111',
'amountcredited' => 0,
'amount' => '810.00',
'balance' => 810,
'customerid' => '27737',
'age' => '1 year 4 mons 5 days',
'amountpaid' => 0
},
},
},
};
Azotel | River House | Blackpool Park | Cork | Ireland
US +1-312-239-0680 | IE +353-21-234-8100 | UK +44-207-193-4170 | SA +27-11-083-6900