fbpx

Setup Integration for Records Deleted in Salesforce (optional)

Accord Sync allows you to delete records from Salesforce to QuickBooks Online by leveraging Salesforce flows and triggers. For each object that you want to allow deleting the record in QuickBooks when a record is deleted in Salesforce, you will have to check the Allow Delete checkbox for the QuickBooks object. Then, create a flow to create a platform event to trigger the sync that will delete the QuickBooks record when the Salesforce record is deleted.

NOTE
Real-time integration from QuickBooks to Salesforce is handled by Webhooks. If Webhooks have been setup for your integration, enabled for each QuickBooks object, and Allow Delete has been enabled then real-time integration is already setup for records being deleted in QuickBooks.

Configure Flow to Delete QuickBooks Record

  1. Navigate to Setup.
  2. Go to Home > Process Automation > Flows in Setup.
  3. Click New Flow.
  4. Configure the Start of the flow:
    • Select the Salesforce Object that will have its records deleted from QuickBooks.
    • Trigger the flow when A record is deleted.
    • Enter any condition requirements you would like if you wanted to limit the records that get deleted from QuickBooks otherwise leave it as None.
      • If not all records are synced for the selected Salesforce Object, then you will need to add a condition that the Accord QB Id is not NULL to prevent errors.
    • Optimize the flow for Before the record is deleted.
    • Click Done.

  5. Create a Get Records action
    Label: Get Accord Record Status
    API Name: Get_Accord_Record_Status
    Description: Retrieves the related Accord Record Status.

    Object: Accord Record Status

    Condition Requirements: All Conditions Are Met (AND)
    Field: appclipse__SF_ID__c
    Operator: Equals
    Value: $Record > Record ID

    How Many Records to Store: Only the first record
    How to Store Record Data: Automatically store all fields

  6. Create a Create Records action.
    Label: Publish Event
    API Name: Publish_Event
    Description: Publishes a QBO Sync platform event to delete a record in QuickBooks.

    How Many Records to Create: One
    How to Set the Record Fields: Use separate resources, and literal values
    Object: QBO Sync

    Set Field Values for the QBO Sync
    Field: appclipse__Id__c
    Value: $Record > Accord QB Id

    Field: appclipse: Operation__c
    Value: Delete

    Field: appclipse__Platform__c
    Value: Salesforce

    Field: appclipse__QB_Company_Id__c
    Value: $Record > Accord QB Company Id

    Field: appclipse__Type__c
    Value: Accord Record Status from Get_Accord_Record_Status > Type
  7. Save the flow.
  8. Activate the flow.

Repeat these steps for each Salesforce object that you wish to set up an integration for deleted records.

Next Step
If you are using batch integration: Schedule Batch Integration(s)

If not, then your integration has been completed between QuickBooks Online and Salesforce. Continue to monitor the sync and manage errors that appear.

Go to Top