Question
The legacy Salesforce integration included a bulk-sync function. How can I do something similar using the new Salesforce integration?
Answer
As described in the article Configuring Data Sync from Salesforce to Zendesk:
A data sync is triggered when a mapped field is updated in an existing Salesforce record, or a new record is created. Any unmapped fields that are updated do not trigger the sync.
The legacy integration did not fire when records were created or updated either in bulk or using the Salesforce API. This meant that a bulk-sync was sometimes required to update Zendesk for any records created/updated in this fashion.
The new Salesforce integration does not have this limitation. Bulk updates/API updates trigger a sync over to Zendesk, provided one of the mapped fields is changed. The following workflow outlines how to accomplish a bulk-sync-like function by updating many records in SFDC via the API.
For information on how to check your current rate-limit usage, see How can I check my Streaming API limits and usage?.
Although the following example deals specifically with account-syncing, a similar method can sync Contacts or Leads. While this explanation includes the creation of a new custom field within Salesforce, a checkbox field is not required for this method. The only requirement is that a non-formula field is present in SFDC and mapped within Admin Center which can be modified in bulk to trigger the streaming API event on which the sync is based.
Here are steps to sync many records quickly using two built-in SFDC tools:
-
Create a custom checkbox organization field in Zendesk called Sync with Salesforce.
-
Create a checkbox account field in Salesforce called Sync with Zendesk with a default value of False.
- Map the two fields to each other in the Admin Center:
https://SUBDOMAIN.zendesk.com/admin/platform/integrations/salesforce/accounts_organizations
- Create a report in SFDC that includes two pieces of information:
- SFDC account ID
- The Sync with Zendesk account-field from step 2
- Export the detail rows of the report from step 4 as a CSV.
- In the spreadsheet editor of your choice, update the Sync with Zendesk column of the CSV file to be True.
- Import the updated CSV back into SFDC (using a tool such as Dataloader) to update all of the accounts.
(be sure you use the BATCH API and not the Bulk API for this Upsert/Update)
- After updating the SFDC records, allow some time to ensure that the background jobs have time to complete. This timeframe varies depending on the number of records to be synced. For a few hundred records, this might only take a few minutes. For tens of thousands of records, it might take thirty minutes to an hour.
- Once all of your records synced, remove the mapping from step 3 and delete the fields created in steps 1 and 2. Alternately, you can leave them in place for later in case you need to manually trigger a sync in the future.
13 Comments
I got to say that your new ZD SFDC integration does not meet my expectations to say the least.
We got a new integration with less functionality, no bulk sync and with less field types that we can map (and those are just the things I encountered).
You really should be doing a better job.
This new integration has been a challenge. That said, the management of the mapping ins zendesk rather than SFDC is a welcome benefit
Hello Dwight,
Quick question here, the article makes no mention of Matching Criteria for the bulk update. If the criteria is set to a custom field like SFDC ID, are there an additional steps required?
Hi Sophie,
We're working on getting more field types supported for syncing, so hopefully we can be closer to feature parity shortly. That said, we're a bit constrained in terms of what we're able to sync due to limitations of the Salesforce Streaming API Events, which we rely on for our sync mechanism. Salesforce explicitly excludes Long Text Area fields from those streaming events, likely due to the size those fields can occupy, which ties our hands, so to speak.
Hi Dave,
I've not seen any change of behavior described above based on Matching Criteria: how those accounts are matched to orgs shouldn't affect their ability to sync. As such, if you're seeing your matching criteria work properly on individual updates, they should function identically when making these kinds of bulk updates.Please let me know if you see otherwise.
Thank you!
Hi Dwight,
Thanks for replying.
The think that is more important to me is a bulk sync that can be performed easily and not having to do the workaround mentioned above.
Best,
Sophie
HeyO Sophie,
Thanks much for that additional context. I believe this was a feature that our Developers were looking to build, but because the new integration supports the API/bulk updates used above, I believe it was set as a lower priority. I will check to see if there are plans to build such a feature at some point down the road.
Ok, thanks Dwight.
Dwight, I guess for a bulk sync of accounts and contacts you Developer should just take a look at importing a dataloader export natively into Zendesk. Field mappings are already known from the sync settings, so there should just be an upload method of the dataloader file.
Hi Rob - that's a good idea; thanks for the suggestion.
I believe they're looking to build a bulk-sync of our own into the product, so hopefully we won't need to cobble the two systems together, but I'll pitch that thought to them and see what they have to say.
Cheers!
Next step up from my suggestion is starting bulk rest-query of accounts and contact from your product. And run the same import for each record as the import you're using for the streaming updates. I believe you can retrieve about 1000 records in a single salesforce rest call, so the salesforce api call restrictions shouldn't be a problem.
We've tried this twice and it hasn't worked for us. What am I missing?
Alternatively if we download from SF and upload into Zendesk using the correct external ID, the next time a mapped field is changed from Salesforce will it recognise that the 2 are linked?
New contacts are syncing great but this bulk sync process isn't working at all.
Jonny Wermut
I'm not sure why this bulk-sync process wouldn't be working for you. I'll check to see if you've already got a ticket going with our Support team on this matter and create one if necessary so that someone can contact you to discuss and look into the specifics of your case more closely.
Please sign in to leave a comment.