Hi there! We are developing an application and want to add a custom channel provider. We follow this guide, however, it does not cover how to bind custom channel provider with channel registration logic (I mean on ChatSettings page when we click on custom channel provider value on adding new channels) - is there any documentation on implementing it?

 

Thanks

Like 1

Like

0 comments
Show all comments

Hi there! We are developing an application and want to add a custom channel provider. We follow this guide and stuck on 7. Implement message sending step. 

 

The question in the send messages logic though Creatio interface. 

Let's assume we already have an active chat with some contact and messages from the contact. If we send (outcoming) message to the chat, we will only see a modal window with "Error while sending the message" message.

We checked the request made when sending the message. The request URL is .../0/rest/OmnichannelOutcomeMessagingService/SendMessage, and the payload:

{
  "message": {
    "Attachments": null,
    "ChannelId": "e79043bc-377d-46b9-86ee-9b0fc4845f0b",
    "ChatId": "f2374931-2402-411a-bf37-0eb2a6acd422",
    "ContactIdentification": null,
    "Id": "00000000-0000-0000-0000-000000000000",
    "IsEcho": false,
    "IsGuestUser": false,
    "IsStandBy": false,
    "Message": "test",
    "MessageDirection": 2,
    "MessageType": 0,
    "Recipient": "Test User",
    "Sender": "123",
    "Source": 2,
    "Timestamp": 0
  }
}

 

We also have an IOutcomeMessageWorker interface implementation binded with our "Test" channel (which has Source set to "123" as you can notice from the payload).

We tried to call the OmnichannelMessagingService.InternalSend method with the same MessagingMessage and saw the following stack trace:

