Page 1 of 1
CRM Integration With Formbuilder
Posted: Thu May 04, 2023 3:26 pm
by govicinity
CMS Made Simple™ 2.2.16 “Truro”
CMSMSExt 1.0.1
FormBuilder 1.2
SmartyExt 1.0
ECB2 2.2
SimpleSiteMgr 3.7
I am looking to integrate a CRM with our Formbuilder form, so far I have got everything to work well using:
*Submit to an arbitrary form action
This works really well with all Text Input fields, but I can't for the life of me get it to work with the Text Area field, if I remove the text area field then it will talk to the CRM, but if I use the text area field then it doesn't talk properly.
Can someone point me in the right direction of what to put into the advanced settings for the Map field "FieldName" to form submission variable: for a text area? It would save me a few grey hairs.
Thanks in anticipation.
Re: CRM Integration With Formbuilder
Posted: Fri May 05, 2023 1:25 pm
by DIGI3
Do you know what's actually failing when it goes to the CRM, like is it mismatching fields or truncating information or...? My initial guess would be it's not escaping the content of the textarea or something, but without knowing more about the process it's hard to tell. I'd probably start by outputting the result to the screen or capturing the POST so you can look at what it's trying to send.
Re: CRM Integration With Formbuilder
Posted: Mon May 15, 2023 10:31 am
by govicinity
Basically, everything is going through except the text area (longer text part of the email form - all the other input is working), that's the only thing that's failing.
This is the information I have from the CRM supplier:
We know it is not truncating as we have tested the submission with less that 20 chars. Would you be able to provide the forum with the JSON script for notes that we attempted to post to as they may be able to advise whether the format needs changing.
Code: Select all
{
"FirstName":"Bob",
"LastName":"Way",
"CompanyEmail":bob@domain.com,
"CompanyName":"BoB Test",
"AdditionalFields":"contact_phone:=:078464868899",
"Notes":"summary:=:Nature of your Enquiry[/]body:=:Details go here"
}
And here is what we have in the form itself to map the fieldsets:
Thanks so much for your help.
Re: CRM Integration With Formbuilder
Posted: Mon May 15, 2023 7:26 pm
by Jo Morg
Code: Select all
{
"FirstName":"Bob",
"LastName":"Way",
"CompanyEmail":bob@domain.com,
"CompanyName":"BoB Test",
"AdditionalFields":"contact_phone:=:078464868899",
"Notes":"summary:=:Nature of your Enquiry[/]body:=:Details go here"
}
I just checked an online json validator and CompanyEmail field doesn't validate at all. That might be a point to start.
Re: CRM Integration With Formbuilder
Posted: Tue May 16, 2023 9:24 am
by govicinity
Hi Jo,
That may have been my error putting the email into the forum post, they did actually have quote marks on theirs, which makes it validate correctly... I just changed the email so it wasn't the client's... the email was coming through perfectly, but just the Notes did not.
So should have been...
Code: Select all
{
"FirstName":"Bob",
"LastName":"Way",
"CompanyEmail":"bob@domain.com",
"CompanyName":"BoB Test",
"AdditionalFields":"contact_phone:=:078464868899",
"Notes":"summary:=:Nature of your Enquiry[/]body:=:Details go here"
}
Which validates perfectly, but the: "Notes":"summary:=:Nature of your Enquiry[/]body:=:Details go here" part does just not come through.
Re: CRM Integration With Formbuilder
Posted: Tue May 16, 2023 12:57 pm
by DIGI3
Isn't the Notes field mapped to "Summary" and not "summary"? In your json template it's a lowercase S.