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

-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.

Pavan B V1
Tera Contributor

Hi, 

 

Thank you for your response, But my intent here is when we fill product as iris 5875 in the Major case then i want to create child cases for all the accounts that are tagged with the product iris 5875 which is added in Major case. To achieve this, we need to build a recipient list and add it in the Major case.

And that is what I am trying to say: you need to identify which table holds this tagging information.

And that is the table you need to pick in the recipient list generator.

E.g. if Iris 5875 is an asset type of product and you want to include only those customers that have it installed, probably the information is in alm_asset.

And then that is the table you need to select.

It all depends on what kind of product Iris 5875 is.

An even better candidate would be table sn_install_base_sold_product.

The question is what kind of product the organization sells and how those sells are registered in CSM.

Pavan B V1
Tera Contributor

Thank you for the information it was helpful, keeping your answer as a reference, i was able to build a condition and it worked but, i wanted to make it dynamic by writing a script for the below condition. 

PavanBV1_0-1703155856481.png

Here in the condition i am hardcoding product but i wanted to make it dynamic like "child cases must be created for all the accounts which has the product/sold product selected in the major case. My script doesn't seems to be working, i would request you to help me change the script in order to fulfil the requirement. Below is my script and i am not sure what's the mistake i am doing here.

 

function assignUser() {

 

var userAcoount= gs.getUser().getCompanyID();

    var majorCase = new GlideRecord('sn_customerservice_case');

    majorCase.addQuery('account', userAcoount);

    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.query();

if(soldProduct.next()){

 

    return true;

}

return false;

    }

 

Please help.