54
1. Subscription Fulfillment and Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Automatic Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1.1 Delivery Frequencies and Interval Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.2 Subscription Grouping and Partial Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Manual Ordering and Retrying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Subscription Expiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1 All Subscriptions Failed When One Product is Out of Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 Dealing with Failed Orders / Restarting Failed Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.3 Diagnosing Failed Subscription: Shipping method is not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Magento 2 - Required "client_secret" key is not supplied in config... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5 Quantity on product pages defaults to 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6 Subscriptions not consolidating into a single order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7 Troubleshooting "Failed to GET Subscription!" error message on My Subscriptions page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.8 Troubleshooting "Failed to verify store code: default" error in Subscribe Pro platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.9 Troubleshooting Magento SOAP API Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3. Install Subscribe Pro for Magento 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1 Configuring Subscribe Pro API Credentials for Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 Set up API Credentials for Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.1 Configuring Shipping for Recurring Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.1.1 Shipping Handling Mode: Use Subscribe Pro Shipping Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.1.2 Shipping Handling Mode: Always Use Default Shipping Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1.3 Shipping Handling Mode: Always Use Method from Subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1.4 Shipping Handling Mode: Try Method from Subscription First, Then Try Default Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.1.5 Shipping Handling Mode: Advanced Shipping Rules (Configured by Subscribe Pro Support) . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Multi-Store / Multi-Website Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3 Product Setup and Syncing - Magento > Subscribe Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.1 Setup Default Product Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.2 Setup Products Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3.3 Bulk Product Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.3.4 How to Get Products Setup for Subscription in Bulk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.4 Using Store-Locale Mapping with Subscribe Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5. Magento 2 Extension - Documentation and Developer's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.1 Enabling Logging for the Subscribe Pro extension for Magento 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.2 Events Dispatched by the Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2.1 'subscribe_pro_before_create_subscription_from_quote_item' Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2.2 'subscribe_pro_after_create_subscription_from_quote_item' Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.3 Magento 2 Subscribe Pro Vault Payment Method Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.4 Prevent redirection after customer login for M2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.5 Set up Webhooks to sync cards being added, updated, and redacted in the Subscribe Pro Platform . . . . . . . . . . . . . . . . . . . . . . . 47 5.6 Using ShipperHQ for Dynamic Shipping Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1. Subscription Fulfillment and Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1 Automatic Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.1.1 Delivery Frequencies and Interval Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.2 Subscription Grouping and Partial Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2 Manual Ordering and Retrying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3 Subscription Expiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.1 All Subscriptions Failed When One Product is Out of Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2 Dealing with Failed Orders / Restarting Failed Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.3 Diagnosing Failed Subscription: Shipping method is not available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 Magento 2 - Required "client_secret" key is not supplied in config... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.5 Quantity on product pages defaults to 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.6 Subscriptions not consolidating into a single order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.7 Troubleshooting "Failed to GET Subscription!" error message on My Subscriptions page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.8 Troubleshooting "Failed to verify store code: default" error in Subscribe Pro platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.9 Troubleshooting Magento SOAP API Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3. Install Subscribe Pro for Magento 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.1 Configuring Subscribe Pro API Credentials for Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.2 Set up API Credentials for Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.1 Configuring Shipping for Recurring Orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4.1.1 Shipping Handling Mode: Use Subscribe Pro Shipping Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.1.2 Shipping Handling Mode: Always Use Default Shipping Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.1.3 Shipping Handling Mode: Always Use Method from Subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.1.4 Shipping Handling Mode: Try Method from Subscription First, Then Try Default Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.1.5 Shipping Handling Mode: Advanced Shipping Rules (Configured by Subscribe Pro Support) . . . . . . . . . . . . . . . . . . . . . . . . 33

4.2 Multi-Store / Multi-Website Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.3 Product Setup and Syncing - Magento > Subscribe Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.3.1 Setup Default Product Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.3.2 Setup Products Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.3.3 Bulk Product Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.3.4 How to Get Products Setup for Subscription in Bulk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

4.4 Using Store-Locale Mapping with Subscribe Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395. Magento 2 Extension - Documentation and Developer's Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.1 Enabling Logging for the Subscribe Pro extension for Magento 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445.2 Events Dispatched by the Magento 2 Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.2.1 'subscribe_pro_before_create_subscription_from_quote_item' Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.2.2 'subscribe_pro_after_create_subscription_from_quote_item' Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.3 Magento 2 Subscribe Pro Vault Payment Method Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465.4 Prevent redirection after customer login for M2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475.5 Set up Webhooks to sync cards being added, updated, and redacted in the Subscribe Pro Platform . . . . . . . . . . . . . . . . . . . . . . . 475.6 Using ShipperHQ for Dynamic Shipping Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Page 2: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Subscription Fulfillment and OrderingSubscribe Pro includes the ability to automatically generate regular orders (sometimes called re-orders) for your subscriptions.  This includes acomprehensive system for scheduling the order fulfillment and for automatically retrying failed orders.  

Subscribe Pro's automatic fulfillment process includes transactional emails to notify your customers of an upcoming order.  Subscribe Pro alsoincludes transactional emails to notify your customers in the event that one of their orders fails.

The Subscribe Pro management UI provides the ability for you manage and override the automatic ordering process.  In addition, Subscribe Proprovides the ability for you to manually generate an order at any time.

 

Learn More About Subscription Fulfillment

Automatic Ordering

Manual Ordering and Retrying

Subscription Expiration

Automatic OrderingNext Order DateWhen Does Subscribe Pro Automatically Place Orders?First Time Only - Failure EmailsRetry ScheduleAutomatic Ordering Configuration

Enable Automatic OrderingGenerate Order Automatically AfterSubscription Fulfillment Threshold

Next Order Date

All subscriptions in the Subscribe Pro system have a .  This date controls the next time when Subscribe Pro will attempt toNext Order Dateautomatically place an order for that subscription.  When the is reached, and a subscription is at status, an order will beNext Order Date Activeattempted.

When Does Subscribe Pro Automatically Place Orders?

For each of your subscriptions, if and only if they are marked with the   status, Subscribe Pro will automatically place an order when the Active Nex is reached.  After Subscribe Pro successfully places an order, it will automatically increment the   according to the t Order Date Next Order Date I

 which is configured on the subscription.nterval

The following example may help to illustrate the process:

A new customer, John Doe, checks out on your website and creates a new subscription on June 12John selects   as the interval on his subscription1 MonthA new order and a new subscription are created immediately at the time of checkoutThe Next Order Date on the subscription is set to   and the Interval is set to July 12 1 MonthWhen  comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up in your Magento July 12instanceAt that time, Subscribe Pro sees that John's subscription has a   interval, and automatically updates the Next Order Date to 1 Month August 12When   comes, the process repeatsAugust 12

First Time Only - Failure Emails

Page 3: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Our platform has a new option under System > Configuration > Email Settings called "First Time Only." When enabled, this setting ensures thatyour customers are not bombarded with subscription failure emails on each re-attempt of their order. In that scenario, when a subscription entersretry status, as described in the below table, for the first time, an email will be sent out. Any subsequent failures during that retry attempt will nottrigger another failure email. If this setting is disabled, an email will be set for every failure in a retry process.

This setting can only be enabled or disabled by Subscribe Pro Support. If you would like this setting to be changed, please contact [email protected]

Retry Schedule

When a subscription comes due and Subscribe Pro attempts to place an order, but the order fails, Subscribe Pro automatically attempts to retrythe order on a set schedule.  First Subscribe Pro attempts to determine the cause of the failed order, and depending on the cause initiates aseries of retry attempts, customer and admin notifications.  Below we outline the steps taken for different issues:

Issue Class Examples Retry Behavior

Technical Error Some examples of issues which fall into thisclass:

Your Magento website is down, yourpayment gateway's API does notrespond, your Magento website is notable to communicate with Subscribe Pro

Subscribe Pro does the following:

The order is automatically retried up to 5times after the initial failure, for a total of6 attemptsRetries will occur once every 4 hours.Your admin notification contacts arenotified after each failed attemptYour customer is notified after allattempts have failed, but not after eachattempt

