Daily cycle closing calendar management strategy
To create a daily cycle closing calendar management strategy, run the Create program calendar strategy endpoint with the strategy field set to DAILY_CYCLE_CLOSING, and specify values for the following body parameters.
- Interval in days between cycles. Set this using the
every_x_daysfield. The default value is 1, which creates a one-day cycle. However, you can setevery_x_daysto any integer between 1 and 365. For example, setevery_x_daysto 365 to create a cycle that spans one year. - Number of days between the cycle closing date and the due date. Set this using the
days_between_cycle_closing_and_due_datefield.
After creating the management strategy, use the Update account calendar strategy endpoint to assign it to an account.
Example
On March 3, you create a new program calendar strategy with the following settings.
strategy=DAILY_CYCLE_CLOSINGevery_x_days= 5days_between_cycle_closing_and_due_date= 2
Now, suppose you wait until April 3 to attach the strategy to an account. The Pismo platform uses the following process to determine what to use for the first cycle closing date and due date for the account. (Use the table at the end to help you follow along.)
The Pismo platform starts calculating due dates on the day after the strategy is created. This is March 4, so the platform adds 5 to March 4 to get March 9 for the first possible cycle closing date. It adds 2 to March 9 to get March 11 for the first possible due date. However, these dates have already passed. (Remember, you didn't assign the strategy to the account until April 3.) The platform can't create a statement that's already closed, so these dates don't work.
Next, the platform adds 5 to March 9 to get March 14 for the next possible cycle closing date and adds 2 to that to get March 16 for the next possible due date. These dates are still in the past.
The platform keeps going like this until it get to a cycle closing date of April 3. This is the same day that you assigned the strategy to the account. The platform can't create a cycle and close it on the same day, so these dates also don't work.
Finally, the platform calculates a cycle closing date of April 8 and a due date of April 10. Both of these dates are after April 3, so they work. The platform starts generating statements for the account.
| Cycle closing date | Due date | Do these dates work? |
|---|---|---|
| March 9 | March 11 | No |
| March 14 | March 16 | No |
| March 19 | March 21 | No |
| March 24 | March 26 | No |
| March 29 | March 31 | No |
| April 3 | April 5 | No (closing must be after April 3) |
| April 8 | April 10 | Yes (first statement) |
| April 13 | April 15 | Yes (next statement) |
| April 18 | April 29 | Yes (and so on) |
| ... | ... | ... |
Updated 3 days ago