Hello,
I am currently trying to add a custom provider in Creatio by following this document. While the base setup is working, I have encountered a few issues as below:
1. Incoming Message Issue
Description:
- Messages sent to the custom receive endpoint are not displayed in the chat interface if the Sender field is missing or the sender does not exist in the Contact Identity table.
Sample Payload:
{
"Recipient": "12345678",
"Message": "Hello How Are you?",
"Sender": "1414291595",
"Timestamp": "0"
}
Questions:
- If the sender is not recognized or is missing the message is not showing on Chat.
- Are these messages still stored in Creatio?
- If so, where (e.g., specific database table, logs, etc.) can we find them?
- Is there a recommended approach for handling unknown senders?
- Sometimes even if the senderid is correct, the chatID is showing null (Chat is not created)
2. Outgoing Message Error
Description:
Sending a message from the Creatio chat UI results in the following error:
"Error while sending the message."
Findings:
- The issue appears to be that the internal method OmnichannelOutcomeMessagingService.SendMessage expects a ChannelName in the payload which seems to be missing when trying to send from Default chat module. This was verified by testing in Postman—adding ChannelName manually in payload allows the message to be sent successfully.
Questions:
- How can we programmatically include ChannelName in the payload used by the chat component as it is part of a locked file?
Can anyone please guide me with this?
Like
Hello,
Regarding part 1:
- Yes, if no additional logic that you created prevents messages from saving.
- The two main tables are: OmnichannelMessages and OmniChat. OmnichannelMessages stores information on chat nessages, OmniChat stores messages on chats themselves.
- There are none, I also reviewed the logic behind WhatsApp converted and the sender seems to be passed as a phone number there and then identification is performed using the phone number with the replacement of the original value as
message.Sender.Replace("whatsapp:", "")
Regarding part 2:
- We get ChannelName from the Source. You need to bind worker to one of the values from the list below:
Also this community post may be handy https://community.creatio.com/questions/override-sending-messages-custom-channel-provider-logic
Hello,
Regarding part 1:
- Yes, if no additional logic that you created prevents messages from saving.
- The two main tables are: OmnichannelMessages and OmniChat. OmnichannelMessages stores information on chat nessages, OmniChat stores messages on chats themselves.
- There are none, I also reviewed the logic behind WhatsApp converted and the sender seems to be passed as a phone number there and then identification is performed using the phone number with the replacement of the original value as
message.Sender.Replace("whatsapp:", "")
Regarding part 2:
- We get ChannelName from the Source. You need to bind worker to one of the values from the list below:
Also this community post may be handy https://community.creatio.com/questions/override-sending-messages-custom-channel-provider-logic
Hello @Oleg Drobina,
Thanks, I bind the worker with "ThirdParty" and it seems to work now,
I do have another question (perhaps a basic one): I'm working with an online instance, and I'm wondering if it's possible to add a custom channel name to the existing enum list. If so, could you guide me on how to do that?
Thanks again for your help!