When working with external integrations and web services, it's common to store JSON responses in text fields within Creatio. The problem? Reading raw JSON in a plain text field is painful for end users.

I built a custom Angular component that renders any JSON string as an interactive, collapsible tree — directly inside a Freedom UI page.

What it does:
• Displays JSON as an expandable/collapsible tree
• Color-codes data types (strings, numbers, booleans, nulls)
• Expand all / Collapse all buttons
• Dark theme with encapsulated styles

The interesting part — Property binding
The trickiest part of the development was figuring out how passes properties to custom Angular elements. The key was using the @CrtInput decorator with propertyBindable: true, which tells the framework that the property accepts binding from the viewModel. Once that was in place, the component binds cleanly to any viewModel attribute using standard Freedom UI syntax.

This means you can feed it data from entity fields, external service responses, or values computed in handlers — all without touching the component itself.

If you're working with JSON data in Creatio and want to give your users a better experience, feel free to reach out via direct message.

Like 6

Like

Share

3 comments

This looks great 👍🏻

That's amazing! Is there an easy way to export the JSON content from this component?

Paulo Victor Figorelli,

Hi Paulo! How are you? Do you mean to export as Text, for example a button to copy and paste the json? or automatically to download the json content in a file for example? That's a good feature to add. It's simple. I'll add it.

Show all comments
json
collection
subprocess
Studio_Creatio_enterprise_edition
8.0

Hi all,

I am running a process to deserialise a JSON string from a webhook and pass the results (an email address and a state) into a sub process.

The deserialisation step works as I can see the results which have been passed into the collection of records parameter in the process log (only 1 in this sample):
Collection parameter

Parent process
                {
            "Parameter": "Bouncebacks",
            "Value": {
                "Before execution": [
                    {
                        "email": "billy.bob@river.com",
                        "__state__": "bounced"
                    }
                ],
                "After execution": [
                    {
                        "email": "billy.bob@river.com",
                        "__state__": "bounced"
                    }
                ]
            }
        }

  I pass this collection into a sub-process but the values don't appear to pass in correctly:

Parent process

//Sub process
        "Process parameters": [
        {
            "Parameter": "Email",
            "Value": {
                "Before execution": null,
                "After execution": null
            }
        },
        {
            "Parameter": "State",
            "Value": {
                "Before execution": null,
                "After execution": null
            }
        }
    ]      

  I cannot figure out why not. Any ideas?      

Like 0

Like

2 comments
Best reply

Hi Cris, you can pass parameters to the process and execute it directly from the script element where you're parsing JSON like this:

UserConnection userConnection = Get<UserConnection>("UserConnection");
IProcessEngine processEngine = userConnection.IProcessEngine;
IProcessExecutor processExecutor = processEngine.ProcessExecutor;
var nameValues = new Dictionary<string, string>();
nameValues["Parameter1"] = someValue1.ToString();
nameValues["Parameter2"] = someValue2.ToString();
processExecutor.Execute("UsrProcessName", nameValues);

this line 

processExecutor.Execute("UsrProcessName", nameValues);

will always execute the latest active version of the process. So if you create new version of the UsrProcessName it will be run without need to update the script. Naturally this code should be included into your original cycle where the parsing itself is performed.

Hello.

Passing parameter values of collection types is not supported for compiled process schemas. 
Therefore, to resolve this, it is recommended to create a new process schema.
The diagram contains task elements that include source code, so the code logic should be moved into a source-code schema. Then, in the business process schema, create an instance of that class and call its methods.

Best regards,
Antonii.

Hi Cris, you can pass parameters to the process and execute it directly from the script element where you're parsing JSON like this:

UserConnection userConnection = Get<UserConnection>("UserConnection");
IProcessEngine processEngine = userConnection.IProcessEngine;
IProcessExecutor processExecutor = processEngine.ProcessExecutor;
var nameValues = new Dictionary<string, string>();
nameValues["Parameter1"] = someValue1.ToString();
nameValues["Parameter2"] = someValue2.ToString();
processExecutor.Execute("UsrProcessName", nameValues);

this line 

processExecutor.Execute("UsrProcessName", nameValues);

will always execute the latest active version of the process. So if you create new version of the UsrProcessName it will be run without need to update the script. Naturally this code should be included into your original cycle where the parsing itself is performed.

Show all comments
Freedom_UI
API_Integration
iframe
json
External_API
Creatio_Configuration
Custom_UI
Studio_Creatio
8.0

Hi Creatio Community,

 

I am looking to consume my own or an external API that returns a JSON response and embed an IFRAME inside a Creatio Freedom UI page to display the relevant data.

 

My Goal:

Call an API that responds with JSON data.

Display the API response inside an IFRAME in Freedom UI.

Ensure the IFRAME updates dynamically based on API data.

  •  

