consimple
API
Sales_Creatio

The client wants to use Consimple messenger connector for Creatio to send SMS within campaigns, but wants us to expose an API so they can connect their system with Consimple.

Do you know how I can do that?

Like 0

Like

3 comments

Hello,
It's necessary to contact Consimple to address this functionality. 
Consimple messenger connector for Creatio | Creatio Marketplace

It is already in the system with simple, do you know how I can configure it now, I have not found documentation

Hello,

 

We kindly recommend contacting the developer of the marketplace application at office@consimple.com. They will be able to provide you with detailed insights about the mechanism.

Show all comments
API
web service
webservice
Sales_Creatio
8.0

why i get this error. i use update
... 0/odata/Contact(guid'123') to change number value

Like 0

Like

1 comments

Hello, 

The error you encountered, according to the analysis, was caused by the fact that the OData protocol takes some time to initialize. During this time, requests via the protocol may return an error. However, within 5 minutes of the request, the system successfully initialized the protocol.


Best regards, 
Orkhan

Show all comments
script task
API
Studio_Creatio
8.0

I have the following script task in a bpm.
This is responsible for taking the results of this api and inserting the records into a Creatio object.

Script task:

 var baseUrl = "https://angelbaraldo.creatio.com";
    var authUrl = baseUrl + "/ServiceModel/AuthService.svc/Login";
    var apiUrl = baseUrl + "/0/rest/CustomStockService/GetNoConciliadosData";
    var username = "MyUser";
    var password = "MyPassword";
 
    // Cuerpo de autenticación
    var authBody = new
    {
        UserName = username,
        UserPassword = password
    };
 
    var authBodyJson = Newtonsoft.Json.JsonConvert.SerializeObject(authBody);
 
    // Solicitud de autenticación
    var authRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(authUrl);
    authRequest.Method = "POST";
    authRequest.ContentType = "application/json; charset=utf-8";
 
    using (var streamWriter = new System.IO.StreamWriter(authRequest.GetRequestStream()))
    {
        streamWriter.Write(authBodyJson);
    }
 
    string authCookies = null;
    string bpmcsrf = null;
 
    // Obtener la respuesta de autenticación
    using (var authResponse = (System.Net.HttpWebResponse)authRequest.GetResponse())
    {
        authCookies = authResponse.Headers["Set-Cookie"];
 
        // Buscar el token BPMCSRF en las cookies
        var cookies = authResponse.Headers.GetValues("Set-Cookie");
        if (cookies != null)
        {
            foreach (var cookie in cookies)
            {
                if (cookie.Contains("BPMCSRF"))
                {
                    bpmcsrf = cookie.Split('=')[1].Split(';')[0];
                }
            }
        }
 
        if (string.IsNullOrEmpty(authCookies) || string.IsNullOrEmpty(bpmcsrf))
        {
            throw new Exception("Autenticación fallida: no se obtuvieron cookies o token BPMCSRF.");
        }
    }
 
    // Solicitud autenticada a la API
    var apiRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(apiUrl);
    apiRequest.Method = "GET";
    apiRequest.ContentType = "application/json";
    apiRequest.Headers["ForceUseSession"] = "true";
    apiRequest.Headers["Cookie"] = authCookies;
    apiRequest.Headers["BPMCSRF"] = bpmcsrf;
 
    // Obtener respuesta de la API
    string apiResponseContent;
    using (var apiResponse = (System.Net.HttpWebResponse)apiRequest.GetResponse())
    {
        using (var streamReader = new System.IO.StreamReader(apiResponse.GetResponseStream()))
        {
            apiResponseContent = streamReader.ReadToEnd();
        }
    }
 
    // Parsear los datos de la API
    var jsonRecords = Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.List<System.Collections.Generic.Dictionary<string, object>>>(apiResponseContent);
    // Procesar los registros (como en tu código original)
    var cantidadInsertados = 0;
 
    foreach (var record in jsonRecords)
    {
        var tipo = record.ContainsKey("Tipo") ? record["Tipo"]?.ToString() : null;
        var letter = record.ContainsKey("Letter") ? record["Letter"]?.ToString() : null;
        var cardCode = record.ContainsKey("CardCode") ? record["CardCode"]?.ToString() : null;
        var nroComprobante = record.ContainsKey("Nro Comprobante") ? record["Nro Comprobante"]?.ToString() : null;
        var nroOv = record.ContainsKey("Nro OV") ? record["Nro OV"]?.ToString() : null;
        var pymentGroup = record.ContainsKey("PymntGroup") ? record["PymntGroup"]?.ToString() : null;
        var docDate = record.ContainsKey("DocDate") ? record["DocDate"]?.ToString() : null;
        var vencimiento = record.ContainsKey("Vencimiento") ? record["Vencimiento"]?.ToString() : null;
        var docCur = record.ContainsKey("DocCur") ? record["DocCur"]?.ToString() : null;
        var docRate = record.ContainsKey("DocRate") ? record["DocRate"] : null;
        var debe = record.ContainsKey("Debe") ? record["Debe"] : null;
        var haber = record.ContainsKey("Haber") ? record["Haber"] : null;
        var debeUsd = record.ContainsKey("Debe USD") ? record["Debe USD"] : null;
        var haberUsd = record.ContainsKey("Haber USD") ? record["Haber USD"] : null;
 
        // Verificar si el registro ya existe
        var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "AgbCuentaCteSocioNegocios");
        var idColumn = esq.AddColumn("Id");
        esq.Filters.Add(esq.CreateFilterWithParameters(FilterComparisonType.Equal, "AgbCuemtaCteNumeroComprobante", nroComprobante));
        var entityCollection = esq.GetEntityCollection(UserConnection);
 
        // Consultar la cuenta relacionada
        var esq2 = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "Account");
        var accountIdColumn = esq2.AddColumn("Id");
        esq2.Filters.Add(esq2.CreateFilterWithParameters(FilterComparisonType.Equal, "AgbCodigoSocioDeNegocios", cardCode));
        var accountCollection = esq2.GetEntityCollection(UserConnection);
 
        Guid? accountId = accountCollection.Count == 1 ? accountCollection[0].GetTypedColumnValue<Guid>(accountIdColumn.Name) : (Guid?)null;
 
        // Insertar el registro si no existe
        if (entityCollection.Count == 0 && !string.IsNullOrEmpty(nroComprobante))
        {
            var newEntity = UserConnection.EntitySchemaManager.GetInstanceByName("AgbCuentaCteSocioNegocios").CreateEntity(UserConnection);
 
            newEntity.SetDefColumnValues();
 
            newEntity.SetColumnValue("AgbCuemtaCteNumeroComprobante", nroComprobante);
            newEntity.SetColumnValue("AgbCuentaCteCodigoSn", cardCode);
            newEntity.SetColumnValue("AgbCuentaCteCondicionPago", pymentGroup);
            newEntity.SetColumnValue("AgbCuentaCteCuentas", accountId);
            newEntity.SetColumnValue("AgbCuentaCteDebe", debe);
            newEntity.SetColumnValue("AgbCuentaCteDebeUsd", debeUsd);
            newEntity.SetColumnValue("AgbCuentaCteFechaDocumento", docDate);
            newEntity.SetColumnValue("AgbCuentaCteFechaVencimiento", vencimiento);
            newEntity.SetColumnValue("AgbCuentaCteHaber", haber);
            newEntity.SetColumnValue("AgbCuentaCteHaberUsd", haberUsd);
            newEntity.SetColumnValue("AgbCuentaCteLetra", letter);
            newEntity.SetColumnValue("AgbCuentaCteMoneda", docCur);
            newEntity.SetColumnValue("AgbCuentaCteNumeroOv", nroOv);
            newEntity.SetColumnValue("AgbCuentaCteTipoCambio", docRate);
            newEntity.SetColumnValue("AgbCuentaCteTipoDocumento", tipo);
 
            newEntity.Save();
 
            // Incrementar el contador de registros insertados
            cantidadInsertados++;
        }
    }
 
    // Establecer el valor de registros insertados en la variable del proceso
    Set<int>("CantidadInsertados", cantidadInsertados);
 
    return true;

 