Soft Decline This is an error reported by your paymentgateway, which may be resolved in thefuture. Some examples are:

Credit card is over the limitCredit card is flagged for possiblefraudulent activity

Subscribe Pro does the following:

The order is automatically retried up to 2times after the initial failure, for a total of3 attempts.Retries will occur once every 24 hours.Your admin notification contacts arenotified after each failed attemptYour customer is notified after eachfailed attempt

eCommerce Platform Error Some examples:

The shipping method selected for theorder is not available in the Magentocart (see for more info: DiagnosingFailed Subscription: Shipping method is

)not availableThe product SKU is out of stock or notavailable in the Magento cartMagento is configured to not alloworders shipping to or purchased from thecustomer's address / region

Subscribe Pro does the following:

The order is failed immediatelyYour admin notification contacts arenotifiedYour customer is notified

Payment Card Error Some examples:

The selected credit card does not havea properly configured type, expirationdate or billing address (rare)The selected credit card is no longerstored (has been deleted by thecustomer for example)

Subscribe Pro does the following:

The order is failed immediatelyYour admin notification contacts arenotifiedYour customer is notified

Page 4: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Hard Decline This is an error reported by your paymentgateway, which will never be resolved. Someexamples are:

The credit card is cancelled or has beendiscontinuedThe credit is reported missing / stolenThe gateway reports a message saying"destroy card"

Subscribe Pro does the following:

The order is failed immediatelyYour admin notification contacts arenotifiedYour customer is notified

Expired Card This is an error that occurs when theselected credit card is expired and has notbeen updated.

Subscribe Pro does the following:

The order is failed immediatelyYour admin notification contacts arenotifiedYour customer is notified

Out of Stock This is an error that occurs when theselected product is not in stock in Magento.

Subscribe Pro does the following:

The order is failed immediatelyYour admin notification contacts arenotifiedYour customer is notified

Automatic Ordering Configuration

There are 3 key configuration settings which affect the automatic ordering process.

Enable Automatic Ordering

This setting can be enabled or disabled.  If enabled, Subscribe Pro will attempt to automatically generate orders for your subscriptions.

Generate Order Automatically After

This setting controls the time of day when the majority of your subscriptions will be fulfilled.  Subscribe Pro attempt to place an order for asubscription which due until this time has passed.

Note that after this time has passed, Subscribe Pro will continue to automatically create orders for any subscriptions which are set to statuActives and which have a that matches the current day.Next Order Date

Subscription Fulfillment Threshold

This setting controls the number of days when a subscription is still eligible for automatic ordering, after the subscription's hasNext Order Datepassed.  The follow example should help to illustrate how this setting is applied:

Page 5: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

The is set to Subscription Fulfillment Threshold 1 dayAn order is attempted for John Doe's subscription on Nov. 12, the order fails because John's card is declined.On Nov. 13, the date is still within 1 day of Nov. 12, so the order is automatically retried by Subscribe Pro.On Nov. 13, the order fails again.On Nov. 14, Subscribe Pro would normally make a 3rd attempt to place an order for John's subscription, however, because the Subscrip

is set to only , no additional order attempts are made and the subscription is set to status.tion Fulfillment Threshold 1 day Failed

 

Delivery Frequencies and Interval BehaviorThe Subscribe Pro platform interface includes a Subscription Intervals page within the System menu which allows you to define the frequenciesavailable for your customers to choose for their subscriptions. For instance, you can set up intervals for weekly or monthly subscriptions, orsubscriptions that run every 7 days.

Interval Behavior

Date calculations based on subscription intervals are typically straightforward, but there are a few edge cases to be aware of. Our system allowsselecting the unit of frequency from the choices: Day, Week, and Month. You can then choose how many of that unit must pass between eachsubscription order that selects that interval. When a subscription is processed and an order goes through successfully, the Next Order Date isautomatically updated by incrementing it based on the interval length and unit. For instance if you choose "1" for the length and "Day" for the unit,a subscription with that interval will be processed every day.

Here is a table with some examples of how dates will be calculated using some common intervals

Interval Unit Length Initial OrderDate

First ReorderDate

SecondReorder Date

Third ReorderDate

FourthReorder Date

Every 30 Days Day 30 January 1 January 31 Leap Year: March 2

Non-LeapYear: March 3

April 1

April 2

April 31

May 1

Every 2Weeks

Week 2 January 1 January 15 January 29 February 12 February 26

Every Week Week 1 January 1 January 8 January 15 January 21 January 29

Every 7 Days Day 7 January 1 January 8 January 15 January 21 January 29

Monthly Month 1 January 31 Leap Year: March 2

Non-LeapYear: March 3

April 2

April 3

May 2

May 3

June 2

June 3

Monthly Month 1 March 31 May 1 June 1 July 1 August 1

Page 6: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Every 4Weeks

Week 4 April 5 May 3 May 31 June 28 July 26

Every Year Month 12 (Leap Year)February 29,2016

(Non LeapYear) March 1,2017

March 1, 2018 March 1, 2019 (Leap Year)March 1, 2020

Subscriptions with a 1 Month interval will typically be placed each month on the same calendar date (e.g. for a subscription starting on the 1st of agiven month, it will continue on the first of all subsequent months). However, as is shown in the table above, there are some edge casessurrounding subscriptions that are created in the later days of the month. This is most commonly seen with subscriptions created on the 31st ofone month when the next month only has 30 days, but is more exaggerated when it comes to February because January has 31 days andFebruary only has 28-29. When the current month doesn't have as many days as the previous month and a subscription is on one of those days,our scheduler will count ahead as many days as make up the difference between the number of days in the current month and the number ofdays in the previous month. For example, in a non-leap year, February has 28 days, so a subscription scheduled every 1 month starting January31 will see that February doesn't have 31 days, so it will take 31-28=3, and then it will count ahead from 28 that many days and the subscriptionwill be processed again on April 3. However, moving forward, the subscription will remain on the 3rd of each subsequent month.

For similar reasons, an "every 30 days" subscription should not be seen as the same as an "every 1 month" subscription because not everymonth has exactly 30 days. Looking at the first example in the above table, there are two orders placed in January and the month of February isskipped altogether because of how many days each month has. Additionally, in subsequent months the date of the order each time will bedifferent. This is also true of the "every 4 weeks" interval.

These behaviors can and has caused some confusion for our customers when looking at subscription revenue reports. If 10 subscriptions ran onDecember 31 and then the same subscriptions ran on January 31, the date of the reorder is changed during February, and then March 31 endsup with only as many subscriptions as were created on that date.

Subscription Grouping and Partial Orders

Automatic Subscription Grouping

When sending subscription reorders to your eCommerce website, Subscribe Pro tries to group the products into the fewest orders possible. Thisway, your customers aren't charged multiple times for shipping. For subscriptions to be grouped into a single order, several parts of the ordermust match exactly.

Here is how Subscribe Pro’s grouping logic works.

 1. Subscriptions can only group when: 

they all belong to the same customer in Subscribe Pro, and

they are processed in the same batch of subscriptions, meaning that all the subscriptions’ next order dates must be identicalwhen our automatic order scheduler is searching for eligible subscriptions.

When editing multiple subscriptions for a single customer, we recommend that you use our Mass Edit feature (here) to ensure that allsubscriptions will be grouped.

2. Our order processing system checks the Subscription Grouping mode. You can find this setting is in your environment's orderingconfiguration, in System > Configuration > Ordering Settings.

There are three available modes:

 Disable Grouping: Selecting this setting means that each subscription will be sent to your eCommerce website as a separateorder, and none will be grouped together.Standard Grouping: will be Selecting this setting means that subscriptions that have matching criteria (as explained below) grouped together into a single order.Group and Apply Coupons to Subscriptions with No Coupons: This setting is the same as the Standard Grouping opton, exceptthat if one subscription has a coupon code and the rest do not, the subscriptions will still be grouped and the same coupon codewill be applied to each one in the group.

3.  Our system will also check the following subscription details:

Payment ProfileShipping AddressShipping MethodCoupon Code

Subscription grouping will depend on which of these details match.

 