The server encountered an error processing the request. The exception message is 'Error creating an instance
			of the "OmnichannelProviders.MessageWorkers.IOutcomeMessageWorker" class'. See server logs for more details.
			The exception stack trace is: 
		    at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)
			at OmnichannelMessaging.MessageWorkerFactory`1.GetWorkerInstance(String messengerName)
			at OmnichannelMessaging.MessageOutcomeWorker.InternalSend(UnifiedMessage message, String messenger)
			at Terrasoft.Configuration.Omnichannel.Messaging.OmnichannelMessagingService.InternalSend(MessagingMessage
			messagingMessage)
			at Terrasoft.Configuration.Omnichannel.Messaging.CusboOmnichannelMessagingService.test()
			at Terrasoft.Configuration.CusboMessageEventsHandlerWebServiceNamespace.CusboEventHandlerWebService.test()
			at SyncInvoketest(Object , Object[] , Object[] )
			at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&
			outputs)
			at Terrasoft.Web.Common.ServiceModel.ThreadContextInitializer.Invoke(Object instance, Object[] inputs,
			Object[]& outputs)
			at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
			at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
			at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
			at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

If we add MessagingMessage.Channel = "Test", the message is sent successfully. So we wonder if we are missing something in our configuration and how to send the message to the custom channel provider. Or if there is a way to call custom logic (endpoint, service, anything) when sending messages to custom channel provider.

 

Thanks in advance.

 

Like 0

Like

1 comments

As far as we see, there is a problem in the existing method OmnichannelOutcomeMessagingService.SendMessage - when the message is sent from omni chat conversation component, the request body does not contain ChannelName property (if we trigger this endpoint with this value set, everything works).



The workaround we have done: added Harmony library to the app and used patching with the following code in our custom class that extend AppEventListenerBase (in the end of the OnAppStart method): 

var original = typeof(OmnichannelOutcomeMessagingService).GetMethod("SendMessage");
var prefix = typeof(SendMessagePatcher).GetMethod("Prefix");
var harmony = new Harmony("com.example.test");
harmony.Patch(original, prefix: new HarmonyMethod(prefix));

(SendMessagePatcher should be implemented separately, with adding ChannelName in case the message was sent into custom channel provider chat).



If you have any other suggestions of implementing message sending for custom channel provider, please let us know.

If Creatio Developers consider that there is a bug, we hope it would be fixed asap, otherwise we hope that the documentation would be updated as it is either outdated or not covering adding custom channel provider case completely (especially sending messages topic).

 

Show all comments

Hi there! We are developing an application and want to add a custom channel provider. We follow this guide, and stuck on 4. Implement the conversion of an incoming message step. 

 

After adding completely the same converted class and publishing it, we receive 

The type or namespace name 'OmnichannelProviders' could not be found (are you missing a using directive or an assembly reference?) compilation result. 

 

As the guide suggests, this class should be added to Custom package and it is working ok in this case, however we need to add it to our application's package so it can be exported and installed. Is it possible? 

Like 0

Like

2 comments
Best reply

Hello,

 

Have I understood everything correctly and you develop this functionality in an assembly-package? If you uncheck this package option "Compile into a separate assembly" do you have the same error message?

 

Thank you!

Hello,

 

Have I understood everything correctly and you develop this functionality in an assembly-package? If you uncheck this package option "Compile into a separate assembly" do you have the same error message?

 

Thank you!

Oleg Drobina,

Correct, we have this option enabled by default and haven't changed it.

After unchecking this checkbox everything works like a charm. 



Thank you very much! 

Show all comments

Hi, I have a formula field in my Customer Orders page which is created in Freedom UI. There is Gross value field, that is a multiplication of 2 different other fields. I have tried two different approaches. One with having a Formula in my Business Process but it is giving "Formula value error: Cannot convert type "Decimal" to "Entity" " Error.

 

Additionally, I tried to use Modify Data too, to do the same and it doesn't gives any error but it also doesn't works. It doesn't give the value from formula. How can I make this work?

Like 1

Like

2 comments

BUMP

Hi!

 

The error 'Cannot convert type "Decimal" to "Entity" indicates that you are trying to save the value to the field of entity type. 

It can occur in case you are using the wrong type of parameter.



To make your process work, you need to create a parameter of decimal type to use in the formula. Here you can check the example for Hours values. You can create a formula by comparison.



Please check how the formulae work in our academy and how to work with the parameters: https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

Show all comments

Hello Community, 

 

I have a requirement to design a custom search filter in list page in Freedom UI, so that I have a text field and a button.

Now, on entering a number (Plate Number) in the field and on click of button, I wanted to filter only the records that contain the plate number. 

The filter works perfectly. But now when I navigate to any other section, I am seeing a popup message (Un save popup) as shown below.

To clear this error, I tried to save the number entered in the field and the issue is gone until I search for other number. 

Now I received a system error as shown below. 

How can I resolve this?

 

Any suggestions are really helpful.

File attachments
Like 0

Like

1 comments

Good day,

Please try performing a full compilation of the environment.

It is also worth noting that the issue is atypical and requires further investigation from the support team. If the problem is not resolved, please contact our support service: support@creatio.com.



 

Show all comments

Hi,

I have implemented two different scenarios using PrintReportUtilities mixin methods. The first one (generateCardPrintForm) is to save the printable as an attachment in the Attachment and Note detail, and the other one (initCardPrintForms and preparePrintFormsMenuCollection) is used to filter the printables on the basis of lookup. The code is working fine but after refreshing the page.

 

The code used in OrderPageV2 is as follows

generateCardPrintForm: function(tag) {
	// first get the printable being accessed
	var printFormsCollection = this.get(this.moduleCardPrintFormsCollectionName),
		printForm = printFormsCollection.get(tag);
	var printableId = printForm.values.Id;
	var orderId = this.get("Id");
	ProcessModuleUtilities.executeProcess({
		sysProcessId: '68880f82-xxxx-xxxx-xxxx-xxxxxfb532c2',
		parameters: {
			OrderId: orderId,
			PrintableId: printableId
		}
	});
	this.updateDetail({detail: "Files"});
	this.callParent(arguments);
}

 

initQueryColumns: function(esq) {
	this.callParent(arguments);
 
	if (!esq.columns.contains("UsrDocumentRepositorySubtype")) {
		esq.addColumn("UsrDocumentRepositorySubtype");
	}
},
initCardPrintForms: function() {
	this.callParent(arguments);
	var printMenuItems = this.get(this.moduleCardPrintFormsCollectionName);
	if (Ext.isEmpty(printMenuItems)) return;
	printMenuItems.each(function(item) {
		item.set("Visible", {bindTo: "getPrintMenuItemVisible"});
	}, this);
},
initSectionPrintForms: function() {
	this.callParent(arguments);
	var printMenuItems = this.get(this.moduleSectionPrintFormsCollectionName);
	if (Ext.isEmpty(printMenuItems)) return;
	printMenuItems.each(function(item) {
		item.set("Visible", {bindTo: "getPrintMenuItemVisible"});
	}, this);
},
preparePrintFormsMenuCollection: function(printForms) {
	printForms.eachKey(function(key, item) {
		if (!item.get("Caption")) {
			item.set("Caption", item.get("NonLocalizedCaption"));
		}
		item.set("Tag", key);
		item.set("Visible", {bindTo: "getPrintMenuItemVisible"});
	}, this);
},
// this is the function will determine if a printable is visible
// it is called for each printable and will return true/false to show or hide
getPrintMenuItemVisible: function(reportId) {
	var type = this.get("Status") || { displayValue: "" },
		printMenuItems = this.get(this.moduleCardPrintFormsCollectionName),
		item = printMenuItems.find(reportId);
	if (Ext.isEmpty(item)) return;
 
	switch (item.get("Caption")) {
		case "Order - Inprocess":
			return type.displayValue === "3. In progress";
		default:
			return type.displayValue != "3. In progress";
	}
}

 

Like 0

Like

4 comments

Hello,

 

It happens because of the combined mode and the fact that logic is triggered not from the page itself, but from the section page (when you open record from the section) until the page is reloaded. It's the same issue as if you add buttons to the page schema, not section schema (as described here). In such case you won't be able to see buttons on the page until the page reload. So you need to modify the logic and apply it in the section schema (OrderSectionV2).

Oleg Drobina,

 

I have added the code to OrderSchemaV2, but the issue is still the same.

Syed Ali Hassan Shah,

 

Unfortunately additional debugging needed here. Also there is a probability that the whole approach should be changed. Here are also two marketplace addons, one of them performs filtration of printables and another one adds printables to attachments:

 

https://marketplace.creatio.com/app/printable-attachments-creatio

https://marketplace.creatio.com/app/opportunity-printables-filtering-roles-creatio

 

You can also review how they work and maybe it will help in implementing your own logic.

Oleg Drobina,

 

I have gone through the mentioned plugins they are using the custom implementation in their own developed buttons and custom library. But we want to override the implementation done by Creatio.

 

Show all comments

Hi community,

 

Is it possible using code, to convert the metric chart into a calculated value? For example, a conversion rate.

 

There is a marketplace app but this isn't updated for freedom UI yet.

 

Thanks!

Like 5

Like

8 comments

Also awaiting a Freedom UI update

I also am hoping to see this available for Freedom UI soon as well. IMO this should be an out of the box addition for dashboards. 

Ryan

Ryan Farley,

 



Totally agree, like the way to be able to view numbers reduced as K or M, you know 300'000 as 300K , 300'000'000 as 300M etc... graphs often get overcrowded with numbers overlapping, still do not know why this has not been adressed, quite a standard in other solutions for more than a decade...

Hello,

 

Please note that there is no possibility to do this in Freedom UI at the moment, but we have registered your idea for our R&D team and they will consider implementing such functionality in future releases.

 

Thank you for helping us make Creatio better!

Mira Dmitruk,

This functionality is critical to making a lot of the reporting functionality within Creatio actually usable. Clients and potential clients like the appearance of what you can do in Creatio, but without the ability to actually perform calculations like getting percentages and the like, and without being able to show metrics in thousands, millions etc, the actual usability of it is pretty limited. Would strongly vote for this as well.

Mira Dmitruk,

Hello, any updates for this topic ?

I'm also waiting for something like "Calculated Metrics app" to work in Freedom. Please it urges!

Ryan Farley writes:

I also am hoping to see this available for Freedom UI soon as well. IMO this should be an out of the box addition for dashboards. 

Ryan

I agree, is something "essential"

Show all comments

Hello Community, 

 

I have a requirement to sort the lookup values where value is a text field which contains both letters and number. I wanted to sort it in asc for the numbers first. 

How can we achieve this?

Any Suggestions is helpful 

 

Thanks

Gargeyi.G

 

Like 0

Like

1 comments

Hello,

 

There are no basic system tools to change the alphabetical filtration order. In order to implement custom filtration order additional development will be needed. 

I'd suggest to check the below posts where similar business tasks have been already discussed:

https://community.creatio.com/questions/sorting-values-lookup-field-bes…

https://community.creatio.com/questions/sorting-drop-down-lookup

https://community.creatio.com/questions/freedom-ui-sorting-lookup

https://community.creatio.com/questions/change-order-lookup-values-list

Best regards,

Anastasiia

Show all comments

Hi Community,

I've a requirement where I've to read data from a PDF uploaded, Can you please let me know how it can be achievablesake

Like 1

Like

1 comments

Hello Kavya,

 

It depends on where exactly you need to read this data. If you need to read it from external API call then you need to use then for example you can use the following link and perform GET request to it:

 

https://CreatioApplicationName.creatio.com/0/rest/FileService/GetFile/149d2eaf-cbd2-49fa-b565-637748ff823c/c628b09b-05db-4ce5-968b-d38f5833978b

 

where

 

CreatioApplicationName should be replaced with your application name;

149d2eaf-cbd2-49fa-b565-637748ff823c should be replaced with the UId of the object where the file is stored (for accounts it's AccountFile and UId for it is 149d2eaf-cbd2-49fa-b565-637748ff823c):

c628b09b-05db-4ce5-968b-d38f5833978b should be replaced with an actual Id of the record inside AccountFile table (in your case - the object where the file is stored).

 

 As a result you will get the file content:

If you need to do it in the business process then you need to take a look at the "Process file" process element which allows working with files. Or you can take a look at the file API that allows files processing though the server logic inside Creatio app.

Show all comments

OOTB Lookups such as "Contact Type" and "Account Type" have the column "Colour", which is used to allow the lookup on a list to be colour coded. 

 

I have tried adding a "UsrColor" to custom objects/lookups, but the functionality does not seem to work. I also can't see any baselookup where this column is already there. 



Has anyone else managed to do this?

Like 0

Like

2 comments
Best reply

Select your color column in the object properties and you should be good

Ryan

Select your color column in the object properties and you should be good

Ryan

Ryan Farley,

That worked and totally missed this bit. Thanks!

Show all comments