Skip to main content
Version: 8.0

Customize landings using Web-To-Object

Level: advanced

Web-to-Object is a mechanism for implementing simple one-way integrations with Creatio. It enables you to create records in Creatio sections (leads, cases, orders, etc.) simply by sending the necessary data to the Web-to-Object service.

The most common cases of using the Web-to-Object service are the following:

  • Integrating Creatio with custom landings and web forms. The service call is performed from a landing (a customized custom page with a web form), after the visitor submits the completed web form.

  • Integrating with external systems to create Creatio objects.

Using Web-to-Object will enable you to configure the registration of virtually any objects in Creatio (e.g., a lead, an order or a case).

The Landings and web-forms section is used to work with landing in Creatio. This section is available in all Creatio products, however it might not be enabled in workplaces of certain products (e.g., Sales Creatio). Each record in the Landing and web-forms section corresponds to a landing page. The record edit page features a Landing setup tab.

Implementing the Web-to-Object service

The main functionality of the Web-To-Object mechanism is contained in the WebForm package and is common to all products. Depending on the product, this functionality may be extended by the Web-to-Lead ( the WebLeadForm package), Web-to-Order (the WebOrderForm package), and Web-to-Case (the WebCaseForm package) mechanisms.

To process data received from a web-form of a landing, the WebForm package implements the GeneratedObjectWebFormService configuration service (the Terrasoft.Configuration.GeneratedWebFormService class). The data of the landing’s web-form is accepted as the argument of the public string SaveWebFormObjectData(FormData formData) method. They are then passed to the public void HandleForm(FormData formData) method of the Terrasoft.Configuration.WebFormHandler class, in which the corresponding system object is created.

External API of the Web-to-Object service

To use the service, send a POST request to

[Creatio application path]/0/ServiceModel/GeneratedObjectWebFormService.svc/SaveWebFormObjectData

For example,

http://mycreatio.com/0/ServiceModel/GeneratedObjectWebFormService.svc/SaveWebFormObjectData

The content type of the request is application/json. In addition to the required cookies, the JSON object containing the data of the web-form must be added to the content of the request. JSON object example:

{
"formData":{
"formId":"d66ebbf6-f588-4130-9f0b-0ba3414dafb8",
"formFieldsData":[
{"name":"Name","value":"John Smith"},
{"name":"Email","value":"j.smith@creatio.com"},
{"name":"Zip","value":"00000"},
{"name":"MobilePhone","value":"0123456789"},
{"name":"Company","value":"Creatio"},
{"name":"Industry","value":""},
{"name":"FullJobTitle","value":"Sales Manager"},
{"name":"UseEmail","value":""},
{"name":"City","value":"Boston"},
{"name":"Country","value":"USA"},
{"name":"Commentary","value":""},
{"name":"BpmHref","value":"http://localhost/Landing/"},
{"name":"BpmSessionId","value":"0ca32d6d-5d60-9444-ec34-5591514b27a3"}
]
}
}

Using the Web-to-Object service

Integrating with custom landings and web-forms

Integrating with external systems

To integrate with external systems:

1. Create a new record in the Landing and web-forms section

2. Get the address to the service (serviceUrl property) and the identifier (the landingId property) from the configuration object of the created record.

3. Implement the process of sending a POST-request to the Web-to-Object service (at the received address) in the external system. Add the necessary data to the request in form of a JSON object. Set the value of the received identifier to the formId property of the JSON object.