Following on from my initial post about FormAssembly and Salesforce, here are some advanced techniques.
We use a particular technique with our FormAssembly forms and Salesforce when it comes to looking for existing contacts, creating new ones, and doing further updates on Salesforce.
The Form Submitted connector runs after the user clicks the submit button. Once it's finished the user gets the acknowledgement message, or gets redirect to the page saying it's worked. The reason we put some of our processing here, is because if it fails the user gets told with an error message. If we used the After Form Submitted connector then they wouldn't see the error message they would think it worked. Although we get emails if the connector fails, it may be a few days before someone gets round to reading that email and contacting the user to say it didn't work.
The error message won't mean much to them, as it'll be Salseforce jargon, but hopefully they'll pass it onto us and we can help them. Or if it's something that is fixable (e.g. an invalid email address) then they may retry. (FormAssembly email validation lets email addresses through that Salesforce says are invalid.)
So in the Form Submitted connector we look up the user by email, and create a contact if they don't exist. If they do exist we also take the opportunity to update fields, like their name. Then in the After Form Submitted we look them up again. We know this will work, because the previous connector created them if necesssary. Then we do whatever the form requires, e.g.
- if they're signing up for a subscription then add them to a campaign
- if it's something we need to do, create a case
- if it's giving consent for something, add a consent (we use GiveClarity's own consent system)
No comments:
Post a Comment