Web-to-Object From Custom Web Page

Hello, i am trying to integrate the form my friend have on his Wordpress website to the CMS.

Looked at the API Docs and found that Web-to-Object best suitable to what im trying to do.

Any way i dont have his credentials, i am build for him the function ready to put inside the wordpress, so i opened account (free for 14 days) only for this testing.

Thats what my json looks like:

The formId took from the landingId in the frontend script.

'formData' => [

                'formId' => '6c24a5e4-a08c-41c5-a868-19b49197a152',

                'formFieldsData' => [

                    ['name' => 'Contact', 'value' => 'Ohad Goldstein'],

                    ['name' => 'Contact.Mobile', 'value' => 'Ohad Goldstein'],

                    ['name' => 'Contact.JobTitle', 'value' => 'Ohad Goldstein'],

                    ['name' => 'Contact.Email', 'value' => 'Ohad Goldstein'],

                ]

            ]

to: https://008995-marketing.bpmonline.com/0/ServiceModel/GeneratedObjectWe…

I am always getting an error: 

{"SaveWebFormObjectDataResult":"{resultMessage:\"Not allowed request URL.\",resultCode:-1}"}

Even trying to request authenticate first (which succeed) -> grab the cookie -> and append him to this request header along with the BPMCSRF, and still this error.

I saw one old post with same error message and the respond was to update the domain to https://hooks....

But that was from zapier, what should i do for testing from my computer (localhost...) or later on when deployed the code and that will sent from the server ip probably.

One more question how can i edit the needed fields for the form in the admin panel ?

many of the form fields he want to pass does no configured in the leads table...

Thanks ahead

Like 0

Like

3 comments

Hello Ohad,



If you want to pass fields that are not present at "Lead" object, you should add them, so they will appear at "Lead" table. You should use object designer: https://academy.bpmonline.com/documents/technic-sdk/7-13/workspace-object-designer



In your case I recommend to create a simple landing page as it is described in article: https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-web-case-landing-pages



Then, catch the query that is sent to the bpm'online (in network tab in devtools or Fiddler). The function that you are trying to create, should perform similar query.



Development process is more convenient when you have a system that is deployed on your local machine: https://academy.bpmonline.com/documents/administration/7-13/deploying-bpmonline-application-site



Regards,

Alex 

Alex_Tim,

Hey Alex,

Thanks for the answer,

Where is that "The object designer workspace" located for creating my own custom objects ?

I think i was wrong for trying to use the Web-To-Object request, i am trying to send that request from the server side; i am getting success message when using the  "/0/dataservice/json/reply/InsertQuery" request. Am i right about this ? or still should use the "Web-To-Object"..

Ohad Goldstein,



Hello, dataservice (as well as entitydataservice) can be used for integration with bpm'online. InsertQuery request is used for creating entities. Feel free to use the dataservice as you wish. 



You can find designer in advanced settings menu in system designer. http://prntscr.com/n7vbs4



Regards,

Alex

Show all comments