My Questions:

  1. What is the best way to embed an IFRAME inside a Freedom UI page?
  2. How can I dynamically set the IFRAME's src based on API response data?
  3. Are there any security or CORS restrictions I should be aware of when using an external API?

     

If anyone has experience implementing this in Freedom UI or has sample configurations, I'd love to hear your insights!

 

Thanks in advance!

Like 1

Like

1 comments
Best reply

You can see an example of embedding an IFRAME and setting the src of the IFRAME dynamically here: https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/

However, an IFRAME cant just display data from an API. An IFRAME simply embeds another page, it would be the responsibility of the page you're embedding to retrieve and display the API data. 

You could however, use a similar approach to the article for creating an IFRAME and just have that component retrieve the API data and render out HTML as needed. Alternatively, you could create a full Angular component that retrieves and displays the API data, which is likely a better route anyway. See https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-remote-module/overview 

As for CORS restrictions, that would be something imposed (or not) by the API, not Creatio.

Ryan

You can see an example of embedding an IFRAME and setting the src of the IFRAME dynamically here: https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/

However, an IFRAME cant just display data from an API. An IFRAME simply embeds another page, it would be the responsibility of the page you're embedding to retrieve and display the API data. 

You could however, use a similar approach to the article for creating an IFRAME and just have that component retrieve the API data and render out HTML as needed. Alternatively, you could create a full Angular component that retrieves and displays the API data, which is likely a better route anyway. See https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-remote-module/overview 

As for CORS restrictions, that would be something imposed (or not) by the API, not Creatio.

Ryan

Show all comments
json
webhooks
Studio_Creatio
8.0

Hello 

How can I get the information of this json to put in different fields so I can use them in business process. 

 

{"signer_data":{"name":"laura@artica.digital","authority":"Vinculada a Correo Electrónico por Liga","id":1655735,"email":"laura@artica.digital","fingerprint":"66bf3e0a67ba87d5aeae33e5e98db771968aae83","box_id":"wxjXMgLPz","box_data":"laura@artica.digital","signature_date":"2024-12-19T19:31:59Z"},"signer_email":"laura@artica.digital","signer_fingerprint":"66bf3e0a67ba87d5aeae33e5e98db771968aae83","signer":1655735,"user":233645,"notification_type":"original_signed","notification_id":"3639332","first_notification_date":"2024-12-19T19:32:03Z","document_title":"INFONAVIT. PM005690004564500002NUEVA ASIGNACION SIN BORRADO (1).pdf","firmamex_id":"af8b17ab-9dc0-4130-8f6e-65e24134e596","text":"Document af8b17ab-9dc0-4130-8f6e-65e24134e596.pdf just signed"}

 

i get this json for a webhook. 

 

 

Like 0

Like

2 comments

Hello!

 

Currently, to parse values from webhook via business process you would need to use a custom script task element. Also, you can read more information on how to process webhooks here.

 

Basically in this community thread is already was provided an answer - https://community.creatio.com/questions/parsing-webhooks

Hello 

 

Thank you, I manage to pass the json to the parameters using the next example https://community.creatio.com/questions/help-parse-json-i-get-webservice-variables-can-after-introduce-creatio-object

 

