0

I am using the Salesforce Suite to push Entity Registrations to Salesforce in our commerce workflow. The problem I am experiencing is that there is no checks to first see if the registrant exists before creating a new one. At the moment every registrant is a duplicate.

How can I make it do the following? Seems like it should be pretty straight forward but isn't there...

  • Check to see if Registrant exists based on a set of fields (email, first name, last name)
  • If so, update that record with information that is different and obtain the SFID
  • If not, create and obtain the SFID

This should be available regardless of record type, you should be able to check if something exists based on a series of fields.

If it needs to be done via a hook, I have been looking for documentation on how to use the Salesforce hooks to handle this but I can't find anything, so if you have any examples of how this can be done it would be awesome if you could share!

Looks like some work was done here for D6, https://www.drupal.org/node/507800 but it doesn't look like the changes were applied to the D7 rewrite.

1 Answer 1

0

I have solved this myself utilizing the hooks provided in the Salesforce Suite module. I wrote details about it in a 2 part blog post.

Customize Syncing Between Drupal Commerce and Salesforce – Part 1

1
  • Hi Travis Johnston, do you have the same for drupal 8? Commented Dec 2, 2022 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.