To have this setting changed on your environment, please contact [email protected].

Page 7: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Partial Orders

Another setting that affects whether a full group of subscriptions will group as a single order or not is the Partial Order Mode setting. This settingallows you to determine who a group of subscriptions will behave when one or more subscriptions in the group encounters an issue duringordering (such as one product being out of stock).

The default option for this setting is "Require all subscriptions to be successfully ordered." Under this setting, when a customer's subscriptionshave been grouped as per the above criteria, if an issue occurs during ordering,   eachch subscription in the group will fail, and all will show thesame error message.

The other option for this setting is to "Allow partial orders”. This option  instead allows ythe remaining subscriptions in the group to go through as asingle order.  Once the subscription(s) that failed are fixed and attempted again, a new and separate order will be placed for those products.

Manual Ordering and Retrying

Manually Place One-Off Order

Sometimes you will want to create an order for a customer's subscription which falls outside of the normal schedule.  There are 3 places in theSubscribe Pro management UI where you can place this type of order.

You may use any of these methods to create a single order for a customer's subscription.  This process will not change or increment thecustomer's subscription or .  If the one-off you create is intended to replace the customer's regularly schedule Status Next Order Datesubscription order, you must also reset the on the subscription.Next Order Date

Edit Customer Page

In the subscriptions grid on the Edit Customer page, there is a button for each of the customer's subscriptions.Place Order

If you are having trouble with a customer's subscriptions not being grouped, and this information has not helped resolve theissue, please reach out to [email protected] so that we can help.

To have this setting changed on your environment, please contact [email protected].

NoteIf you use any of the buttons to retry a failed customer subscription, please remember to also reset the subscription Place Order Statusto and update the when the order goes through.Active Next Order Date

Page 8: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Subscriptions Page

On the subscriptions page, there is a button on each of the subscriptions listed.Place Order

Edit Subscription Page

On the Edit Subscription Page, on the Show Orders tab, there is a link.Place New Order

Page 9: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

Manually Retry an Order

You can manually retry an order by changing the to the date that you want to retry the order. If changing the toNext Order Date  Next Order Datethe day of, the order will be placed within 5 minutes of selecting the same day.

 

Testing

If manually retrying the same order for testing purposes - and the order was successful on the first attempt, you will be unable to retry that orderagain on the same date of your initial retry attempt. You will need to wait until the next calendar day to manually retry the order.

NOTE: Although you will receive a notice that the order will be fulfilled that same day for any additional retry attempts, the order will not actuallybe placed.

Subscription Expiration

Expiration Date and the Expiration Process

Subscribe Pro supports setting an expiration date on subscriptions.  A subscription's status will be changed to   at midnight on theExpiredexpiration date, based on the time zone configuration for the account.

If a subscription has an order scheduled for the same day it's set to expire, the expiration will take precedence and the subscription will be set to E before an order is created.xpired

Editing the Expiration Date

Page 10: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

The   may be viewed and edited in the Subscribe Pro management UI under Subscription Expiration Date Manage Subscriptions >:Subscriptions > Edit Subscription

 

TroubleshootingHere are a list of common troubleshooting related items for Subscribe Pro. 

All Subscriptions Failed When One Product is Out of Stock

Dealing with Failed Orders / Restarting Failed Subscriptions

Diagnosing Failed Subscription: Shipping method is not available

Magento 2 - Required "client_secret" key is not supplied in config...

Quantity on product pages defaults to 0.

Subscriptions not consolidating into a single order

Troubleshooting "Failed to GET Subscription!" error message on My Subscriptions page

Troubleshooting "Failed to verify store code: default" error in Subscribe Pro platform

Troubleshooting Magento SOAP API Connection

All Subscriptions Failed When One Product is Out of Stock

Page 11: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

2.

3.

4.

By default, when Subscribe Pro groups multiple subscriptions together into a single order to Magento, if one product is out of stock, the entireorder will fail and each subscription will include an error saying that one of the products was out of stock.

A configuration option is available so that you can specify that only the subscription to the out of stock product should fail and the rest should gothrough. This can be found under System -> Configuration in the Ordering Settings tab.

 

Dealing with Failed Orders / Restarting Failed Subscriptions 

Issue: Dealing with Failed Orders / Restarting Failed SubscriptionsIt is bound to happen, an order will fail, most often due to credit card issues such as an expiry date that is passed, lack of funds on the card, orbilling address mis-match issues. Here is how to respond and get the subscription restarted when it does.

The Subscribe Pro platform will send the admins an error email (to the email addresses entered in the SP Platform configuration foradmin notification). These emails will provide details on which clients had failed orders. You can contact the client, letting them know their order failed, most likely that they need to update their credit card. The subscription will be marked as failed in Subscribe Pro. Depending on the results of contacting the customer, you will update the subscription, and process a manual order (clicking on theShopping Cart under Actions) to the right of the order. If needed update the interval for the subscription.

Page 12: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

4.

5. If the order goes through successfully, you will set the subscription to active, and set the next order date as appropriate, and it willproceed as normal.

Diagnosing Failed Subscription: Shipping method is not available

The Symptom

When you receive this error message:

Error Type:   mage_api_error_cart_shipping.methodError Message / Detail:   Shipping method is not available

The above error shows up on the Failed Subscription Report and also appears in the "Some Subscription Orders Failed" email which is sent toadministrators.  For example:

What This Means

This error occurs when a subscription re-order can't be created by Subscribe Pro because Magento reports that the selected shipping method isnot available for the order.

Diagnosis

Page 13: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

2.

3. 4. 5.

6.

The best way to diagnose this issue is to add the identical product and quantity to the Magento shopping cart on the frontend of your website,then make changes to your configuration until the shipping method in question becomes available.

Find the Shipping Method on the Subscription in Question

To find which shipping method is configured on the subscription, login to the Subscribe Pro Admin and navigate to Manage and find the subscription in question.  Click the Edit link and view the subscription.  Look forSubscriptions > Subscriptions

the Magento Shipping Method Code field.  For example:

Navigate to the frontend of your Magento website, locate the product in question and add it to your shopping cart.  Make sure you areNOT logged in as a customer.View the shopping cart page.  Adjust the product quantity to match the quantity in the subscription.Enter a zip code and / or region to get a shipping quote.  Make sure the zip code and / or region match that of the customer.Now you should see a list of shipping methods on the cart page.  If your configuration has not changed, and you have been careful tomatch the product, quantity and address information from the failed subscription, you will NOT see the shipping method which isconfigured on the subscription.

Now update your Magento shipping configuration settings, then refresh your shopping cart page.  Continue this process until the shippingmethod in question becomes available on the cart page.

Magento Shipping Method Configuration

Each shipping carrier and method in Magento may have unique configuration settings which affect it's availability.  In addition, many merchantsrely on third party shipping method modules which offer many different configuration options.

Most standard shipping methods have at least the following configuration settings which may be relevant to the shipping method's availability:

Page 14: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

 

 

Magento 2 - Required "client_secret" key is not supplied in config...This error message most commonly occurs with Magento 2 Cloud instances. In each case so far we have found that the issue was due to theMagento Encryption Key not being properly set, preventing the sensitive config data from being saved correctly. You can use to set upthis guidethe encryption key, and then enter the client_secret key again in the Subscribe Pro configuration. Make sure the flush the Magento cache aftercompleting those steps, and then try to test the connection again.

Quantity on product pages defaults to 0.

If you see that the Quantity field on product pages is defaulting to 0, there is an easy fix.

In the Magento admin, you can go to  .System > Configuration > CATALOG > Inventory > Product Stock Options

For the field called , click and then next to the dropdown that says "Minimum Qty Allowed in Shopping Cart" "Add Minimum Qty" ALL, enter , and save the configuration.GROUPS 1

Page 15: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Subscriptions not consolidating into a single orderWhen processing multiple subscriptions for the same customer at the same time, Subscribe Pro will by default attempt to consolidate them intothe fewest orders possible. However, subscriptions will not be grouped into a single order if several criteria do not match exactly. To view moredetails about how our system attempts to group subscriptions and which criteria are required to match for grouping to take place, please view thefollowing documentation:  .Subscription Grouping and Partial Orders

