How to pass BREL value to notification

Document created by cdtj Champion on Nov 18, 2016
Version 1Show Document
  • View in full screen mode

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.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.z_html_img}
2 people found this helpful

Attachments

    Outcomes