Skip to content
Log in

Transactional emails

On this page

StoreConnect includes a transactional email system for customizing the emails the platform sends automatically.

Transactional emails are routine emails sent to confirm when an action takes place. When a customer places an order through your store, StoreConnect sends emails at different stages of the order process, such as order payment success, order shipped, and order fulfilled.

For broader email configuration, see Set up StoreConnect emails.

How it works

Every transactional email is sent from your Salesforce org using Classic Email Templates, specifically Visualforce Email Templates. StoreConnect uses Visualforce templates for their flexibility, but any Classic Email Template can be used instead.

:::note Classic Email Templates are a Salesforce feature. Any template customizations should be done by a qualified Salesforce administrator or developer. :::

Which order fields drive the emails

Transactional emails are triggered by the values of three fields on the standard Order object. For more detail, see Order object reference.

Checkout Step (Order.Checkout_Step__c)

On installation, StoreConnect adds a Checkout Step field (Order.Checkout_Step__c) to the standard Order object. It is a text field, and it holds more values than a transactional email can use, including intermediate states and the -syncing and -finalized suffixes. These are the values a Transactional Email record can be keyed to:

  • open: the customer has added something to the cart.
  • customer: the customer is at the customer information step.
  • shipping: the customer is at the shipping step.
  • payment: the customer is at the payment step (shipping chosen).
  • complete: the customer has completed payment.
  • failed: the customer tried to pay but the payment failed.
  • quotation_requested: the customer requested a quote instead of paying.
  • pos-complete: the order was completed at a POS register.

See About order checkout steps for the full lifecycle.

Abandoned (Order.Abandoned__c)

The standard Order object also has an Abandoned checkbox (Order.Abandoned__c), FALSE by default. StoreConnect no longer sets it. Since version 20, abandonment is recorded on the Cart instead, and an abandoned cart is never written to Salesforce as an order; see Process empty and abandoned carts. The field remains a trigger input, so a Transactional Email record with Cart Abandoned checked can only match an order where someone has set Abandoned by hand.

Status (Order.Status)

StoreConnect also uses the standard Status field on the Order object. The default Salesforce setup has two statuses, Draft and Activated. Stores commonly use statuses such as:

  1. Draft
  2. Verified
  3. Backorder
  4. Picking
  5. Picked
  6. Shipped
  7. Fulfilled
  8. Canceled

The -syncing suffix

As an order progresses through its stages, a -syncing suffix may appear. For example, complete-syncing indicates the record has not yet fully synchronized from the StoreConnect ecommerce site.

Default email templates and triggers

When a Store record is first created, StoreConnect adds these Transactional Email records to it. Only Order Payment Success is enabled; check Enabled on each of the others you want to send.

Transactional email Checkout Step Cart Abandoned Order Status Enabled by default
Order Payment Success complete FALSE Draft Yes
Order Picking complete FALSE Picking No
Order Picked complete FALSE Picked No
Order Backorder complete FALSE Backorder No
Order Quotation Requested quotation_requested FALSE Draft No
Order Shipped complete FALSE Shipped No
Order Fulfilled complete FALSE Fulfilled No
Order POS Complete pos-complete FALSE Draft No

Stores created before the abandoned-cart emails were retired also have five Order Abandoned records. Each has Cart Abandoned TRUE, Order Status Draft, and a Checkout Step of open, customer, shipping, payment or failed. None of them send, because StoreConnect no longer sets Abandoned on an order. You can delete them or leave them disabled.

These records are added only at the moment a Store record is created, and only when the store has no Transactional Email records yet. Upgrading the package does not add rows to an existing store, so a store created before Order Quotation Requested or Order POS Complete existed will not have them. Create the record yourself using the values in the table above.

Change the email triggers

Each Transactional Email record on the store holds the trigger values and the template to send:

  • Checkout Step, Cart Abandoned and Order Status: all three must equal the order’s values exactly for the email to send. Cart Abandoned here is compared against Abandoned on the order; the two fields have different labels but hold the same thing.
  • Order Status on this record is free text, and it is compared against the order’s status picklist API value rather than its label. Nothing validates what you type, so a typo stops the email silently. If you have renamed or added statuses (see Set up order paths), create a record for each status you want an email for.
  • Classic Email Template API Name: the API name of the Classic Email Template to send.
  • Enabled: uncheck to stop that email without deleting the record.

The email templates

