What is the connection between the type, table & field in the targeted communication Recipient List

Pavan B V1
Tera Contributor

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.

PavanBV1_0-1701771774285.png

 

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.

PavanBV1_1-1701772455339.png

 

Regards,

Pavan B V

 

1 ACCEPTED SOLUTION

-O-
Kilo Patron
Kilo Patron

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:

13.jpg

 

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.

View solution in original post

17 REPLIES 17

Pavan B V1
Tera Contributor

Thank you for your response, it was helpful. Keeping you suggestion as reference i was able to build the condition and it worked. However, i wanted to write the code to achieve this condition. In the blow condition i am hardcoding the product.

PavanBV1_0-1703156511441.png

 

But I wanted to write a script dynamically like "Child cases should be created for all the accounts which are linked with the sold product which is selected in the major case". Below is the code i have written but its not working/not right may be. Kindly help me to fix the code so that i can fulfil the requirement.

PavanBV1_1-1703157283034.png

 

Pavan B V1
Tera Contributor

Thank you for your response, it was helpful. Keeping you suggestion as reference i was able to build the condition and it worked. However, i wanted to write the code to achieve this condition. In the blow condition i am hardcoding the product.

PavanBV1_0-1703156511441.png

 

But I wanted to write a script dynamically like "Child cases should be created for all the accounts which are linked with the sold product which is selected in the major case". Below is the code i have written but its not working/not right may be. Kindly help me to fix the code so that i can fulfil the requirement.

PavanBV1_1-1703157283034.png

Thank you..

Could you post the code as text?
I don't want to re-write it.

 

Also, if "it was helpful", I would appreciate if you marked it is helpful 🙂

Pavan B V1
Tera Contributor

var majorCase = new GlideRecord('sn_customerservice_case');

    majorCase.query();

 

    if (majorCase.next()){

 

        var Product = majorCase.getValue('prodcut');

        var soldProduct = new GlideRecord('sn_install_base_sold_product');

soldProduct.addQuery('sys_id', Product);

soldProduct.addQuery('account', majorCase.account);

soldProduct.query();

if(soldProduct.next()){

 

    return true;

I appreciate marking the correct answer, but could you also add your code as text, not just as picture?