But when I run the bpm I get this error

Error:

System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at Terrasoft.Core.Process.AgbProcess_93e521fAngelBaraldo1MethodsWrapper.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)

 

Like 1

Like

2 comments

Are you trying to send requests from Creatio to the same Creatio environment? 

If that's so, it's really strange implementation. I think it's much better to call the service logic directly rather then  send an HTTP request to the endpoint and parse the response json. 

the mock code would look like this 

var service = new CustomStockServiceHelper(userConnection); 
var response = service.GetNoConciliadosData();

I assumed that you use a CustomStockServiceHelper in CustomStockService to retrieve the data. 

 

DM me if you need more help. 

Best regards, 
Yurii

 

Yuri Sokil,

Yuri thanks for you response.

Show all comments
API
RESTAPI
FileApiService
8.1.3
Sales_Creatio_enterprise_edition
8.0

Is it possible to override an OOTB C#-defined REST endpoint in Creatio? In our case, we need to trigger some action when a file is uploaded, and since the file record creation doesn't trigger business processes/similar, we need to do this some other way. One option we are trying to attempt is overriding the FileApiService's UploadFile method to trigger the behaviour after calling the base class to behave as normal for the file upload, but we can't seem to get any override behaviour of the WCF method to work. Does anybody have information or an example of how this might be done, or some other option that we could pursue?