Each transactional email has a Classic Email Template you can edit to fit your branding. We recommend copying the template before editing, so you can revert to the original later.

StoreConnect includes these templates:

Transactional email Template name
Order Abandoned Open TEMPLATE_Order_Abandoned_Open
Order Abandoned Customer TEMPLATE_Order_Abandoned_Customer
Order Abandoned Shipping TEMPLATE_Order_Abandoned_Shipping
Order Abandoned Pre Payment TEMPLATE_Order_Abandoned_Prepayment
Order Abandoned Failed TEMPLATE_Order_Abandoned_Pay_Failed
Order Payment Success TEMPLATE_Order_Payment_Success
Order Picking TEMPLATE_Order_Picking
Order Picked TEMPLATE_Order_Picked
Order Backorder TEMPLATE_Order_Backorder
Order Shipped TEMPLATE_Order_Shipped
Order Fulfilled TEMPLATE_Order_Fulfilled
Order Quotation Requested TEMPLATE_Order_Quotation_Requested
Order POS Complete TEMPLATE_Order_POS_Complete

When the order’s Checkout Step, Abandoned or Status field changes, StoreConnect searches the enabled Transactional Emails on the order’s store, sends the one whose three trigger values match the order, and passes the Order and its Bill To Contact to the Classic Email Template. The email goes to the order’s Checkout Email, or to the contact’s email if Checkout Email is blank.

Stop transactional emails for a single order

  1. Open the Order you want to change.
  2. Uncheck the Send Confirmation Emails checkbox.
  3. Click Save.

This prevents future email notifications for that order. It does not stop POS receipts, which are controlled separately by the Send POS Receipt Email checkbox on the order.

Troubleshooting

Work through these in order when an order email does not arrive. The email is sent by a trigger on the Order, so everything it needs is on the order record and on the store’s Transactional Emails list. A standard order email that fails one of these checks is skipped silently, with nothing written to the order.

A POS receipt leaves a trace. Send POS Receipt Email is cleared once the receipt has been sent, and also when the order is skipped for a missing Store, Bill To Contact or email address. It is left checked when no enabled record matches the order, so a POS order still showing Send POS Receipt Email checked points straight at a trigger value mismatch.

  1. The email is not enabled for the store. Open the Store record and its Transactional Emails related list. Only Order Payment Success is enabled by default, so a picking, shipped or fulfilled email needs Enabled checked before it will send. If the list is empty, create the records using the table above.
  2. The trigger values do not match the order. Cart Abandoned and Order Status on the record must equal Abandoned and Status on the order, and Checkout Step must match on both. Compare the record with the order side by side. Order Status is free text and must be the picklist API value, so a spacing difference such as Back Order for Backorder stops the email without any warning. Casing does not matter. An order whose Checkout Step still ends in -syncing or -finalized matches nothing until the sync finishes.
  3. Send Confirmation Emails is unchecked on the order. No standard order email sends while it is unchecked. For POS receipts the flag is Send POS Receipt Email.
  4. The order has no Store, no Bill To Contact, or no email address. All three are required: Store, Bill To Contact, and either Checkout Email or the contact’s email. Orders created by hand in Salesforce often miss one of these.
  5. Nothing on the order changed. A standard order email sends only when Checkout Step, Abandoned or Status changes. Enabling a record or editing a template does not resend anything. To resend, set Status to another value, save, then set it back; the change that matches an enabled record sends its email. A POS receipt is different: it also sends when Send POS Receipt Email is checked, so re-check that box to send one again.
  6. The store’s sending address is not a verified organization-wide address. The store’s Mail From Address must exactly match a verified Organization-Wide Email Address. If it does not, Salesforce sends from the user whose update triggered the email (usually the StoreConnect sync user), and receiving mail servers may reject or junk it. See Setting up StoreConnect emails.
  7. Salesforce is not allowed to send, or has hit its limit. In Setup > Email > Deliverability, Access to Send Email must be All email. Sandboxes default to System email only, which is why emails that never appeared in a sandbox start arriving in production, and vice versa if the production setting was lowered. If the org has used its daily allowance for emails sent from Apex, sends fail until the limit resets.
  8. The template name is wrong. Classic Email Template API Name must be the API name of an existing Classic Email Template, not its label. A record whose template cannot be found sends nothing.

To confirm whether Salesforce attempted a send at all, request an email log from Setup > Email > Email Log Files for the period in question.

Was this article helpful?

Was this article helpful?