You’re right, when a SF case is created then it creates a Jira ticket.
But, when a nested SF case is created “underneath” the first case, only information of nested cases gets synced to “parent” Jira. I don’t need to create new Jiras.
2 things need to happen to get this to work as you desire:
Ensure that Exalate is able to recognize “child” cases as such and not Exalate them to Jira. This would be done by modifying your trigger query such that Exalate is only syncing Parent cases e.g. Parent=null (not sure of syntax - would need to be tested)
The trickier part here would be to read the “child” data from the parent case and send it to the corresponding Jira “parent” ticket. This should be possible but depends on what data fields you want to read from the children. THen you also need to decide how you will represent this data on the Jira parent ticket - which field would you put that into etc.
May I ask why you do not want to send the child cases to Jira, as this would be the most efficient way to do this I think. Maybe this is for security reasons but we should be able to control what data is passed to Jira. The reason why I say this is because Jira does support hierarchies and Epic-child relations, and also has a corresponding Parent field.
Hi Majid,
The reason of this desired behaviour is due to a business requirement. Cases are created from Saslesforce, but when they involve a massive issue, child Cases are generated and associated with the parent Case…
Do you have an example of a script for sync child data to the parent Case?
I just need to sync a Jira’s ticket with a Case in Salesforce. This Case is parent and it would have one or more nested Cases below it.
I need to synchronise the children’s information when they are attached to their parent.
On the other hand, I need to synchronise some custom fields of childs Cases.
I hope this is clear. Please let me know if you need a better explanation.
The reason being is that the scenario requires external or complex scripting and for that a dedicated work slot from the concerned team needs to be scheduled.
I am still trying to have it worked and rest assured, as soon as there is any information, will be sharing it with you.
Use automation within Salesforce to maybe populate a custom field on the parent case that is populated with a list of whatever values you need from the child cases (you can even create a correlation if you use 2 fields - 1 to hold the case number, and another to hold the actual value of the field, and both are comma separated list). Then, Exalte picks up the contents of these fields, and transports them to the remote side.
Use Exalate scripts to do everything. This is a more complex approach for sure, but I will describe it briefly here:
Steps to use Approach 2:
Work out what cases are children of the case being Exalated. You can use SOQL to achieve this e.g. the query SELECT casenumber, id, mood__c FROM Case WHERE parentid='500J700000BYdetIAD' gives me a list of IDs and the values of the field Mood__c on all test cases.
Create a httpClient request in Exalate outgoing script. I used:
def res = httpClient.get("/services/data/v54.0/query/?q=SELECT+Mood__c+from+Case+where+ParentId=%27${replica.key}%27").records.Mood__c
replica.Mood__c = res
As a result of this, I am able to fetch the values of all Mood fields on all child cases.
The receiving side now receives the following in the payload (in my case of 2 child objects):