- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 02:36 AM
Hello Folks,
Hope you are doing good..!
I am getting a strange doubt on Targeted communication Recipient List under CSM ServiceNow. It will be really appreciated if i get any positive and useful response.
Please find the below Screen shot for the reference.
As you can see in the screen shot, there are 4 types (Contacts, Internal Users, Consumers and Accounts). In the method, if we select Dynamic Condition then the page displays Table, Account field (Only if we select type as Account) and the condition builder. Here is my Question comes.
When Account is selected as Type then we can see that Table is automatically selected as customer_account and Account field is auto filled by sysID and i am sure that we can modify it. But what is the connection between these and how does it work?? for this OOB autopopulation , i don't see any recipient if i refresh the recipient list.
I want to make use of this recipient list in for one my client requirement which is when a product(cmdb_model OR sn_install_base_sold_product) is down, a major case will be created and when the recipient list is added to the major case, Child cases should be created for all the accounts which are in connect with the Sold product or product.
I am really confused on how to build a recipient list to achieve this in my system. I did try as below but still i am really doubtful if that is the way or how better we can do it, its totally fine even if you suggest using script or condition. Ijust want to understand how exactly this connection works in Recipient list. It would be really great if anyone of you could help me to understand this thing. Thank you so much in advance for the help folks.
Regards,
Pavan B V
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 03:14 PM
To use the data in the screen-shots, if the intent is to notify accounts that have installed the Iris 5875, then a better table would be Asset (alm_asset).
In that case you would select Asset as table and Account as field.
As condition you would probably select those assets that have status Installed.
And for sure where the product model is Iris 5875.
Case is not a good candidate, cause it may be that those Accounts that you want to notify never opened a case, so cases don't (yet) contain the relationship between a product (model) and accounts.
But assets naturally should contain the relationship between accounts and product (models).
Or if you wanted to notify Accounts based on some information from contracts, you might select table Assets Covered (clm_m2m_contract_asset_list), pick Contract.Account as field and build conditions by dot-walking to Contract.
E.g. here I am building a list of accounts that have assets (I don't check what kind of assets) who's contract expires before new year's eve.
I have a single contract in the DB that is for an account, so the list ends up containing just that account:
Let us know if this is still not what you are after.
All in all the intent of this form is to allow you to gather list of any of the 4 types of entities depending on where the data exists.
But, of course, you can also just simply "script" it if the information cannot be extracted from any table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2023 10:32 PM
Have been going through this thread and I must admit I am still a bit unsure what your goal is here.
So as to clarify, are you trying to create a Recipient List record and Recipient related records based on what product has been selected in a major Case?
If so, that would not be how Targeted Communication Recipient Lists should function - and the solution would be a customization, not a configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 04:38 AM
No Problem, At least, Could you please help me to script the below condition? i will take it further. When i try by using the condition builder, i am able get the recipients (dynamically added - True) but if i try the same using the script i am not being able to get the recipients. Kindly help me with the script for below condition so that i can get the recipients using script. Thanks in advance.
Regards,
Pavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 10:52 AM
I suppose this would be the transcription of the image:
;
(function (recipients) {
// ╭-----------╮
// "Type │ Accounts │" in the picture
// ╰-----------╯
var accounts = recipients.accounts = [];
// ╭----------------------------------------------╮
// "Table │ Sold Product [sn_install_base_sold_product] │" in the picture
// ╰----------------------------------------------╯
var $gr = new GlideRecord('sn_install_base_sold_product');
// ╭-----------╮ ╭------╮ ╭------------╮ ╭---╮
// "Conditions │ Product 🞃 │ │ is ⌄ │ │ Iris 5875 │ │ 🔍 │" in the picture
// ╰-----------╯ ╰------╯ ╰------------╯ ╰---╯
$gr.addQuery('product', '<the sys_id of product Iris 5875>');
$gr._query();
while ($gr._next()) {
// ╭-----------╮
// "Account Field │ Account 🞃 │" in the picture
// ╰-----------╯
accounts.push('' + $gr.account);
}
return recipients;
})({});
Pasting this code into field Script should get you the same result as if refreshing with the pictured condition.
Of course, don't forget to replace <the sys_id of product Iris 5875> with the actual sys_id of that product.
And for sure you can query a different table and/or add more
$gr.addQuery(...);
statements to further filter the records for accounts - but it is not possible to "send" parameters to this script from the outside.