Here are a few scenarios in which case subscriptions may not group or may be split into two or more sub-groups, even if they seem like theyshould group into a single order based on the information in the above linked article:

1. Subscriptions not grouping as expected while editing them one-by-one

Starting at the time set in your environment configuration, our system constantly checks for subscriptions that are eligible for areorder, and as soon as it finds one or more that need to be processed, it schedules them in a new batch. Example: You have twosubscriptions that are currently in a failed status and you are trying to reactivate them so that they will run today. If you edit each oneindividually, our system may find the first eligible subscription and schedule it before you have finished editing the second one. In thiscase, the subscriptions will be sent as separate orders. Instead, if you wish to have them group into one order, we recommend usingthe Mass Edit feature. This feature can be found on the Manage > Subscriptions page, as well as when editing a customer (atManage > Customers > Edit) in the subscription list. To use it, select the checkboxes next to the desired subscriptions and click MassEdit. This will cause all of the subscriptions you are editing to be updated at the same time, so they will be batched together for orderprocessing.

2. Subscriptions not grouping as expected despite all required criteria appearing to match

In the above linked article, several criteria are listed that must match for grouping to happen. Of these, some criteria may haveduplicate entries saved in the customer information. In that case, it can be difficult to differentiate between them when editing asubscription. For instance, you may have two address records saved that are identical. However, each of those addresses in oursystem has a unique ID number that is used to link it to payment profiles (as the billing address) and subscriptions (as the shippingaddress). Our system considers these as two separate addresses, even if the address data is identical. In order for a subscription togroup with another subscription, the same address record must be set on both. The same concept applies to payment profiles, as it ispossible for customers to save the same card multiple times.

3. Subscriptions not grouping as expected when a customer reactivates them from their My Product Subscriptions page in Magento.

If you have several subscriptions and reactivate them individually via the My Product Subscriptions page, the same thing can happenas with the first scenario.  That is, if you reactivate one subscription individually, by the time you reactivate the second subscription,the first may already have been batched. This is harder to prevent, as it is customer-initiated. However, a way to handle this is to beproactive with subscription failures, reaching out to the customer and letting them know you will handle reactivating the subscriptiononce the issue that caused it to fail is resolved.

Page 16: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Troubleshooting "Failed to GET Subscription!" error message on MySubscriptions pageWhen changing options on the My Subscriptions page, if you are using a version of jQuery lower than 1.10.x (which is included with the SubscribePro extension), the request will return a failed response because it is being sent as a GET request instead of a POST request. This is due to usingthe  parameter on the $.ajax() function. As per the  the parameter was added in version 1.9.0, and themethod jQuery API documentation methodcorrect parameter for earlier versions is  . The  parameter defaults to GET when it is omitted.type type

To ensure the Subscribe Pro extension behaves as expected, please use at least the version of jQuery provided with the extension package.

Troubleshooting "Failed to verify store code: default" error inSubscribe Pro platform

If you have set up Magento to communicate with Subscribe Pro and the connection works but it gives you the following error message whenyou try to verify the URL:

Verify Store Code

First, double check that the store code is correct. In the Magento backend, navigate to  and look to the far right ofSystem -> Manage Storesthe screen under where it says  . Make sure the proper store code is entered into the field in theStore View Name Magento Store CodeSubscribe Pro platform settings as shown in the above screenshot.

If you have read all of the above information and still cannot figure out why your customer's subscriptions did not group as youexpected, please reach out to   so that we can help take a [email protected]

Page 17: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Web Services User

Another cause for this issue by an improperly role setup for the Web Services user. In the Magento backend, navigate to System -> Weband ensure there is a user created, using the same username and API key as specified in the settingsServices -> SOAP/XML-RPC - Users 

entered into Subscribe Pro.

This user needs to be given a role with the proper permissions in order for the Subscribe Pro platform to be able to communicate with theMagento API. Under  click Add New Role and select the tab at theSystem -> Web Services -> RolesSOAP/XML-RPC - Role Resourcesleft. Make sure to select  from the dropdown box to give the role access to all resources.All

Page 18: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Save the Role and when the page reloads, click on the tab on the left. Select  in the dropdown and then click the checkboxRole Users Anynext to the user.

Now, save the role, ensure the settings are properly entered in the Subscribe Pro platform interface, and try to verify the Magento connection.Assuming everything has been set up properly, you should see the following:

Page 19: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

Troubleshooting Magento SOAP API Connection

If you are having trouble getting Subscribe Pro to connect to your Magento installation API and are seeing the error in the screenshot above,please follow these steps to diagnose the issue.

Step 1 - Double Check the URL

Even if the URL looks correct, there may be an issue causing it not to function properly. To test thisand to make sure that the output is correct, take your SOAP API URL and add "?wsdl" (without thequotation marks) to the end of it. Then try to visit that URL in a browser. You should see an XMLdocument containing the Magento API wsdl that looks like the following screenshot.

Step 2 - Check the API Credentials

Be sure to make sure the Web Services User and Role are properly set up in Magento (see for help setting that up). Then,this documentationmake sure the values entered into Subscribe Pro for the and  match the values in theMagento SOAP API Username Magento SOAP API KeyWeb Services user.

Page 20: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Step 3 - Make Sure SSL is Set Up Correctly

If the SSL/HTTPS protocol is improperly configured for your domain, it can cause issues connecting from Subscribe Pro to your Magento API.

Qualys SSL Labs offers a free site checker to find common issues with SSL setup. You can use their https://www.ssllabs.com/ssltest/analyze.html to run this test and make sure your SSL is set up correctly.

Step 4 - Run the Test Script

We have a script that can be run from any computer with PHP and a network connection that can access your Magento site. You can eitherdownload it from  or copy and paste the block of code below into a new file (click "Expand Source" below to view the code). You will need tohereset the $apiUser, $apiKey, $url, and $magentoStoreCode variables to the correct values before running the script.

soap_cart_create_test.php

<?php// Set the user name here:$apiUser = 'subscribepro';// Set the password here:$apiKey = 'subscribepro';// Set the url here:$url = 'http://www.MYSTOREDOMAIN.com/store/api/soap';// Set the Magento store code here:$magentoStoreCode = 'default';// Create new SOAP client$soapClient = new \SoapClient( $url . '?wsdl', array( 'trace' => true, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_BOTH, 'keep_alive' => true, ));// Login to Magento API and get session ID$sessionId = $soapClient->login($apiUser, $apiKey);try { // Call method and capture result $result = $soapClient->call($sessionId, 'cart.create', array( $magentoStoreCode, )); echo 'Success!'; echo "\n\n";}catch(\SoapFault $e) { // Output result echo 'SOAP request headers: ' . "\n"; echo $soapClient->__getLastRequestHeaders() . "\n"; echo 'SOAP request body: ' . "\n"; echo $soapClient->__getLastRequest() . "\n"; echo 'SOAP response headers: ' . "\n"; echo $soapClient->__getLastResponseHeaders() . "\n"; echo 'SOAP response body: ' . "\n"; echo $soapClient->__getLastResponse() . "\n"; echo "\n";}

If the API Connects but the Store Code does not verify

Page 21: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1. 2.

3.

4.

5.

There are some cases in which Subscribe Pro is able to connect to your Magento installation but cannot verify the store code.

First, we suggest checking the Magento admin backend under System -> Manage Stores, and making sure that the correct store code is set inthe Subscribe Pro platform to match the code for the Magento store you are trying to connect. You can use either the store code or the store ID #.

Another thing that can cause this to fail is SOAP/XML-RPC Role permissions. See to ensure that it is all set up properly.this documentation page

Install Subscribe Pro for Magento 2

Installation via ComposerYou can install our Magento 2 extension using the  dependency management tool. The has installation instructionsComposer Composer websitefor , and .Linux, OSX Windows

Once Composer is installed on your Magento server, please follow these simple steps to install our extension:

