Hello,

I’m currently working on integrating a custom chat provider in Creatio, following the official documentation. I’ve successfully configured the incoming message handling, which is working as expected.

However, I’m facing an issue when trying to send messages from Creatio to the custom provider.

Initially, I encountered an error when attempting to use the chat module for sending messages. I resolved this by explicitly binding the IOutcomeMessageWorker interface to my custom implementation using the "ThirdParty" key, as shown below:

protected void BindInterfaces() {
   ClassFactory.Bind<IAttachmentsLoadWorker, TestAttachmentLoadWorker>("Test");
   ClassFactory.Bind<IProfileDataProvider, TestProfileDataProvider>("Test");
   ClassFactory.Bind<IOutcomeMessageWorker, TestOutcomeMessageWorker>("ThirdParty");
   ClassFactory.Bind<IOperatorRoutingRule, TestOperatorRoutingRule>("TestRule");
}


After this change, the error disappeared and messages are now being saved in Creatio. However, it appears that the messages are not being sent to my custom worker (TestOutcomeMessageWorker), as I don’t see any logs or server-side activity indicating that the worker is being triggered.

Could someone please guide me on how to ensure that outgoing messages are properly routed to the custom worker? Am I missing any configuration or message routing logic?

I am using online instance. 

Could it be issue of mismatch of MsgSettingsId ? I am not sure how to access the SQL tables as I am using Online Instance.

Thanks in advance for your support!

Like 0

Like

1 comments

Hello Madhav,

In order to check if you custom worker was triggered you can check the Network tab in the browser Dev Tools and look for the request made when sending the message. The request URL might look like this  
.../0/rest/TestOutcomeMessageWorker/SendMessage
Then you will be able to investigate the response and check the errors if there were any.

Also keep in mind that according to the documentation you have to set up storage of custom channel data so you will need to have the access to the database to create the corresponding table and register the custom channel in the database as described.

Also the following community post might be useful for you
https://community.creatio.com/questions/override-sending-messages-custo…
 

Show all comments

Hello,

 

I am following this guide (https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…) and I am stuck in the step 2 where I have to register the custom channel in the database.

 

I assume that firstly I need to add a record in the previously created table where I define a specific Username and Token that the external client will need to use in order to authenticate the messages sent within my custom channel. Therefore, I understand that the Id of the created record must be used in the [MsgSettingsId] column of the Channel table. However, I don't know what I must introduce in the [Source] column. As stated in the article:

 

[Source]: The channel ID in the messenger, such as the Facebook page ID or Telegram client ID. Lets you identify the recipient by a messenger message.

 

I noticed that for Facebook, that field stores the Facebook user ID that will be resolved in the URL ">https://facebook.com/[user_id] which redirects to /">https://www.facebook.com/people/[user-name]/[other_id] and in WhatsApp the URL is ">https://wa.me/[phone_number] which redirects to &text&type=phone_number&app_absent=0">https://api.whatsapp.com/send/?phone=%2B[phone_number]&text&type=phone_number&app_absent=0.

 

If I set a random string for the [Source] column and I try to check the information in the ChatSettings I get the following error when I click on the channel name:

 

"invalid channel type"

test

 

But what is the channel type? What does that mean and how is it resolved by Creatio?

 

In my case, I want to setup the communication between Creatio and a external chatbot. What exact value should I set in the [Source] column for my custom channel provider?

 

Regards

Like 0

Like

2 comments

Hi Alejandro! How are you? I hope you're well. The guide you are referring to is related to creating a new integration (channel) with a third-party messaging platform such as Viber, WeChat, etc. For my part I was able to develop a new channel following the guide. If you have questions, feel free to send me a message and we'll get in touch. Another option is to detail your goal and I can give you some tips on how to move forward.

Hello, 
You're right, MsgSettingsId should contain an ID from the record you insert into the table TestMsgSettings created previously. As for the Source, you can find the article on how to get the page ID, for example, https://help.salesforce.com/s/articleView?id=000389501&type=1. As for the other sources like your chatbot, if I'm not mistaken, the Source can be just a simple string, the error appears due to the fact that custom channels weren't expected in code, they need to be configured directly in the DB.

openChannelDialogService(t, n) {
                this.zone.run(()=&gt;{
                    switch (t.typeId) {
                    case v.FacebookMessenger:
                        this.dialogService.open(D, n).subscribe();
                        break;
                    case v.Telegram:
                        this.dialogService.open(K, n).subscribe();
                        break;
                    case v.WhatsApp:
                        this.dialogService.open(X, n).subscribe();
                        break;
                    default:
                        console.error("invalid channel type")
                    }
                }
                )
            }

 

Show all comments

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 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