Like 0

Like

1 comments

Hello Harvey,

Overriding the base REST service seems to be impossible in our system. We attempted to do this but were unsuccessful. I suggest creating a business process that starts after a specified delay (for example, one hour) to perform the required actions after the file upload. 

Show all comments
API
file upload
8.0

We have a requirement where client would send data as csv file. This file will be later processed via BPM process and record will be loaded into the creatio object. How and where this file can be stored within Creatio Cloud ?  

Please note the file is not an attachment to any record but rather records which is to be loaded in Creatio Database.

Like 0

Like

2 comments

Hello,
 

For product sites that are hosted in the Creatio cloud, AWS S3 buckets are connected by default and are used to store files.
You can also use the option of storing files in the database as well, but please note that this will lead to increased memory consumption at the database level.
When developing functionality that covers file uploads, we recommend using the "API for file management" that is built into Creatio products.
You can find a detailed description and examples of how to use the "API for file management" in an article on Creatio Academy, as well as the File storage options for storing files in Creatio.
 

Thank you.

Serhii Parfentiev,

Before deploying this on Creatio Cloud I need to develop this on my local Creatio set up

How to Validation of S3 Configuration:

"I have configured Amazon S3 as file storage in Creatio local following the 'File storage options ' guide. 
How can I validate that this S3 configuration is working correctly (I don't see anything in log)?
"Any existing API i can use to see how this work

What  Tables and Objects Involved in File Upload:

"Which Creatio tables or objects are involved in file upload and storage when using external storage like Amazon S3? Specifically, what tables store metadata and file details for uploaded files when it is not associated with any entity like Accounts or Contacts?

 Need these to access file from BPM"

Show all comments
Base64
file
bpm
API
Studio_Creatio
8.0

Hello

 

It is posible to save a file in creatio from a base64 string? I have a web service that allows me to request a document by an id to an external service and it responds with the document in a base64 string, so I would like to know if it is possible to convert that string into the file and save it in some record on the platform.

 

Thank you 

Like 0

Like

2 comments

Something like this should work:

var base64FileString = Get&lt;string&gt;("Base64File");
var accountId = Get&lt;Guid&gt;("AccountId");
 
var attachFileType = new Guid("529bc2f8-0ee0-df11-971b-001d60e938c6");
var fileName = "SomeFile.docx" // set proper file type in file name
 
var entity = UserConnection.EntitySchemaManager.GetInstanceByName("AccountFile");
var fileEntity = entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("AccountId", accountId);
fileEntity.SetColumnValue("TypeId", attachFileType);
fileEntity.SetColumnValue("Name",fileName);
fileEntity.SetBytesValue("Data", Convert.FromBase64String(base64FileString));
fileEntity.Save();

Ryan

Ryan Farley,

Thank you very much 

Show all comments
studio
8.1.3
API
file
storage

Hello,

 

I'm trying to implement a file storage that saves files on a network share instead of the database. I followed the instructions here:  API for file management | Creatio Academy but I'm getting a Cannot be null Parameter name: service error. 

Any help will be appreciated. 

Thanks,

Jose

 

Like 0

Like

1 comments

Good day,

Based on the screenshots, an empty value appears to be passed to a method with the “service” argument. Unfortunately, there's not enough information available to pinpoint the exact cause of the error at this time.
 

To further investigate, it would be necessary to debug and examine what the service returns in the browser console, identify what service it is, and review the function call stack.
 

These issues typically fall under the scope of a development consultation for a deeper investigation. 

If needed, you may want to discuss this with your manager to arrange a consultation.

Thank you!

Show all comments
webservice
API
Studio_Creatio
8.0

I am connecting a third-party API to Creatio, it delivers different types of data including this:
"user_id": [
60,
"Luismary Mendez"
]
In the parameters of the Creatio response I have set it as an Array Text and as an Object

 

But when I try to connect this variable to the process it does not display it in the list of possible result values.

The field is Vendedor:

Like 0

Like

5 comments

This is because the user_id is an array in the payload received from the web service, not just a single value. If you know the array will only contain a single set of values and the first value in the user_id array will always be the integer Id and the second value will always be the text name, you could flatten them out by mapping them as text and integer values:

  • Map ID as: user_id[0]
  • Map Name as: user_id[1]

Ryan

Ryan Farley,

What you're telling me is that I have to set the user_id as an object?

You could, but that doesn't pass to a subprocess (with an array inside an array). If you are able to flatten it out and if you know the array will only contain a single set of values and the first value in the user_id array will always be the integer Id and the second value will always be the text name, that will pass easily to a subprocess. Like this for the "user_id" first element in array, which is an int from what you've shared:

The second value in the user_id array, which is a string from what you've shared, would look like this:

This is assuming your JSON looks like this:

{
	"result": [
		{
			"id": "someid",
			"name": "somename",
			"user_id": [
				60,
				"Some name"
			]
		}
	]
}

You're basically changing it from an array with an int in index 0 and string in index 1 to flattened out properties pointing to the value in index 0 and index 1. This is, of course, assuming that the user_id array will only contain an int at index 0 and a string at index 1.

Ryan

Ryan Farley,

Thanks Ryan, I understood your explanation, I will apply it and let you know how it goes.

Carlos Soto,

Thanks Ryan. It's works

Show all comments
API
webservice
Studio_Creatio
8.0

Hello.

I have a web services API that requires an Id and an hmac generated with the request parameters and an API Key to be placed in its authorization header.

Is there a way to obtain the call body to perform the HMAC?

In postman I have been able to make the call successfully with a pre-request which is the following:

 

const apiKey = pm.collectionVariables.get("apiKey");;
const webId = pm.collectionVariables.get("webId");
const crypto = require('crypto-js');
 
if(pm.request.method === 'POST') {
 
    const parsedBody = JSON.parse(pm.request.body.raw);
    const jsonParams = JSON.stringify(parsedBody);
 
    // Create HMAC
 
    const hmac = crypto.HmacSHA256(jsonParams, apiKey);
    const hmacb64 = crypto.enc.Base64.stringify(hmac);
 
    // Set computed HMAC as an environment variable (or you could add it directly to the headers)
    pm.environment.set('hmacb64', hmacb64);
 
    // Construct the Authorization header
    const authorizationHeader = "signmage " + webId + ":" + hmacb64;
    pm.environment.set('Authorization', authorizationHeader);
} else if(pm.request.method === 'GET') {
 
    const url = pm.request.url.getPathWithQuery();
 
    const hmac = crypto.HmacSHA256(url, apiKey);
    const hmacb64 = crypto.enc.Base64.stringify(hmac);
 
    // Set computed HMAC as an environment variable (or you could add it directly to the headers)
    pm.environment.set('hmacb64', hmacb64);
 
    // Construct the Authorization header
    const authorizationHeader = "signmage " + webId + ":" + hmacb64;
    pm.environment.set('Authorization', authorizationHeader);
}

 


But in Creatio I'm a little lost if it's possible to do something similar.

I would appreciate it if you could help me know if this is possible. Thank you.

Like 1

Like

2 comments

Hello Laura,

Thank you for your question.

I have contacted our R&D team regarding when this functionality will be implemented in our system. The HMAC-SHA256 signature is planned to be implemented with the 8.3 release. Currently, there is no built-in API to use HMAC.

Hope this helps.

Hello,

Creatio does not natively provide built-in functionality for generating HMAC-SHA256 signatures directly within its platform. However, you can implement HMAC-SHA256 signature generation in Creatio by leveraging custom development or external tools.

Show all comments
API
postman
8.0

I tried to send information through Postman. After verifying that the details are correct including the URL and keys. Postman's token is valid. The following error is received:

 I also tried to send DATA to on another object and get the same error. Is there a system malfunction?

Like 0

Like

1 comments

Hello,

 

Generating source code for all schemes and fully compiling the system usually helps to resolve this error. In this case, the OData entity will be rebuilt and you should not get this error. So your actions:
1. Generate the source code for all schemas
Gener

2.  Perform a full compilation of the site


Compilation

If this does not help you solve the issue, please create a separate ticket for the Creatio support team.
 

Thank you.

Show all comments