Set up the correct path for Composer or keep Composer within Magento root.In Magento root, run the following command. It may take a couple of minutes:

composer require subscribepro/subscribepro-magento2-ext

Version Compatibility Notes:If you are using Magento 2.1.2, you must use extension 1.0.6.If you are using Magento 2.1.x, x > 2, you must use extension 1.0.20.We currently support Magento 2.2 on our latest version.If you do not specify a version, Composer will pick the best extension version based on your Magento version.

composer require subscribepro/subscribepro-magento2-ext <version>

After the above is successful, run this command in Magento root. This will let Magento know about the module.

php bin/magento module:enable Swarming_SubscribePro

Run this command in Magento root. This will ensure any installer scripts we may have are executed properly and store the current dataversion.

php bin/magento setup:upgrade

You may need to run this command to deploy any necessary static content.

Page 22: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

5.

6.

7.

1.

2.

php bin/magento setup:static-content:deploy

Run this command if you have a single website and store:

php bin/magento setup:di:compile

Or this one if you have multiple websites or stores:

php bin/magento setup:di:compile-multi-tenant

Clear cache from Magento admin.

Configuring Subscribe Pro API Credentials for Magento 2 ExtensionYou must setup your Magento 2 Subscribe Pro extension configuration so that it can connect to the Subscribe Pro Platform.

Login to the Subscribe Pro platform here:  .  Navigate to  .  There should be an APIhttps://platform.subscribepro.com System > API Clientsclient record which was created automatically for use with your Magento store.  It is also possible to create a new API client record toregenerate the credentials.  Click the View icon next to the API client credentials you would like to use for your Magento store to connectto the Subscribe Pro platform.  Note these credentials so you can enter them later in the Magento admin panel.

In the Magento Admin panel, navigate to  and select your store in the Store View selector. Next, navigate to Stores > Configuration SWand expand the and  sections:ARMING > Subscribe Pro General Platform API Configuration

Page 23: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

2.

3.

4.

  Under the section, ensure that the   setting is set to  .General Enabled Yes

 Under   section:Platform API Connection

Set  to:  .Base URL api.subscribepro.comSet the   and   to the credentials from your Subscribe Pro platform account. You can use the  buttClient ID Client Secret Test Connectionon to make sure the connection to Subscribe Pro works.Set    to   during installation and testing.Enable Logging Yes

 

Set up API Credentials for Magento 2 ExtensionIn Magento 2, the API Credentials required for use of the Subscribe Pro extension are generated through the Integrations feature.

The required credentials are:

Consumer KeyConsume SecretAccess TokenAccess Token Secret

The steps below will show you how to generate these credentials.

Note: Your server must be publicly accessible or must whitelist the Subscribe Pro server IPs in order for Subscribe Pro to connect. You can findthe IP addresses in the Platform under System > Payment Gateway Accounts > . We do not support connecting to servers that areIP Addressesprotected by HTTP Authentication credentials.

Generating the Credentials

Step 1

In the Magento Admin backend, click on . Under , click .System Extensions Integrations

Step 2

Page 24: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

On the page, click on the button labeled .Integrations Add New Integration

Step 3

Enter a for the integration, your address, and .Name Email Your Password

Do not enter a or .Callback URL Identity Link URL

Then, click on the tab.API

Step 4

Page 25: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Select  from the drop-down menu under the heading.Custom Resource Access Available APIs

Then, select the checkbox, which should check all of the boxes within the Sales group, as well as the   -> checkbox.Sales Carts Manage carts 

Next, click the button labeled .Save

Step 5

Back on the page, find the integration you just created and click on the  link.Integrations Activate

Step 6

Click on the button labeled  to confirm the integration's access to the necessary resources.Allow

Step 7

You will see the four required credentials:   and You may copy themConsumer Key, Consumer Secret, Access Token,  Access Token Secret.directly into Subscribe Pro now. Otherwise the next step will show how you can access the credentials at any time.

Then, click on the button labeled  .Done

Step 8 (Optional)

Page 26: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

You can access the four credentials by going to the  page, finding the integration used for the Subscribe Pro extension, clicking the Integrations E icon (on the far right), and then scrolling to the bottom of the page.dit

Step 9

In Subscribe Pro, go to  ->  and click on the  tab (previously  ).System Configuration Store Connection Settings Magento Settings

Under  select  . eCommerce Platform Connection Type Magento 2 REST API

Under the  heading, set  to the base URL of your Magento 2 store. The trailing forwardMagento 2 REST Connection M2 REST API Base URLslash ( ) is necessary./

Enter the four credentials you created in the previous steps into their corresponding fields, and save the configuration page.

Configuration

Configuring Shipping for Recurring Orders

Multi-Store / Multi-Website Configuration

Page 27: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Product Setup and Syncing - Magento > Subscribe Pro

Using Store-Locale Mapping with Subscribe Pro

Configuring Shipping for Recurring Orders

Overview

Subscribe Pro has several modes that determine which shipping method code is sent with any given subscription when it is being sent to Magentoto place an automatic re-order. This page and the links below will explain each mode and how it works.

By default, new accounts are set to use the "Use Subscribe Pro Shipping Method" mode explained below. Tier 1 accounts are limited to onlyusing this option, and typically that mode should provide the flexibility needed by the majority of use cases. However, in some cases if you need touse a different shipping method code for subscription re-orders, accounts on higher tiers may contact   for [email protected] how to set up one of the other modes described below. Note that the option cannot be changed via the Subscribe Pro UI, so you will need tocontact support to have it changed so that we can discuss what the best approach will be.

Shipping Handling Mode Options

Shipping Handling Mode: Use Subscribe Pro Shipping Method

Shipping Handling Mode: Always Use Default Shipping Method

Shipping Handling Mode: Always Use Method from Subscription

Shipping Handling Mode: Try Method from Subscription First, Then Try Default Method

Shipping Handling Mode: Advanced Shipping Rules (Configured by Subscribe Pro Support)

Page 28: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

Adding Magento Shipping Methods into Subscribe Pro

Subscribe Pro user's with the Account Manager permission may add, edit and delete shipping methods.  The shipping methods are found underthe   menu item.System > Shipping Methods

To add a new Magento Shipping Method, click the blue "+ New" button at the bottom of the page.

Fill in the fields with the appropriate information. the  field can be any label that will help you easily identify the shippingShipping method Titlemethod code from others in drop-down lists. 

Editing a Shipping Method

To edit the information Subscribe Pro has saved for a given shipping method, you can click the Edit icon on the shipping method table.

Page 29: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Deleting a Shipping Method

To delete a shipping method, click the Delete icon on the shipping method table.

Additional Information

How to Export a List of Enabled Shipping Methods from Magento

 

Shipping Handling Mode: Use Subscribe Pro Shipping MethodBy default in Subscribe Pro, the  in the Ordering Settings configuration page is set to Shipping Method Handling Mode Use Subscribe Pro

In the most recent versions of the Magento extension, a new "Subscribe Pro Shipping" shipping method is available. ThisShipping Method.shipping method does not show up on the Magento front-end, but is always available to Subscribe Pro when it places orders to your store via theMagento API.

The benefit of using this shipping method is that it will always be available to subscription re-orders, and allows you to handle free andinternational shipping without having to use multiple shipping method codes.

Page 30: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

The Subscribe Pro Shipping method is enabled by default, and cannot be turned off. Because it does not appear on the Magento frontend, andwill only be available for subscription re-orders placed to the Magento API, it can be safely left enabled.

Standard Shipping

The Subscribe Pro Shipping method can handle a standard, flat shipping rate that will be applied across all subscription re-orders. This rate willapply to all domestic subscription re-orders that do not meet the free shipping threshold.

The "Default Price for Standard Shipping" will be the standard, flat shipping rate. The "Title" and "Standard Shipping Title" will show up on thecustomer's order email and on the order details in the admin backend and will let them know what kind of shipping they are being charged.

Free Standard Shipping

The Subscribe Pro Shipping method also includes a free standard shipping option.

