CA Service Management

 View Only

How to pass BREL value to notification 

Nov 18, 2016 04:01 AM

As we know BREL is a many-to-many relation and can be specified in notifications using sequnce, for example first property of request could be passed in this way:

@{call_req_id.properties.0.label}: @{call_req_id.properties.0.value}

But what to do if we need to notify user with specific value?

 

Our customer's requirent was to add user's VIP status to notification, surely this can be done using 2 notification rules forked by condition macro but this was resolved in this way:

 

Creating custom defined DOMSET

We have craeted z_vip.maj file with followed code, where specified search query that could return only single row of data.

OBJECT contact_handling {
     FACTORY {
          DOMSET vip_list "" STATIC {
               WHERE "special_handling = 1001";
               DISTINCT;
          };
     };
};

OBJECT cnt {
     ATTRIBUTES usp_contact SECONDARY {
          is_vip BREL contact_handling contact DYNAMIC { DOMSET vip_list; };
     };
};

Also we have added sub-relation to contanct_handling using new DOMSET.

 

Adding data to notification

Then if user have VIP flag it will be stored in is_vip list in a first row, so we can access it using this query:

@{call_req_id.customer.is_vip.0.special_handling.sym}

 

Bonus

Going further, if your company's email service configured to support BASE64 objects or (img with source links) you can simply add icon to notification:

for this purposes I have published new string (length: 4000) attribute: z_html_img

And using this code:

@{call_req_id.customer.is_vip.0.special_handling.z_html_img}

Statistics
0 Favorited
4 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Mar 13, 2018 12:19 PM

Timur,

 

Sorry for the delay.  Below is the HTML template source code for the message template that includes the reference to the is_vip in the Notification Message Title.  Is this what you wanted?

 

Let me know.

 

Thanks

Craig

 

Notification Message Title  

 

@{call_req_id.customer.is_vip.0.sym} @{call_req_id.priority.sym} @{call_req_id.type.sym} @{call_req_id.ref_num} @{type.sym} @{call_req_id.customer.combo_name} @{esc_style=html justify=line:call_req_id.summary}

 

HTML Message

 

<p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none;" border="1" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(51, 102, 153); vertical-align: top; background-image: none;"><p><a title="Go to @{call_req_id.type.sym} @{call_req_id.ref_num}" href="@{call_req_id.web_url}" target="_blank"><strong><font color="#336699" face="arial,helvetica,sans-serif">@{call_req_id.type.sym} @{call_req_id.ref_num}</font></strong></a><strong><font color="#336699" face="arial,helvetica,sans-serif"> @{type.sym} Notification</font></strong></p><strong><font face="arial,helvetica,sans-serif"><font size="2"><p><font face="verdana,arial,helvetica,sans-serif" size="2">@{esc_style=html keeplinks=yes justify=line:description}</font></p></font></font></strong></td></tr></tbody></table></p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none; background-image: none;" border="0" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Summary1972</font></strong></td></tr><tr><td><p><font face="verdana,arial,helvetica,sans-serif" size="2">@{esc_style=html justify=line:call_req_id.summary}</font></p><p><font face="Verdana" size="2">@{call_req_id.customer.cnthandling_list.special_handling.sym</font></p></td></tr></tbody></table><p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none; background-image: none;" border="0" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><p align="left"><font face="verdana,arial,helvetica,sans-serif" size="2"><strong>Affected End User </strong></font></p></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><p align="left"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Area</font></strong></p></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><p align="left"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Status</font></strong></p></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><p align="left"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Priority</font></strong></p></td></tr><tr><td><p align="left"><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.customer.combo_name}</font></p></td><td><p align="left"><font size="2"><font face="verdana,arial,helvetica,sans-serif"><strong> </strong>@{call_req_id.category.sym}</font></font></p></td><td><p align="left"><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.status.sym}</font></p></td><td><p align="left"><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.priority.sym}</font></p></td></tr></tbody></table></p><font size="2"><strong><p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none; background-image: none;" border="0" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><p><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Reported By</font></strong></p></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Assignee</font></strong></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Group</font></strong></td></tr><tr><td><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.log_agent.combo_name}</font></td><td><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.assignee.combo_name}</font></td><td><font face="verdana,arial,helvetica,sans-serif" size="2">@{call_req_id.group.last_name}</font></td></tr></tbody></table></p><p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none; background-image: none;" border="0" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="Verdana" size="2">Severity</font></strong></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="Verdana" size="2">Urgency</font></strong></td><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="Verdana" size="2">Impact</font></strong></td></tr><tr><td><font face="Verdana" size="2">@{call_req_id.severity.sym}</font></td><td><font face="Verdana" size="2">@{call_req_id.urgency.sym}</font></td><td><font face="Verdana" size="2">@{call_req_id.impact.sym}</font></td></tr></tbody></table></p><p><font size="2"><font face="verdana,arial,helvetica,sans-serif"><strong></strong></font></font></p><table style="width: 100%; text-align: left; vertical-align: top; cssfloat: none; background-image: none;" border="0" rules="none" frame="void" cellspacing="1" cellpadding="1" summary=""><tbody><tr><td style="text-align: left; color: rgb(25, 25, 112); vertical-align: top; background-image: none; background-color: rgb(156, 194, 228);"><strong><font face="verdana,arial,helvetica,sans-serif" size="2">Description</font></strong></td></tr><tr><td><font face="verdana,arial,helvetica,sans-serif" size="2">@{esc_style=html keeplinks=yes justify=line:call_req_id.description}</font></td></tr></tbody></table></strong></font>

 

Mar 06, 2018 01:25 PM

hi,

could you share your HTML template source code?

Regards,

Timur Alimov

Mar 06, 2018 01:15 PM

So I followed the steps outlined in the article and the notification is not getting sent flagging that requester is a VIP.    

 

Not sure I fully understand the following statement but I did confirm in WSP that is_vip was added contact_handling domset but unsure if I need to perform any additional configuration around this step: 

 

Also we have added sub-relation to contanct_handling using new DOMSET

 

I also noted the following error in STDLOG:

 

3/06 10:23:34.62 IBDC0APP55D    spelsrvr             6276 ERROR        pcexec.c              7097 Unrecognized format parameter (CALL_REQ_ID.CUSTOMER.CNTHANDLING_LIST.SPECIAL_HANDLING.SYM</FONT></P></TD></TR></TBODY></TABLE><P><TABLE) for expand format (call_req_id.customer.cnthandling_list.special_handling.sym</font></p></td></tr></tbody></table><p><table style="width)

03/06 10:23:34.67 IBDC0APP55D    spelsrvr             6276 ERROR        pcexec.c              7097 Unrecognized format parameter (STYLE) for expand format (call_req_id.customer.cnthandling_list.special_handling.sym</font></p></td></tr></tbody></table><p><table style="width)

 

Let me know if anyone else got this work and if I am missing something.

 

Thanks

Mar 22, 2017 06:29 PM

Thanks, very helpfull. I allready have the case where I will use this approach, but in different context.

Mar 22, 2017 10:59 AM

It's great to learn every day with the community. Thank you cdtj.

Related Entries and Links

No Related Resource entered.