Skip to content
Install for free
English
EnglishFrenchSoonItalianSoonJapaneseSoonSpanishSoonPortuguese (Portugal)SoonGermanSoonCzechSoonDanishSoonFinnishSoonKoreanSoonNorwegian (Bokmål)SoonDutchSoonPolishSoonPortuguese (Brazil)SoonTurkishSoonChinese (Simplified)SoonChinese (Traditional)Soon
Open in Claude Ask questions about this pageOpen in ChatGPT Ask questions about this page

Automations and Shopify Flow

Choose which application events send emails and Shopify Flow triggers, and build Flow workflows that approve, reject or question applications.

Every time an application moves, Sami B2B Onboarding fires an event: received, revised, approved, rejected, and so on. On the Automations tab, each event has one switch. The switch controls the emails the app sends for that event and the Shopify Flow trigger it publishes. In Shopify Flow, you can start your own workflows from those triggers, and use the app’s actions to approve, reject or ask for more information.

Event When it fires Emails it sends
Application received When a buyer submits an application Application received (to the buyer), New application (to your team)
Application revised When a buyer answers a request for information Buyer resubmitted (to your team)
Application approved When an application is approved, by a person, a rule or a Flow action Account approved (to the buyer)
Revision requested When you ask a buyer for more information More information needed (to the buyer)
Application rejected When an application is rejected Application declined (to the buyer)
Company created When an approval creates the Shopify company None. It only publishes a Shopify Flow trigger.

All six events are on when you install the app.

  1. In the Shopify admin, open Sami B2B Onboarding, click Automation in the app menu, then click the Automations tab.

    The Triggers card lists the six events. Each row shows:

    • The event’s name and when it fires.
    • What it does, for example “Emails: Application received (to the buyer), New application (to your team) · Publishes a Shopify Flow trigger”.
    • How often it ran this month: No runs, 1 run this month or “12 runs this month”. Each email and each Flow trigger the event sent, or tried to send, counts as a run.
  2. Turn the switch at the end of the row off or on. The tab’s count shows how many events are on.

  3. Click Save in the save bar. You see Automation saved.

The Triggers card listing six events, all switched on, each with when it fires, the emails it sends and its runs this month, from 12 runs this month to No runs.

Each row says which emails the event sends and how often it ran this month.

An email goes out only when its event is on and the email itself is turned on. Each application email has its own switch in the form builder’s Email section, so you turn it on or off one form at a time. The Application declined email starts turned off, so buyers aren’t told about a rejection until you turn it on. See Edit email templates. The “to your team” emails go to the people in Choose who gets notified.

The Recent runs card on the right of the Automations tab shows the last five things the app sent or wrote, newest first: emails, Shopify Flow triggers, and updates to the buyer’s Shopify customer and company. Each line gives the event and the company, then the result and the time, for example “Application received · Acme Supply Co.” and “Email sent”. The dot is green when it worked and red when it failed.

Click View all to open Settings › Activity log on its Emails view, with the full history. See Activity log.

The Shopify Flow card sits above Recent runs. Its badge tells you how the last trigger went:

Badge What it means
Triggers available The triggers are ready, and nothing has been published yet. The first application event will send one.
Published and a time, for example “Published 2 hours ago” The last trigger reached Shopify Flow. The card names it and the company, for example “Last trigger: Application received · Acme Supply Co.”
Publish failed and a time Shopify Flow didn’t take the last trigger. The card shows the reason.
Not connected Shopify Flow triggers aren’t connected to this store yet. The switches control emails only.

Unless the badge reads Not connected, the card also lists the actions a workflow can run, and has an Open Shopify Flow button that opens Shopify Flow in a new tab.

The Shopify Flow card with a green Published just now badge, the last trigger Application approved · Oak & Ember Café, the actions list and the Open Shopify Flow button, above the Recent runs card.

The badge shows how the last trigger went, and Open Shopify Flow takes you straight to Flow.

In Shopify Flow, the app’s triggers and actions are listed under Sami B2B Onboarding.

Triggers. There’s one trigger for each event above, with the same name. Each trigger carries these details about the application:

Detail What it holds
Application ID The application’s number in the app. Use it in the app’s Flow actions.
Reference The application reference your team sees on the application.
Company name, Contact name, Contact email From the buyer’s answers.
Country The buyer’s two-letter country code, for example US.
Status The application’s status.
Admin URL A link to the application in the app, for messages to your team.

The Company created trigger also carries the Shopify company, so a workflow can read it and use Shopify Flow’s own company actions on it. It’s published only when the approval created a company in Shopify.

Actions. A workflow can decide an application the way a reviewer does. The same emails and events follow.

Action Fields What it does
Approve application Application (required), Preset name Approves the application, creates the Shopify company with the preset’s terms and emails the buyer.
Reject application Application (required), Reason Rejects the application. The reason is shown to the buyer in the decline email.
Request more information Application (required), Message to the buyer Asks the buyer for more information, with your message in the email. The application waits until they answer.

In Application, use the trigger’s Application ID (the applicationId variable), or paste the reference shown on the application. Type Preset name exactly as the preset is named in the app. If you leave it empty, the application is approved without a preset’s terms. The default preset isn’t used.

This workflow approves every application from the United States with the Wholesale standard preset.

  1. On Automation › Automations, make sure Application received is on. The Shopify Flow card’s badge shouldn’t read Not connected. If you don’t have Shopify Flow yet, install it from Shopify first. See Shopify Flow in the Shopify Help Center.

  2. Click Open Shopify Flow on the card. In Shopify Flow, click Create workflow, then Select a trigger. Search for Application received and pick the one from Sami B2B Onboarding.

  3. After the trigger, add a condition. Click Add a variable and choose country, leave Equal to, and type US. Shopify Flow saves the workflow as you go.

  4. On the condition’s true branch, add an action. Search for Approve application and pick the one from Sami B2B Onboarding. Then fill in its fields:

    • Application: click Add variable under the field and choose applicationId. The field then reads {{applicationId}}.
    • Preset name: type Wholesale standard.
  5. Click Turn on workflow. Shopify Flow now runs it for every new application.

  6. Submit an application from your storefront as Acme Supply Co., with United States as the country. Once the workflow has run, the application’s status on Companies › Applications reads Approved, and Jordan Lee gets the Account approved email. The workflow’s run appears in Shopify Flow’s run history.

A Shopify Flow workflow that starts with Application received, checks that Country equals US, then runs Approve application with the Wholesale standard preset.

The workflow passes the trigger’s Application ID to the Approve application action.

A step that can’t run fails on the workflow’s run in Shopify Flow, with one of these messages:

Message Why What to do
No application matches that ID or reference. The Application field is empty or wrong. Use the trigger’s applicationId variable.
This application was already decided (…). It was approved, rejected or closed before the step ran. Nothing, or check which rule decided it.
Can’t approve until these answers are filled in: … A required answer that’s mapped to Shopify is empty. Ask the buyer for it, or fill it in on the application.
No preset is named “…”. Preset name doesn’t match a preset. Correct the name, or rename the preset.

If the step asks for the decision the application already has, for example approving an approved application, it reports Already done. and doesn’t fail.

Was this helpful?