You can enable and disable free shipping for all subscription reorders using the "Enable Free Shipping" option. You can then set the "FreeShipping Title", which will appear in the customer's order email and the order details in the admin backend. The "Minimum Order Total for FreeShipping" setting will allow you to set the minimum amount the order must reach before free shipping will kick in. If the Free Shipping option isdisabled, even orders that meet that minimum threshold will be charged the standard rate.

International Shipping

The Subscribe Pro Shipping method handles domestic and international shipping, and allows you to set a different rate for each option.

The way we determine if an order is international or domestic is based on the Origin that is set under System -> Configuration -> SALES ->Shipping Settings -> Origin. Any orders inside that country are considered domestic, and any orders outside of that country are consideredinternational.

Page 31: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Here is the configuration specific to the international shipping:

The international shipping rate can be enabled and disabled across the board using the "Enable International Shipping" option. The "InternationalShipping Title" will be displayed in order emails and in the order details section in the admin backend. The "Default Price for InternationalShipping" allows you to set a flat shipping rate for all international orders.

Free International Shipping

Just like with Standard Free Shipping, you are able to set a minimum amount for international orders, at which point the shipping will be free aswell.

Configuration of the free international shipping is the same as the free standard shipping. Enter the minimum amount the order must be to qualifyfor free shipping into the "Minimum Order Total for Free International Shipping" box. Note that both Free Shipping and International Shipping mustbe enabled in order for the Free International Shipping to take effect.

Shipping Handling Mode: Always Use Default Shipping MethodAside from , the most basic shipping method setup is to always use a single 'default' shipping methodusing the Subscribe Pro Shipping Methodfor all subscription re-orders. This mode lets you select the default method from a list of methods you have . Then, allconfigured in Subscribe Proorders that Subscribe Pro places back to your store via the Magento API will attempt to use that method, disregarding any shipping method that isconfigured on individual subscriptions or the initial shipping method used when the subscription was created.

When this shipping method is selected, the  dropdown will be available in the System -> Configuration ->Default Magento Shipping MethodOrdering Settings configuration page, but the shipping method selection menu will be hidden from the individual subscription edit page.

Note that whichever method is selected should be configured to always be available to subscription reorders, or else subscriptions may fail incertain cases. For help configuring your shipping methods in this manner, please contact your Magento developer.

Shipping Handling Mode: Always Use Method from SubscriptionWhen a new subscription is created, the original shipping method used on the initial subscription is saved on the subscription. This allows yourcustomers to receive the same shipping costs and delivery speed for reorders as they did for their initial order.

This can be changed on a per-subscription basis by editing the subscription and changing the "Magento Shipping Method" field. Note that the fieldonly shows up if the "Always Use Method from Subscription" or "Try Method from Subscription First, Then Try Default Method" methods are used.

Page 32: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

When this shipping method handling mode is selected, Subscribe Pro will use whichever method is set on the subscription at the time the order isplaced.

However, this is also the most error-prone mode because sometimes shipping methods are not configured in a way that the method set on theinitial order is going to always be available for subsequent orders, due to various factors such as total in the cart, number of products, an addresschanges, or configuration changes to or removal of the shipping method itself, among other things.

Shipping Handling Mode: Try Method from Subscription First, Then Try DefaultMethodBecause the " " mode is prone-to errors, but the "Shipping Handling Mode: Always Use Method from Subscription Shipping Handling Mode: Always

" mode is inflexible and only allows use of one shipping method, we offer a hybrid mode that combines theUse Default Shipping Methodfunctionality of those modes. When this mode, previously called "Failover to Default Method", is selected, Subscribe Pro will first try to place thesubscription re-orders back to Magento using the method that is set on each individual subscription. If that method is not available at the time ofthe order, it will then try to use the selected default method.

When this method is selected, the default shipping method selection menu is available in the configuration under System -> Configuration ->Ordering Settings, and the subscription shipping method selection menu is available when editing an individual subscription, under Manage ->Subscriptions.

Ordering Settings Configuration

Individual Subscription Configuration

Page 33: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

 

Shipping Handling Mode: Advanced Shipping Rules (Configured by SubscribePro Support)In rare cases, the other shipping method handling modes may not be flexible enough for your shipping needs. Our most complex and advancedoption also provides the most flexibility in terms of how shipping methods are selected, whether it be based on the number of products in the theorder, the specific country or location to which the order is being shipped, the total price of the order, or other factors. If our other shipping methodmodes cannot meet your needs, contact   for more information on how we might be able to best set your [email protected] configuration up.

Multi-Store / Multi-Website Configuration

One Subscribe Pro Account Per Magento Website

The Subscribe Pro platform and Magento extension are designed to be used with one Subscribe Pro account allocated for each Magento websitewithin your Magento instance.

Currency Mapping

Subscribe Pro accounts can be mapped to only one currency.  In order to use multiple currencies, you must use multiple Subscribe Pro accountsand multiple Magento websites.

NOTE: Magento itself supports only one "base currency" per website.  Magento will conduct all payment transactions and orders in the basecurrency.  Some versions of Magento do also includes a currency conversion feature which allows pricing to be displayed to customers in multiplecurrencies.  Keep in mind that all payment transactions and orders will still be placed in the base currency for the website when using Magento'scurrency conversion features.

Product Setup and Syncing - Magento > Subscribe Pro

Overview

Once you have a Magento development site connected to Subscribe Pro, you will want to sync all of your products (or at least those eligible forsubscription) from Magento to Subscribe Pro and configure the various subscription options.  If you have a small number of products, you can dothis manually, product-by-product.  If you have a larger number of products, it will be better to do this product sync en masse with our bulk productsync and import features.

Setup Default Product Settings

Setup Products Manually

Bulk Product Setup

How to Get Products Setup for Subscription in Bulk

 

 

Setup Default Product Settings

Page 34: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

2.

3. 4.

1. 2.

3.

4.

Overview

Subscribe Pro provides a set of default product settings.  You can configure these in your account under .  Any newSystem > Configurationproducts which are added to Subscribe Pro for there on will take on these default values until set otherwise (for example when syncing productsfrom Magento or when importing products in the Subscribe Pro UI).

How to Setup Defaults

Login to the Subscribe Pro Management UI.  Navigate to your configuration under .  Then choose theSystem > ConfigurationSubscription Settings tab.Find the first section, .Subscription Product Defaults

 Set your default discount setting.  The default setting may only be set as a percentage.Set your default intervals.  The order in which you add them to the box will determine the order they appear on each product.

 

Setup Products ManuallySetting up products manually, one-by-one is ideal if you only have a few products.  The process is easy and can be broken down into 2 parts:

Part 1 - Enable Subscriptions for Product in Magento Admin

In your Magento admin panel, navigate to the Catalog > Manage Products area, find the product you wish to setup and click Edit.Click the Subscribe Pro tab on the left.  Find the Enabled for Subscription setting and set it to Yes.

Click Save on the top right.

Page 35: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

4.

1.

2.

3.

4.

5.

The product should now be saved in Magento and synced to the Subscribe Pro platform.

Part 2 - Setup Subscription Options for Product in Subscribe Pro Management UI

Login to the Subscribe Pro Management UI and navigate to Manage Subscriptions > Subscription Products.  Find the product you wish tosetup and click Edit.The product SKU, name and price have been synced from Magento.  The remaining fields have taken default values from your accountconfiguration settings.

Setup the subscription discount.  You can choose to discount by percentage or a fixed price amount and set the discount.

 Setup minimum and maximum quantity settings.  These settings will determine the minimum and maximum quantity of the product SKUwhich are allowed in a shopping cart to create a product subscription.

 Setup the intervals (frequencies) allowed for subscriptions for the product.  Drag intervals to the right side and drag them into the order inwhich you would like the customer to see them presented.

Page 36: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

5.

1. 2.

3.

 

Bulk Product Setup

Overview

If you have many products to setup and sync from Magento, we offer several features to do this en masse.

OverviewMass Update Products in MagentoMagento Product ImportsBulk Sync Products from Magento > Subscribe ProImport Product Settings into Subscribe Pro

Mass Update Products in Magento

