Orders

Orders

Order List

Order Add

🧾 Order Management – ASTPP

This document outlines the logic for Order Placement, Renewals, and Email Notifications in ASTPP. The behavior respects the customer's timezone and applies to Packages, Subscriptions, and DID orders.


🗂️ Order Add Interface

Field

Description

Field

Description

Category

Dropdown selection. Default: Package

Reseller

Displays a list of resellers.

Accounts

Displays a list of accounts.

Product

Lists all packages created by admin.

Payment Method

The method is selected as Account Method by default.

Name

The name of the selected package (non-editable).

Commission

The commission associated with the package (non-editable).

Billing Type

The billing type of the selected package (non-editable).

Setup Fee

Setup fee of the selected package.

Price

Recurring or one-time price of the package.

Email Notification

Checkbox. If enabled, email alerts will be sent to the customer.


📧 Email Notifications

Order Placement Notification

  • If the Email Notification checkbox is enabled:

    • A confirmation email is sent once the order is successfully placed.

  • If disabled:

    • No order confirmation email is sent.

🔁 Order Renewal Notification

  • A renewal reminder email is sent 1 day before the renewal date.

  • The notification is sent only once per renewal cycle.

    • E.g., if a monthly recurring product renews on the 15th, the email is sent on the 14th.

  • These emails are triggered by the Manage Services cron job.

  • Once the email is sent, the order’s renewal notification status is marked as “Sent” to avoid duplicate emails.


🕒 Timezone-Based Renewal Logic

ASTPP should manage all orders (Package, Subscription, DID) based on the customer’s timezone.

Midnight Execution

  • Renewal and termination should occur at 12:00 AM or 11:59 PM, according to the customer’s timezone.

  • The Manage Services cron job should only process the renewal after 12:00 AM of the calculated date.


📘 Use Case Scenarios

Case

Type

Order Date

Billing Days / Type

Renewal / Termination Date (customer timezone)

Notes

Case

Type

Order Date

Billing Days / Type

Renewal / Termination Date (customer timezone)

Notes

1

Monthly Product

10-Oct-2024 5:00 PM

Monthly

Renewal → 10-Nov-2024 at 12:00 AM

Standard monthly billing cycle

2

One-Time

10-Oct-2024 5:00 PM

2 Days

Termination → 11-Oct-2024 at 11:59 PM

One-time validity ends after 2 days

3

Recurring

10-Oct-2024 5:00 PM

15 Days

Renewal → 25-Oct-2024 at 12:00 AM

Recurs every 15 days

4A

One-Time (Long-Term)

10-Oct-2024 5:00 PM

0 Days (= 10 Years)

Termination → 10-Oct-2034 at 11:59 PM

Billing Days = 0 → treated as 10 years validity

4B

Recurring (Long-Term)

10-Oct-2024 5:00 PM

0 Days (= 10 Years)

Renewal → 10-Oct-2034 at 12:00 AM

Billing Days = 0 → renews every 10 years


Special Case – Sync with Customer Billing

For Packages or DIDs with “Sync with Customer Billing” enabled:

  • The Renewal Date is aligned with the customer’s end_invoice_date.

  • The end_invoice_date is also calculated based on the customer’s timezone.