From Manual Re-Entry to
One-Click Sync —
Salesforce CPQ Meets MYOB Advance
An Australian equipment sales business was re-entering every closed deal from Salesforce into MYOB Advance by hand. We built a direct Salesforce-to-MYOB Advance integration that syncs customers, sales orders, and invoices in a single click — eliminating double entry entirely for their Australia operations.
Six Integration Gaps That Blocked Seamless Order Fulfilment — and Six Fixes That Resolved Them
MyobAdvanceSingleOppSyncOrder orchestrator class that validates eligibility, syncs the customer, and creates the sales order in a single triggered action.upsertCardType() which checks MYOB by MYOB_Card_ID__c and creates a new customer only when one doesn't exist, storing the returned UID back on the Salesforce Account.SBQQ__Quantity__c, SBQQ__CustomerPrice__c, and the MYOB product UID without any manual entry.getMyobAdvanceInv() fetches the invoice and creates an Invoice__c record immediately, giving the sales team full visibility without leaving Salesforce.MYOB_Advance_Sync_Status__c and MYOB_Advance_Sync_Message__c log the outcome of every attempt so failures are visible, traceable, and actionable directly in the CRM.Five Phases That Took From Manual Double-Entry to Automated One-Click Sync
Mapped the Full Order Journey Before Writing a Line of Apex
We traced every data point from a Salesforce CPQ quote to a completed MYOB Advance sales order — identifying exactly which fields needed to map, which validations were required, and which failure modes had to be handled. This included confirming that Australian-only scope (AFQ_Company__c = 'Australia') was the correct business boundary before any integration logic was written.
Built a Two-Class Apex Architecture — API Layer Separate from Orchestration
We separated concerns cleanly: MYOBAdvanceAPI handles all HTTP communication (auth, requests, retries, 120s timeout) while MyobAdvanceSingleOppSyncOrder owns the business logic — validation, sequencing, and Salesforce record updates. This separation makes each class independently testable and means future changes to the MYOB API surface don't require changes to business logic.
Implemented Customer Upsert, Sales Order Creation, and Salesperson UID Caching
We built the full sync sequence: check or create the MYOB customer via upsertCardType(), look up the salesperson UID by name in MYOB and cache it on the Salesforce User record to avoid repeat queries, then create the sales order using a PUT operation so re-running sync updates rather than duplicates. All quote line items from the accepted Salesforce CPQ quote map automatically using stored product UIDs.
Closed the Loop — MYOB Invoice Written Back to Salesforce Automatically
After MYOB Advance confirms the order, we call getMyobAdvanceInv() to retrieve the generated invoice and create an Invoice__c record in Salesforce. The Opportunity's sync status field is immediately updated to 'Success' or 'Failed' with a message — giving the sales and finance teams a shared, real-time view of where every order stands.
Secured Credentials, Enforced Validation Gates, and Added Batch Error Resilience
We locked down all API credentials into Named Credentials and Custom Settings objects (client ID, secret, tokens — all separated from code), added pre-flight validation checks (Closed Won + accepted Quote + not already synced), and implemented try-catch-continue error handling so that a failure on one opportunity doesn't block others in any future batch processing scenario. Coverage runs from Australian-region filtering through to full HTTP retry logic.
The team was re-entering every closed deal from Salesforce into MYOB manually — slow, error-prone, and not scalable as order volume grew. Now the click happens once, and both systems are in sync. The finance team sees the invoice in MYOB; the sales team sees it in Salesforce. No phone calls, no chasing.
— Twopir Integration Team Lead · Australian Equipment Sales Business · Salesforce + MYOB Advance Project · 2024What Changed — In Numbers and in Practice
Complete order sync — customer, sales order, and invoice handled end-to-end
Clicking 'Sync Order to MYOB Advance' on a Closed Won opportunity triggers the full sequence automatically — no manual steps, no system switching.
Manual re-entry of order data between Salesforce and MYOB Advance
All CPQ quote line items — product codes, quantities, customer prices — map directly to MYOB sales order lines without human intervention.
Idempotent sync prevents duplicate customers or orders being created
PUT-based operations mean re-triggering the sync updates existing records instead of creating new ones — safe to run more than once without consequences.
Invoice records visible in Salesforce as soon as MYOB confirms the order
The feedback loop closes immediately — the sales team doesn't need to log into MYOB to check whether an invoice has been raised.
Every sync attempt tracked with status and error detail on the Opportunity record
Success or failure is recorded in structured fields, making troubleshooting fast and giving the operations team an audit trail for every Australian order.
Architecture designed to handle growing Australian order volume without rework
Salesperson UID caching, idempotent operations, and separated API and orchestration classes mean the integration scales cleanly as transaction volume increases.
Running a Similar Salesforce + Accounting Integration Challenge?
We'll review your current Salesforce-to-accounting data flow, identify where manual steps are slowing your team down, and outline the integration architecture. Free audit — findings delivered in 5 business days, no commitment required. We cover US EST, UK GMT, and AEST time zones.
The Tools and Techniques Behind This Engagement
Related Case Studies
Your team shouldn't be typing the same data twice
Twopir has connected Salesforce to accounting, ERP, and inventory systems for 500+ clients across the US, UK, Australia, and UAE over 12+ years — building integrations that are robust, secure, and built to scale with your business.
12+ Years · 500+ Clients · Salesforce Partner ·
Integrations: US · UK · Australia · UAE · Canada