You may use Magento's mass update feature ( ) to enabled many products for subscription at once.Update Attributes

Login to the Magento admin panel.  Navigate to .Catalog > Manage ProductsSelect all of the products you want to enable for subscription from the grid.

 Select the option from the drop-down and click .Update Attributes Actions Submit

Page 37: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

3.

4.

5.

 Select the appropriate store / website scope using the drop-down.Choose Store

 Find the attribute, click the checkbox and select .  Then click .Subscription Enabled Yes Save

 

Magento Product Imports

You may use any mechanism which you have available to perform product imports into your Magento instance to update the'subscription_enabled' product attribute for specific products and website / store scopes.  Tools available include: Magento's built in Import /Export system, Magento's Dataflow system, third party extensions such as the Magmi product import extensions, etc.  To put it simply, use anymeans you have available to bulk update the 'subscription_enabled' attribute on all your products, you can then use the bulk sync script to syncthose products to Subscribe Pro.

Bulk Sync Products from Magento > Subscribe Pro

Page 38: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

The Subscribe Pro Magento extension includes a command line script (shell script) which will sync all of the subscription-enabled products fromyour Magento instance to one or more connected Subscribe Pro accounts.  To run the script, access your Magento server shell (via SSH or othermeans) and simply run the following script in your Magento base folder:

php shell/autoship_prod_sync.php

 

 

 

Import Product Settings into Subscribe Pro

The Subscribe Pro Management UI includes a feature to import product settings from a comma separated values format file (.CSV file).  This filecan be prepared with Excel or another spreadsheet tool.  The complete column specifications can be found in the Subscribe Pro UI.  There is only1 required column in the file, 'sku'.

 

 

 

 

How to Get Products Setup for Subscription in BulkYou have 2 options.

If all products need the same intervals, discount, etc:1st, setup your default intervals for the 1,2 and 3 months.  Also setup your default subscription discount and minimum and maximum quantity

More information on the import sync included with the Magento extension is available here: Product Sync Script

Find the Product Import feature in the Subscribe Pro UI under  , here: System > Import Products https://platform.subscribepro.com/system/dataimport/product

Page 39: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

settings here:

Then set all products Subscription Enabled settings to yes in the Magento admin.  This can be done 1-by-1, by using the bulk edit option or byusing various Magento product import tools, etc.Finally, run the "product sync" script at the command line on the Magento server.  This will add all of the enabled products to Subscribe Pro.https://docs.subscribepro.com/display/spd/Product+Sync+Script

On the other hand, if you need different intervals or discounts for each product:First, set all products Subscription Enabled settings to yes in the Magento admin.  This can be done 1-by-1, by using the bulk edit option or byusing various Magento product import tools, etc.Then use Subscribe Pro's product import feature to import a .CSV of all product SKUs, together with the desired intervals, discounts, etc.https://platform.subscribepro.com/system/dataimport/product

Using Store-Locale Mapping with Subscribe ProSubscribe Pro allows using multiple store views with the same Subscribe Pro environment, allowing your customers to receive localizedtransactional emails about their subscriptions. This can be accomplished using a feature called Store-Locale Mapping and works with bothMagento 1 and Magento 2.

 

Setup Store-Locale Mapping within Subscribe Pro

The following screenshots explain how to set up the mapping in Subscribe Pro, assuming your Magento store has two store views codes: default,and spanish.

Step 1 - Go to System -> Configuration -> Store-Locale Mapping, and click on the "+ New" button.

Page 40: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Step 2 - Enter the Store Code corresponding to your store view, and select the desired Language fromthe drop-down menu.

Step 3 - Click on the "Save" button to save your mapping. Repeat these steps for each mapping youneed to make.

Page 41: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Step 4 - Contact Subscribe Pro Support to enable the Store-Locale Mapping option in Subscribe Proenvironment configuration.

Note: This option is not enabled by default, and can only be changed by Subscribe Pro Support. Please email if [email protected] to enable this setting.

Step 5 - Go to System -> Email Templates and set up email templates for each locale you havemapped.

When adding/editing a template, you can select the language from the Locale field that corresponds to the mappings you have set up.

Page 42: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

 

If your current Magento site is not set up with the store views configured above, the following steps will show you how to set them up.

Setup Store-Locale Mapping within Magento 1

Step 1. Under System, select Manage Stores.

Step 2. Click Create Store View.

Step 3. Select the desired Store, and enter the Store View Name and Code, and set the Status toEnabled. Then click Save Store View. 

Page 43: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Setup Store-Locale Mapping within Magento 2

Step 1 - From the Store menu, click All Stores.

Step 2 - Click Create Store View

Step 3 - Select the desired parent store, enter the store view name and code, and enable the code.Then click Save Store View

Page 44: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Magento 2 Extension - Documentation and Developer'sGuide

Enabling Logging for the Subscribe Pro extension for Magento 2

Events Dispatched by the Magento 2 Extension

Magento 2 Subscribe Pro Vault Payment Method Configuration

Prevent redirection after customer login for M2

Set up Webhooks to sync cards being added, updated, and redacted in theSubscribe Pro Platform

Using ShipperHQ for Dynamic Shipping Rules

Enabling Logging for the Subscribe Pro extension for Magento 2The Subscribe Pro extension logs various events that occur throughout the extension's workflow, including outgoing requests to and theirresponses from the Subscribe Pro platform.

Enabling Logging

In Magento 2, logging for core Magento features is enabled by default. However, it still needs to be enabled for the Subscribe Pro extension.

To do so, first login to the Magento 2 admin backend. Then, on the left, click on Stores and then Configuration. At the top, select the correctWebsite scope, as the Subscribe Pro configuration is inaccessible from the Default scope. In the sub-navigation, expand the Swarming sectionand click on Subscribe Pro.

On this page, make sure the extension is enabled under the General section. Then, expand the Platform API Connection section and ensure thatthe "Enable Logging" setting is set to Yes.

Accessing Log Files

Page 45: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

Once enabled, the Subscribe Pro extension logs can be found in the Magento log folder as follows:

{path to Magento 2 installation}/var/log/subscribepro/log-YYYY-MM-DD.log

If Magento is in Production mode, the logs will be in:

{path to Magento 2 installation}/pub/var/log/subscribepro/log-YYYY-MM-DD.log

The web server user must have read and write access to the logging directory in order to create the 'subscribepro' folder and the log files inside.

Events Dispatched by the Magento 2 ExtensionThe Subscribe Pro Magento 2 extension dispatches a number of different events to allow easy customization.  Follow are details of each eventwhich is dispatched.

List of Events Dispatched

'subscribe_pro_before_create_subscription_from_quote_item' Event

'subscribe_pro_after_create_subscription_from_quote_item' Event

'subscribe_pro_before_create_subscription_from_quote_item' Event

Overview

The 'subscribe_pro_before_create_subscription_from_quote_item' event is dispatched just before a new subscription is created from a quote itemon a new order.

Parameters

Name Description

'subscription' The subscription parameter holds a data structure which is arepresentation of the new subscription which will be created. Thedata in this object can be modified to change the details of the newsubscription which is created on the Subscribe Pro platform. Thisobject is an instance of the SFC_Autoship_Model_Subscription class.

'quote_item' The quote_item parameter holds a reference to the Magento quoteitem data structure from the just-placed quote / order. The quote_itemholds the product details and the customer's "request" to create asubscription for the given product. This object is an instanced of theMage_Sales_Model_Quote_Item class.

'subscribe_pro_after_create_subscription_from_quote_item' Event

Overview

The 'subscribe_pro_after_create_subscription_from_quote_item' event is dispatched just after the Subscribe Pro extension creates a newsubscription from a quote item.  This occurs when a subscription is being created from a successful checkout, just after the order is successfullyplaced.

Parameters

Name Description

'subscription' The subscription parameter holds a data structure which is arepresentation of the new subscription which will be created. Thedata in this object can be used to learn about the newly createdsubscription. This object is an instance of theSFC_Autoship_Model_Subscription class.

Page 46: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

