Sales dashboard

Connect the dealership’s Google accounts

The sales tracker can exchange records with a private Google Sheet and track replies from both sales inboxes. Each connection runs in a standalone Google Apps Script owned by the dealership. Install each connection once.

Prepare the connections

  1. The site administrator generates a different random key of at least 40 characters for each channel using a password manager. Store each key as a site environment secret under its name below. Give each operator their own channel key through the dealership’s secure password manager.
  2. Create a separate standalone Apps Script project for each channel. Keep script editor access limited to account administrators. Share the resulting spreadsheet with staff who need its records.
  3. In each project open Project Settings, enable the appsscript.json manifest, and under Script Properties set BRIDGE_KEY to that channel’s key. Set SITE_ORIGIN to the full HTTPS origin of the dealership server, with no path. Use separate keys, projects and a test database on staging. Allow Google Apps Script to reach /api/google/bridge/ over HTTPS. Each channel authenticates with its own server key.
Google account / channelSite secret
[email protected]MVE_MAJOR_MAIL_KEY
[email protected]MVE_GREAT_MAIL_KEY
Private spreadsheetMVE_SHEET_KEY

For a transfer, coordinate the last mailbox and sheet sync with the database snapshot. Keep the saved cursors and workbook ID when moving an existing connection for the same data. Point each production script at the new origin only after the team verifies staging. Starting a new mailbox connection begins tracking at installation time. Install both mailbox triggers before accepting inquiries. If customers have already inquired, open their tickets in Sales Desk and follow up there.

Connect a sales inbox

  1. Sign in as the sales mailbox that owns this connection. Paste the shared connection code and the mailbox code into two script files. Replace the manifest with the mailbox manifest. Enable the Gmail API under Services in the script or its associated Google Cloud project.
  2. To deliver each new inquiry to both sales inboxes, set this in both mailbox projects. Add the Script Property SEND_STAFF_NOTICES with value yes. Alerts go to the sales mailbox and include the buyer’s address as Reply-To when available.
  3. Run installMail once and authorize the requested Google permissions. Repeat using a separate project in the second sales account. The script checks about every ten minutes. Replies sent from Gmail should retain the ticket number in the subject. Matching messages between the buyer and the connected sales mailbox appear in the ticket’s activity history. Phone conversations can be logged by staff.

Connect the spreadsheet

  1. Use the authorized Google account that should own the tracker. Paste the shared connection code and the spreadsheet code into two files in its own project. Replace the manifest with the spreadsheet manifest. Enable the Google Sheets API under Services or in the associated Cloud project.
  2. Run installSheet and approve Google access. It creates a private tracker with tabs for Sales Tickets, Contacts, Activity History and Subscribers. Open the tracker from the execution log or staff dashboard and share it only with the team members who should see buyers’ records.
  3. Use the Sales Tickets columns Set stage, Set owner, Set next owner or Set follow-up, then check Apply changes. Use staff email addresses, dates in YYYY-MM-DD format, or CLEAR to remove an assignment or date. The result column confirms each edit. To record a sale, open the ticket in Sales Desk, select Sold, confirm the stock number and choose its front-facing photo. Use Sales Desk for further stage changes to a sold ticket. If another team member updated the ticket first, clear the pending inputs, run syncSheet and review the current ticket before trying again.
  4. Automatic Spanish editions use the same Sheet connection. For an existing connection, update the spreadsheet script and run installBlogTranslation once. New installations start it through installSheet. The scheduled worker requests only published English blog copy. After each complete translation, its Spanish page and archive entry become available. If processing pauses, check Apps Script Executions and the project’s translation quota.
  5. Updates are checked about every ten minutes in pages of 100 records per tab. For a large tracker, additional runs complete the sweep. Before using a subscriber export for a mailing, pull the current subscribed list from the dashboard and include each recipient’s own unsubscribe link.

Prepare a newsletter

In the spreadsheet project, add the optional newsletter draft and mail-merge code. Run createNewsletterDraft to create a private draft workbook. Enter the subject, your new bus arrivals or dealership news, and the language on the Draft tab. Run refreshNewsletterRecipients to rebuild the Mail merge tab from current opt-ins. Each row contains its own message, dealership signature and personal unsubscribe link.

Refresh immediately before sending, and check that the Draft tab says Ready. Your team can review the messages in this workbook and use an approved mail-merge sender to deliver each recipient’s own message. For automatic emails when a new bus is published, follow Connect new-arrival emails.

Check the connection

If an inquiry reaches Sales Desk but an inbox stays empty, check that mailbox’s last sync, its Apps Script Executions log, the ten-minute trigger, and its SEND_STAFF_NOTICES setting. Fix its key or Google authorization and run syncMail to resume from the saved cursor. The website saves the ticket before any email is sent. The dashboard reports the last successful check for each connected channel. The entries appear after its first successful run. To disconnect a channel, remove its script trigger and remove that channel’s key from the server configuration and restart the service. These projects can also be managed in Google Apps Script triggers.