Skip to main content

Can anyone please tell me how to use substitution map while creating  Notification in FSM.

A sample document/data will be very helpful.

 

I assume you’re trying to add a substitution variable to the body of a message.  The other use for substitution variables is to resolve an email address.  If you’re trying to resolve an email address, the one thing which might not be obvious is that you need to add the wildcard name in Global Codes under ‘WILD_CARD_MEMBER’ in Code Tables.  This is necessary to allow you to select it on the Distribution List screen.

Now, to in-message substitution variables…  I’m going to try to explain in text what is not obvious, and what most people miss.  Let’s say you are defining a message for your custom notification business process, which is triggered by a transaction on a request_unit record.  In your message, you want to reference a field from a related product record, so you type in this:  {{product.condition_code}}.  You’ve even checked to make sure there is a substitution map for @product.  However, when your business process executes, it sends a notification message with nothing where the product condition code should be.  It’s blank.  If this is the kind of issue you’re having, read on.

On the Substitution Map screen, set your search criteria so everything is clear except for ‘Substitution Type’.  Set ‘Substitution Type’ to  ‘Wildcard used for resolving substitution variables in notification messages’.  Click ‘Search’.  Click the column heading for ‘SUBSTITUTION ID’ to sort the search results by substitution ID.  Scroll down to @product.

Following on from my example above, notice that there are more than one substitution id called @product.  Notice the only difference among all the @product entries is the ‘PARENT TAB NAME’.  You probably don’t see one with REQUEST_UNIT.  This is why the {{product.condition_code}} does not resolve in your notification message.  It’s because your custom business process does not trigger from any of the parent tables for which @product is defined in Substitution Maps.  You need to define (yet another) @product substitution map which maps a REQUEST_UNIT record (or whatever record is actually triggering your custom business process) to a PRODUCT record (or whatever related record you are trying to reference in your actual notification message).  Sometimes you can’t get from record A to record B through any relational gymnastics.  In that case, you either have to go without the reference in your message, trigger your message from a different table, or populate user_defs (don’t forget to set force_select = Y) with relational key values in the records you want to relate.

If you’ve gotten this far, you’re probably wondering what to put into the ‘Constraints' entries at the bottom of the Substitution Map screen.  These entries match the queried record from the SAME TABLE to the record which triggered the notification map.  Here, you create entries for the key columns (PK values) needed to select a single record.

I hope this helps!


Dear Mike,

 

Thanks  a lot for your response.I will implement according to this and will get back to you.

 

Thanks,

Pinmaya

 

 


Reply