'quote_item' The quote_item parameter holds a reference to the Magento quoteitem data structure from the just-placed quote / order. The quote_itemholds the product details and the customer's "request" to create asubscription for the given product. This object is an instanced of theMage_Sales_Model_Quote_Item class.

Magento 2 Subscribe Pro Vault Payment Method Configuration

The Subscribe Pro Vault payment method configuration can be found in Magento 2 under Stores -> Configuration -> Sales -> Payment Methods-> Expand the Subscribe Pro section. Note that you should ensure the "Store View" configuration scope selector is set to the correct scope foryour desired store before making any changes.

Settings

Enabled - This setting turns on or off the payment method for orders that include at least one product that will create a subscription.Available Options:

YesNo

Enabled for Non-Subscription Transactions - This setting turns on or off the payment method for orders that do not include anysubscriptions.Available Options:

YesNo 

Title - This setting determines the name/label that will show up for the payment method during checkout and on the order summary in theMagento admin backend.Payment Action - This setting determines the transaction time that is completed when a new order is placed using the Subscribe ProVault payment method.  For more information about the Authorize and Purchase options, please view this page.NOTE:Available Options:

Page 47: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

AuthorizePurchase

New Order Status - This setting determines the order status that will be set on new orders placed using the Subscribe Pro Vaultpayment method.Available Options:

ProcessingSuspected Fraud

Accepted Currency - This setting determines the currency that will be used for new orders placed using the Subscribe Pro Vaultpayment method.Available Options:

(various)Credit Card Types - This setting determines the types of credit cards that may be used with new orders placed using the Subscribe ProVault payment method.Credit Card Verification - This setting turns on or off the CVV/CVC/CV2 field on the payment method form for the Subscribe Pro Vaultpayment method.  The verification value entered here is used once during the initial card verification/authorization but is not savedNOTE:for use on recurring orders, due to PCI compliance rules.Payment from Applicable Countries - This setting allows you to choose whether or not all countries or only selected countries will beallowed for use in billing addresses for credit cards entered into the Subscribe Pro Vault payment Method. Available Options:

 All Allowed CountriesSpecific Countries

Payment from Specific Countries - When  is set to  , this setting determinesPayment from Applicable Countries Selected Countrieswhich countries are allowed to be used in billing addresses for credit cards entered into the Subscribe Pro Vault payment method.Available Options:

(various)  - This setting allows you to define the lowest order total for which the Subscribe Pro Vault payment method willMinimum Order Totalbe available.  - This setting allows you to define the lowest order total for which the Subscribe Pro Vault payment method willMaximum Order Totalbe available.Sort Order - This setting allows you to choose the order of the Subscribe Pro Payment method when it is part of a list of multiplepayment methods during the checkout process.

 

Prevent redirection after customer login for M2To prevent the user from being redirected back to the My Account page during login on Magento 2, and to let them stay on the same page theywere on before logging in, go to Stores -> Configuration -> Customers -> Customer Configuration -> Login Options and disable the "RedirectCustomer to Account Dashboard after Logging in" setting.

Set up Webhooks to sync cards being added, updated, and redacted inthe Subscribe Pro PlatformThe Subscribe Pro Magento 2 extension includes webhook (web hook) handlers for the payment_profile.created, payment_profile.updated, andpayment_profile.redacted webhooks. These tell Magento when a customer's payment profile has been created, updated, or redacted (deleted)from within the Subscribe Pro Platform interface, so that the changes can be reflected back to Magento.

Note: As of the time of writing this, only the payment_profile.redacted webhook has been implemented.

Setup in Subscribe Pro

Step 1

Page 48: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

To set up the webhook in Subscribe Pro, you will need to login to to the platform, select the desired environment, and go to System -> WebhookEndpoints.

Click on the  button on the bottom left side of the page.New

Step 2

Page 49: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

In the field, enter the URL of your Magento installation, and append onto the end of it.Endpoint URL /subscribepro/webhook 

Then, optionally uncheck the  box. Ensure that the Subscribe To All Event Types payment_profile.created, payment_profile.updated, and event types remain selected.payment_profile.redacted

Finally, click the  button.Save

Step 3

Page 50: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

For your newly created endpoint integration, click on the  action button on the right side of the table.Enable

Advanced Setup in Magento 2 (optional)

The webhook feature in the Magento 2 extension allows you to specify IP Addresses from which the webhook request must originate or else it willbe blocked. By default, this is unnecessary and you can skip this step because the Subscribe Pro server IPs come pre-filled into the extension.However, if you require a webhook request to be sent from another server, or if the Subscribe Pro API IP addresses ever need to be changed,there is a setting for the extension that allows you to specify those IP addresses.

Step 1

Sign into Magento, and go to Stores -> Configuration. Be sure to select your preferred configuration scope. Expand the section, andSwarmingclick on  .Subscribe Pro

Expand the  section and uncheck the  checkbox next to  . That field will become editable. InAdvanced Use Default Allowed Webhook IP Addressthat field, append or replace the existing list of IP addresses with the correct IP addresses that need to have webhook access to your server. EachIP address must be separated by a single comma, with no comma at the end.

Finally, click  .Save Config

Using ShipperHQ for Dynamic Shipping RulesOur Magento 2 extension only allows one shipping method to be used for all recurring orders. However, as of version 1.0.10 of the Subscribe Proextension for Magento 2 you are able to integrate with ShipperHQ in order to create more complex rules for shipping prices that will be applied tosubscription orders.

Before setting this up, you will need a account and will need to install their extension into your Magento 2 instance.ShipperHQ

Note: The below steps for setup will give you a basic, working subscription shipping method. Changes may be necessary in order to achieve yourexact requirements.

Setup and Configuration

Inside ShipperHQ Dashboard

Login to your ShipperHQ Dashboard and go to Websites

Page 51: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

2. 3. 4.

5. 6. 7.

8.

Enter the name and the base URL for your website.Save the website, and then click Edit to return to the page above.Click on Generate New Authentication Code.

Save this code somewhere because you will need to enter it into Magento and cannot access it again on this page.Now, click on Origins and click Add.Enter your origin location information and click Save.

Next, click on Carriers and click Add New.

Page 52: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

8.

9. 10.

11. 12.

13. 14.

Enter your desired carrier configuration and click Create Carrier.At the bottom of the next page, expand the Advanced Settings section. Take note of and/or change the Internal Carrier Code and MethodCode options.  For instance, an internal method code of "shqflat"These are what will be used by Subscribe Pro's recurring orders.and a method code "fixed" will result in the full carrier and method code of "shqflat_fixed". You can change this to anything that will helpyou more easily identify it.

Next, click on Shipping Groups underneath Carrier Rules and click Add New.Enter exactly into the Name field and select the carrier/method you created in the previous steps, andSUBSCRIBEPRO_RECURRINGclick Save.

Next, click on Carrier Rules and click Add New.Provide a new for the carrier rule and select the shipping method you created above.

Page 53: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

14.

15.

16.

1.

Under Conditionals, select the SUBSCRIBEPRO_RECURRING group for the "Includes one or more of these Shipping Groups" option.

Under actions, provide the rate for that shipping method, and then click Save.

Inside Magento 2

Login to the Magento 2 admin backend and navigate to Stores -> Configuration -> Sales -> Shipping Methods and expand theShipperHQ section.

Page 54: 1. Subscription Fulfillment and Ordering - Magento€¦ · When€July 12€comes, Subscribe Pro automatically places a re-order for John's subscription and the re-order shows up

1.

2.

3.

1. 2.

3.

Set "Enabled" to Yes, and then enter your API Key and the Authentication Code you generated in the previous section into theirrespective fieldsNow, go to checkout with a subscription product. You should see your Subscription Carrier shipping method.

Inside Subscribe Pro

Login to the Subscribe Pro Dashboard and select your environment in the top left dropdown.Navigate to System -> Shipping Methods and click "New" to create a shipping method entry with the same Carrier code and Method codeas was set in the ShipperHQ configuration. For example, shqflat_fixed.Contact   to have your Default Subscription Method set for your account to the above shipping [email protected]