but i get an error in the process 

 

Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Terrasoft.Configuration.UsrForCustomObject.Meta]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'meta.signer', line 1, position 18.
   at Terrasoft.Common.Json.Json.Deserialize[T](String value, Func`2 func)
   at Terrasoft.Core.Process.UsrProcess_e6a76c0MethodsWrapper.PerformJsonDeserialize()
   at Terrasoft.Core.Process.UsrProcess_e6a76c0MethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.CallInternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.ExecuteItem(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

 

 

The method that I use is this one 

 

public void PerformJsonDeserialize()
{
	var passedValue = Get<string>("PassedJSONString");
	if (!String.IsNullOrEmpty(passedValue))
	{
		UsrForCustomObject testCustObj =Json.Deserialize<UsrForCustomObject>(passedValue);
		Set<string>("Parsedname", testCustObj.name);
		Set<string>("Parsedauthority", testCustObj.authority);
		Set<string>("Parsedsigner", testCustObj.meta[0].signer);
		Set<string>("Parsedreason", testCustObj.meta[0].reason);
		Set<string>("Parsednotification_type", testCustObj.notification_type);
		

	
		
	}
}
return true; 

 

 

Can you help me know what is the problem? I think is related with this part UsrForCustomObject testCustObj =Json.Deserialize<UsrForCustomObject>(passedValue)  but I already try changing that to 
DeserializeDictionary(String) or Deserialize<T>(String, JsonSerializerSettings)

and i still have the error 

 

thank you 

Show all comments
Sales_Creatio
json
prestashop
8.0

Hello Community,

 

I have a PrestaShop website to allow my important customers to simplify their hardware orders.

I am therefore in the process of developing a webservice to interface the two systems, the exchange of data being done in Json format.

 

The first feasibility tests were done in version 7.18.5 of Creatio with libraries

  • Newtonsoft.Json
  • Newtonsoft.Json.Linq
  • System.Web.Script

 

We have now moved to a new phase on a Creatio 8.0.5 and the USING of these libraries now cause problems when compiling...

 

Have you encountered this anomaly before?

Do you have examples of Json deserialization code with other libraries?

 

Thank you in advance for your help.

 

Vincent

Like 0

Like

5 comments

Greetings,



We have checked the information with our R&D team and it is as follows:

Newtonsoft.Json;

Newtonsoft.Json.Linq;

Both of these should work with no problem with the new versions of Creatio, but

System.Web.Script

Needs some adjustments from your side, since you have an on-site system.

The adjustments are as follows:

Within the file \Terrasoft.WebApp\Terrasoft.Configuration\Terrasoft.Configuration.Dev.csproj 

Within this section: <ItemGroup Label=".NET references"> 

You should add this reference <Reference Include="System.Web.Extensions" />

And correctly use the beforementioned libraries (Newtonsoft.Json; Newtonsoft.Json.Linq;) in C# schemas

Hello Mykhailo Zeleniuk,



Right now, my code is very simple (see screenshot), so I'm bothered by the compilation error...

Especially since the same code worked in version 7.18.5.

 

Someone would have examples of Json deserialization code with other libraries than Newtonsoft ?

 

Thanks

 

Vincent

 

 

LAVIGNE Vincent,

 

I did an example of a webservice that returns a JSON string result using only System; and System.Text.Json. The code is below:

namespace Terrasoft.Configuration.UsrCustomServiceNamespace
{
    using System;
	using System.Text.Json;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using Terrasoft.Core;
    using Terrasoft.Web.Common;
    using Terrasoft.Core.Entities;
	
	
	
	public class SerializedObject
	{
		public string FirstPart { get; set; }
		public string SecondPart { get; set; }
		public string ThirdPart { get; set; }
	}

    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrCustomService: BaseService
    {
	
		private SystemUserConnection _systemUserConnection;
        private SystemUserConnection SystemUserConnection
		{
            get
			{
                return _systemUserConnection ?? (_systemUserConnection = (SystemUserConnection)AppConnection.SystemUserConnection);
            }
        }
	
	[OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
        ResponseFormat = WebMessageFormat.Json)]
        public string ReturnCustomResult(string param1, string param2, string param3)
		{
			var objectToSerialize = new SerializedObject
            {
                FirstPart = param1,
                SecondPart = param2,
                ThirdPart = param3,
            };
			string jsonString = JsonSerializer.Serialize(objectToSerialize);
			return jsonString;
		}
	}
}

As a result calling this endpoint http://localhost:1026/0/ServiceModel/UsrCustomService.svc/ReturnCustomR… returned this result:

{"ReturnCustomResultResult":"{\"FirstPart\":\"test1\",\"SecondPart\":\"test2\",\"ThirdPart\":\"test3\"}"}

So you can this approach on your side as well.

And the test was performed in 8.0.6 full bundle application (sales + marketing + service) MS SQL.

Hello Oleg Drobina,

 

Thank you very much for your answer, I will try to adapt your example code to my case.

Indeed, I want to retrieve a JSON which is in the body of the HTTP request, so do more of a "Deserialize" request.

If you have an example of code in this way too, I am interested.

 

Thanks

 

Vincent

Show all comments
oData
json
API
Collections
Sales_Creatio
8.0

Hi Team,

We want to retrieve a specific record by Id along with all the related elements (eg - Retrieve Account A with all of its related Contacts). 

What we already know:

We can retrieve the account record itself along with related records that are linked with lookupfields, like the PrimaryContact

 

Account(0001111-1111-1111-1111-111111231123)?$expand=PrimaryContact($select=Name)

This works, but it returns only one contact, the primary one.

 

Instead, we need an embedded list of contacts, like

{
    "@odata.context": myurl.creatio.com/0/odata/$metadata#Account(PrimaryContact(Name))/$entity,
    "Id": "22222-222222-2222-222222-22222207ba6",
    "Name": "somename",
    "OwnerId": "111111-11111-11111-11111-1111111",
    "CreatedOn": "2022-11-16T21:11:57.214167Z",
    "Contacts“ : [
{object}, {object}
]
}

Given the first URL in the response, we expected that all NavigationProperties would behave the same:

But this collection:

Is not accessible. If we call for :

Account(0002204c-d255-46c0-bea6-0f32e2e07ba6)?$expand=ContactCollectionByAccount

 

We get this error in return:

{
    "error": {
        "code": "",
        "message": "An error has occurred."
    }
}

If we use other expand values, we retrieve meaningful errors like „Could not find a property named xy“, but this error is not self explaining. How can we return an object with an embedded list of children? I know that in this example we also could ask for a list of Contacts filtered by their account, but we cannot do that in all scenarios we have in mind.

Thank you

Petrika

Like 3

Like

1 comments

Hello Petrika,

 

This property cannot be used to retrieve all contacts related to the account and can be used in filtration only. To retrieve related contacts you need to perform the GET query to the Contact object with the correspondent AccountId filter. Using this approach you will be able to get contacts needed.

Show all comments
datamigration
datamodels
Import
json
schema
database
Studio_Creatio
8.0

Is it possible to export an existing database schema into a creatio datamodel? Or from an ERD Data export?

 

I use lucidchart to create a model of my database, it has export functions for MySQL, PostgreSQL, SQL Server, Oracle SQL and a similar platform as creatio, Quickbase. 

 

Does creatio support such an import wizard?

Like 1

Like

1 comments

Hello Pascal,

 

unfortunately this is not quite possible.

The thing is that you can export the DB in such way, but you will not have any objects in the system.

So we would recommend sticking to the standard way. Also, we will register this option as a wish for the dev team to implement it in the future.

 

Regards,

Gleb.

Show all comments
web service
json
jsonpath
API
Studio_Creatio
7.18

Good day community,

 

I'm having trouble with adding the correct JSON path for my request body.

 

I have to send a POST request with the following JSON below:

{
  "members": [
    {
      "@odata.type": "--TYPE HERE--",
      "user@odata.bind": "--USER 1 HERE--"
    },
    {
      "@odata.type": "--TYPE HERE--",
      "user@odata.bind": "--USER 2 HERE--"
    }
  ]
}

This is how my parameter structure looks:

Generated JSON here:

{
	"chatType": "oneOnOne",
	"members": [
		{
			"@odata": {
				"type": "--TYPE HERE--"
			},
			"user@odata": {
				"bind": "--USER 1 HERE--"
			}
		}
	]
}

The problem with this structure is that it generates a nested key for type under @odata, and for bind as well. I don't wan't this to happen if possible.

 

Is there any way to get this to work using parameters in web service? Or would my only resort be to generate the request body via script?

Like 0

Like

2 comments

Hello,

 

The body of the webservice seems to be generated properly since "members" is the array of objects "@odata" and "user@odata". The request was properly parsed and that's why you saw the result as on the screenshot. If this structure won't work in your business case then a separate script task should be created to sent the request.

 

Best regards,

Oscar 

Hi Oscar,

 

Thank you for you response.

 

In forming the json path, I would have made it as $.[members]["@odata.dataType"] or $.[members]["user@odata.bind"], but I'm guessing that this is not possible using the built-in function (nesting parameters) in Creatio?

 

I think I'll instead be resorting to creating a script task for this.

 

Thank you!

 

Lyle

Show all comments
#WebService
json
jsonpath
RESTAPI
7.17

I'm getting a reply such as this JSON

        "company_naics_code": [
            "3271201",
            "3332491",
            "327213",
            "333249",
            "3339930",
            "3333187"
        ],

I've linked the propper array (see pictures), but the "3271201" value and so on are not saved to any parameter.

https://prnt.sc/1rli55a

https://prnt.sc/1rli5ii

How do I handle these values in the Web service method page? Surely, I need to use some nested parameter to use the retrieved vaules. But how do I format my Path to element (JSONPath) corrently when they dont have a name?

Like 1

Like

1 comments
Best reply

It's better to deserialize the JSON string directly inside the business process or the logic that you will use when calling the web service and then substruct needed values and pass them to either process parameters or use them according to your needs. Something like this in C#:

or (in case something should be performed from the client side):

If you are going to use the web-service inside the business process don't forget to add Newtonsoft.Json.Linq using in the process properties.

It's better to deserialize the JSON string directly inside the business process or the logic that you will use when calling the web service and then substruct needed values and pass them to either process parameters or use them according to your needs. Something like this in C#:

or (in case something should be performed from the client side):

If you are going to use the web-service inside the business process don't forget to add Newtonsoft.Json.Linq using in the process properties.

Show all comments
web service
call web service
webservice restful external integration
json
Business Process

Hi Community,

 

  • I am trying to pass the JSON string into the Web-Service Element of the Business Process. I had tried this in one of the trial instances of version 7.18.0.1353. In this version, Web-Service Element has Request body parameter in its Advanced Setting. The screenshot of this is as below. 

 

 

 

  • I want to implement this same POC in another instance which is in a version of  7.17.3.1377. But the "Request body" parameter in Advanced Setting of Web-Service Element and I am not able to pass JSON in this instance.

 

 

Is there any way ? to achieve this POC working in the instance of version 7.17.3.1377

Please guide me on this.

 

Thanks and Regards.

Like 0

Like

1 comments
Best reply

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Show all comments