Using Submarine with Shopify Flow

Rather than building functionality like email notifications, webhook triggers, or custom app-to-app integrations into the platform, Submarine instead offers a comprehensive Shopify Flow integration. This gives merchants the flexibility to connect Submarine to their existing systems and use Flow to build custom workflow logic - out of the box.

For example, a merchant already managing customer email templates in Klaviyo can connect the Upcoming Subscription Order trigger from Submarine to the Event action in Klaviyo, and deliver an email notification to the customer ahead of their next subscription order being placed. This helps keep customer data and custom email template management in the one place, rather than siloing it inside Submarine.

Going the other way, a merchant using Loyalty Lion may want to reward loyal customers with credit on their next subscription order. To do this, they could connect the Customer moved into “Loyal” segment trigger from Loyalty Lion to the Adjust subscription credit action (beta) in Submarine.

Triggers such as notifications are configurable based on merchant needs - you can see the list of available configurations and their default values in Submarine subscription configuration options.

Flow triggers

Payment action failed

A payment action (for example, authorisation or capture) failed to complete successfully.

NameTypeDescription
Customer emailEmailThe email address of the customer.
Payment amountNumberThe amount of the attempted payment (in cents).
Action URLURLA URL the customer can follow to take action to address the payment issue.
Error messageStringAny error message returned from the payment processor.

Upcoming subscription order

A subscription order is upcoming for a customer.

NameTypeDescription
Customer emailEmailThe email address of the customer.
Scheduled atStringThe date and time the order is scheduled to be placed (in ISO8601 format).
Total priceNumberThe total price of the upcoming order (in cents).
Action URLURLA URL the customer can follow to review their order.

Customer first subscription

A customer created their first subscription.

NameTypeDescription
Customer emailemailThe email address of the customer.

Upcoming card expiry

A stored credit card is expiring soon.

NameTypeDescription
Customercustomer
Type of cardstringThe brand of credit card (e.g. "visa").
Last four digitsstringLast four digits of the credit card.
Expiry datestringThe expiry date of the credit card (in ISO8601 format).
Action URLurlA URL the customer can follow to update their payment details.

Items removed from subscription

One or more items have been removed from a subscription, independently of any customer activity (e.g. a subscription product has been unpublished or deleted).

NameTypeDescription
Customercustomer
ReasonstringThe reason for the removal.
Total pricenumberThe revised price of the subscription order (in cents).
Variant IDsstringA comma-separated list of Shopify variant IDs that were removed.
Action URLurlA URL the customer can follow to review the subscription.

Subscription cancelled

A subscription has been cancelled by Submarine, independently of any customer activity (e.g. all subscription products have been unpublished or deleted).

NameTypeDescription
Customercustomer
ReasonstringThe reason for the cancellation.
Reason detailstringAdditional information about the reason for the status change.
Action URLurlA URL the customer can follow to review the subscription.

Subscription status changed

The status of a subscription has been changed, by the customer, the merchant or Submarine.

NameTypeDescription
Customercustomer
Subscription IDstringThe Submarine subscription ID.
ReasonstringThe reason for the change in status.
Reason detailstringAdditional information about the reason for the status change.
Previous statusstringThe previous status of the subscription, e.g. 'active'.
Updated statusstringThe updated status of the subscription, e.g. 'paused'.
Active subscription countnumberThe current number of active subscriptions the customer has.
Action URLurlA URL the customer can follow to review the subscription.

Subscription-item status changed

The status of an individual subscription item has been changed, by the customer, the merchant or Submarine.

NameTypeDescription
Customercustomer
Productproduct
Variant IDstringThe ID of the Shopify variant.
SKUstringThe SKU of the Shopify variant
ReasonstringThe reason for the change in status.
Reason detailstringAdditional information about the reason for the status change.
Previous statusstringThe previous status of the subscription.
Updated statusstringThe updated status of the subscription.
Active subscription countnumberThe current number of active subscriptions the customer has for the item.
Action URLurlA URL the customer can follow to review their subscriptions.

Flow actions

Update customer subscription status

Set the status of all of a customer's active subscriptions.

NameTypeDescription
customer_emailemailThe email address of the customer.
subscription_statusshort_textCan be either "paused" or "cancelled".

For more information on how Submarine works together with Shopify Flow, including flow build examples, see Submarine and Shopify Flow.