Bulk upload and activation dates
Bulk upload lets you change hundreds of objects with one file instead of one form at a time. You download the current list, edit it in a spreadsheet, mark every row with an action and upload the file back. For rates and routes the same file also carries activation and expiration dates, so you can load next month’s prices today and let the switch change them at midnight.
How it works
Section titled “How it works”- Download. Download on a list screen exports the rows that match the current filter as CSV or Excel, depending on the download format of your web user. The first column is
Action, the secondId, followed by the fields of the object. - Edit. Put an action code in the
Actioncolumn of every row you want to change. Rows with an emptyActionare ignored, so you can leave the rest of the file untouched. New rows go below the existing ones with an emptyId; the switch assigns it. - Upload. Upload takes a
.csvor.xlsxfile. On the rates and routes screens it first opens Map CSV Columns, where you match the columns of any price list to the fields and pick a default action. See Rates and Termination routes. - Apply. Each row is validated and applied on its own. Rows that pass are saved; rows that fail are returned to you with an error message. Rates and routes are processed by a background job that locks the tariff or termination route until it finishes, then shows Get report. for the failed rows. Other screens answer at once with the counts of added, updated and deleted rows, or with a file of the failed rows.
- Fix and repeat. Correct the failed rows in your file, not in the error report, and upload them again.
Action codes
Section titled “Action codes”| Code | Name | What it does |
|---|---|---|
A |
Add | Creates a new object from the row. The Id column is ignored |
U |
Update | Changes the object with the given Id. Every column of the row is written, so keep the values you do not want to change |
D |
Delete | Deletes the object with the given Id, whatever its dates |
S |
Update by prefix | Like U, but finds the rate or route by Prefix instead of Id: the one that is active now |
AS |
Add or update | Runs S; if no active rate or route has that prefix, runs A. SA is the same |
Which codes a screen accepts is shown in the header of its Action column:
| Screen | Actions |
|---|---|
| Rates of a tariff, Routes of a termination route, DIDs, Destinations | A, U, S, AS, D |
| Accounts, Authentication Rules, Vouchers | A, U, D |
| Incoming Routing | U |
For A, S and AS on rates and routes, the Prefix cell may hold several prefixes separated by commas. The row is applied to each of them.
Activation and expiration dates
Section titled “Activation and expiration dates”Every rate and every route has an Activation Date and an Expiration Date. At any moment only the rate that is active, activated in the past and not yet expired, is used for a prefix. An empty expiration date means never.
Acloses the old price. When you add a rate for a prefix that already has an open-ended rate activated earlier, the old rate gets the new activation date as its expiration date. The old and the new price follow each other without a gap, and the old one stays in the list as Discontinued.- Dates cannot be in the past. A new rate needs an activation date of
nowor later, and no expiration date may lie in the past. - Active rates keep their activation date.
UandSchange the activation date only of a rate that is not active yet. For a rate that is already active they can change the prices and set a future expiration date. - Discontinued rates are read-only. A rate whose expiration date has passed cannot be updated.
- Periods must not overlap. Two rates for the same prefix cannot be active at the same time; the second one fails with
Another Rate with conflicting "Prefix" or "Activation/Expiration Date" already exists.
The same rules apply to the routes of a termination route. Routing group entries have their own Activation Date and Expiration Date as well; see Routing.
Key terms
Section titled “Key terms”- Rate — the price for calls to one destination prefix within a tariff, with intervals, connect fee and effective dates.
- Termination route — a vendor’s price list of prefixes used to route calls to that vendor; stored as a destination set.
- Prefix — the leading digits of a dialled number that select a rate or a route, e.g.
4420. - CDR — call detail record: one row per call with time, duration, destination, cost and disconnect cause.
Common scenarios
Section titled “Common scenarios”A vendor sends next month’s price list
Section titled “A vendor sends next month’s price list”Upload it with action A and an Activation Date of the first day of the month at 00:00:00. Until then the current prices stay active; at midnight the new ones take over and the old ones expire. Every CDR keeps the price that was active when the call was made, so the CDRs always match the rate history.
You fixed a typo in today’s prices
Section titled “You fixed a typo in today’s prices”Use S (or U with the Id) to change the price of the active rate in place. Calls that were rated before the fix keep the wrong price in their CDRs, because U and S overwrite the rate instead of adding a new one. Recalculate those calls if needed; see Recalculate CDRs after a rate correction.
Prefixes must stop working on a fixed date
Section titled “Prefixes must stop working on a fixed date”Set the Expiration Date of their rates with U or S. From that moment the prefixes have no active rate and calls to them are rejected with No Rate Found. Use D only for rates that never carried traffic.