DELAYED PURCHASE

SendSafe has the ability to managed delay purchases. The purchase can be delayed a configurable amount of time and can be set to a configurable amount.


OPERATION

Delayed purchases are special type of subscription and use some of the subscription logic. There are two parts to a delayed purchase: (a) The trigger items and (b) The delayed purchase item. The trigger item setups up the delayed purchase. The delayed purchase is the second (or child) order that is process later.

A delayed purchase is setup as part of the purchase of a trigger item. If any item is configured to trigger a delayed purchase then in ADDITION to the purchase of this item (which can be zero cost), a delayed purchase will occur sometime later.

The delayed purchase can be for any amount from zero and up. The purchase amount can be the priceEa in the item OR it can be configured at the time that the trigger item is purchased by setting that value into OrderLineItem.ItemParameter.

A delayed purchase item can be any item in the DB including a subscription item (except FFPs). So a trigger item and initiate the delayed purchase of a subscription!


CONFIGURATION A TRIGGER ITEM

  1. Create an item in the DB
  2. Set the itemsext.SubscriptionType = 10001 (this is the special trigger job type)
  3. Set the itemsext.SubscriptionForcedOrderSKU to the SKU of the item which will be delayed purchased.

Additionally, at the add-to-cart stage, a trigger item is setup with more information that controls the delayed purchase:


CONFIGURATION IN ROBOT

In the global storefront file storefront config file:

Keyword Description
SUBSCRIPTIONS ENABLED = YES Enabled and disables activating delayed orders and subscription orders as they come in.

 


Activation

Delayed item activation occurs when the trigger order is processed by activateDelayedOrderSubscriptionsInOrder(). Acitivation does two things:

  1. Creates an order to be completed later (the delayed purchase).
  2. Queues a job (#45) in the jobqueue to be run at the time of the delayed purchase.

Rules:


TRIGGER ORDER JOB 20

This job will run once at the time designated by NextOrderDate. This job creates a trigger file which intiated the processing of an order which was created outside of this function.



Parameter value
param1

filename and path of the trigger file: x:\input\tttttttt.rrrrrrr.ASPSRC.EMSG

tttttttt = the transactionid of the order which will be processed.
tttttttt = GUID number created by the system.

param2 The transactionid of a prior order from which credit card info will be used (QuickBuy)
param3 n/a

Notes: