Prices by e-mail

Description

This feature allows to automate the process of adding changes of billing parameters, which come from partners by e-mail.
Big companies-partners can send lots of changes of billing parameters, and importing then manually may require lots of man-hours.
This feature does this job automatically.
At the same time Smartswitch supports the same file formats that are supported in File import in web-interface.
After file has been imported, Smartswitch automatically sends report with import errors and report with changes done.

Theory of operation

Handling of incoming mail.

To fulfill this task there is a dedicated background application - maild.
This application downloads e-mails from mailboxes, which are configured in Mail accounts.
Mail account should have tab Incoming completely filled and should have filled tab, which corresponds to chosen protocol of downloading incoming messages.

Attention! After downloading no copy is left on mail server!

All downloaded messages are seen in Mail detail report
After downloading the message, application finds which Company has sender e-mail address configured in tab Prices by-email.
After finding such a company, application uses Prices by e-mail class, which is configured in that tab.

From Prices by e-mail class application uses billing pack codes import template to determine the format of imported file.
using this format, application imports billing information from all attachments from e-mail in outgoing Billing pack, which is configured on Company.
When importing, the new data is inserted in Billing pack destination codes, each line from attachment is imported as a separate change in Billing pack destination codes, therefore you can find at any time when and which change has been done, using Billing pack code changes report.

After import is finished, in Mail detail report in Details you should see result as Imported.

Import errors

All import errors are placed into file ${the_name_of_original_attachment}_error_report.${extension_of_original_attachment}.
This file contains table in format: |line number|Error|.

Outgoing mail generation.

After import is done, application produces outgoing mail, using Mail template, which is configured in field import error mail template (if there were any) or import success mail template (if there were no errors)
In this mail files with errors are attached (if any) and file changes_report.${extension_of_original_attachment}, which contains table with changes done in format BEFORE -> AFTER.
Then mail is sent to sender's address.
In case if in Company's settings there is a flag present send copy to user, the mail copy is sent to user to whom the company entry belongs (see Role-based access).

Configuring prices by e-mail

Русский перевод

Also available in: PDF HTML TXT