We have to add a new picklist value ‘Create Custom Message’ as the Operation type. The message can be any payload format like text, csv, XML, json, or binary. User just wants to configure on the interface a new operation mode like ‘Create New Message’. We get the raw message and we create the message with the status ‘New’. Then we stop the processing
The use case for this new operation type is that the user can use our message layer to store messages. user doesn’t need to create his own message layer and write the rest API for creating the message. He can use our V4/Integrate API and create the message. With our message layer, he has the advantage to use our message monitor, to set status, etc.. But he will not be able to use our standard function of message reprocessing. He needs to have his own code for message reprocessing if he needs it. He can only use our monitoring to see the message record and the status. He needs to do the correct status handling with the message in his apex class. Since he can use our message monitor he saves time to develop such a monitoring tool. That is the advantage for him to use our API with the new operation type and our message monitor. When the status is ‘New’ then our reprocessing logic will not fetch those messages. But if he changes the status to ‘Failed’ or ‘Pending’ then our standard reprocessing function will fetch those messages but will be failed to execute correctly.
When we create the message we have to set a new message type in the field ‘skyvvasolutions__Message_Type__c’. This field is a picklist field and has the following value right now:
- sObject Message
- API Message
- Event Message
We will add a new type called ‘Custom Message’ to indicate that the processing of those messages has to be handled by the custom apex class.
The users who want to use this function must add the new picklist manually to the relevant object as below:
– add a new picklist for Operation Type on the object Interface, the name is ” Create Custom Message “
– add a new picklist for Message Type on the object Message, the name is ” Custom Message “
Support from V2.48 and later. But this type of Message is not ignored for reprocessing yet.
We just create an Inbound Interface with the operation “Create Custom Message” then push data. We can use the Interface V2 or V3.