Question

Custom Attributes In Custom Event Action Payload

  • 7 February 2024
  • 3 replies
  • 163 views

Badge +1
  1. I have set Custom Attributes In CustomeInfo Entity 

 

CustomerInfo Entity Configuration

 

  1. While creating a new Custom Event, It asked me to select a table, I selected table “CUSTOMER_INFO_TAB” which include all general fields only, but it allows me to add custom attributes as well. While reading other community guides i can not figured out what exactly i have to add in Server Method (PL\SQL), i am trying with this below right now. 

 

Custom Event

 

  1. Now i am trying to create Custom Event Action on for Test Event
    Event Action Configuration

     

  2. I am getting this below error. Not sure where exactly i am doing wrong
     


     

My Goal is to send CustomerInfo Data with Custom attribute to my own API, Right now it works without Custom Attributes. I want to make it work with including Custom Attributes as well. 

 


3 replies

Userlevel 6
Badge +15

@mukesh.a when you create custom attributes in events you need to call a PL/SQL package (ending with %API or %CFP). Normally all the custom attributes should be fetched with customer_info_cfp.get%. Additionally all custom attributes are saved in customer_info_CFT - so you could get them directly from there with the event.

Here you have 2 options:

  • event on customer_info_tab → then you could use the expressions from entity config → and probably only pass the NEW:CUSTOMER_ID as parameter
  • event on customer_info_CFT → this is the table that holds all the custom attributes.

Below is an example of how a custom attribute in an event could be created:

 

Userlevel 7
Badge +20

Hi @Marcel.Ausan and @mukesh.a 

I think you would get table mutate error with trigger in either table since the data is saved in the same transaction in both _TAB and _CFT

 

If your endpoint doesn't use OAuth2 authentication, My suggestion is to use a workflow for such a scenario and use the projection action trigger.

You can easily send to a REST endpoint using IFS REST Call (IFS REST Call - Technical Documentation For IFS Cloud)

 

Hope it helps!

Damith

Badge +1

I am going through your both approach. Lets see if it works.

Thanks @Marcel.Ausan @dsj i will update you guys soon

Reply