How to link a Declarative Action Assignment(on Activity Definition) to a custom modal in Playbook?

Yathvika
Tera Contributor

Hello,

I have created a custom 'Request Info' Declarative Action on a Playbook Activity Card and added to a Activity Definition. The action as a button is visible, but when I click it, nothing happens.

I also created a Custom Modal in Record Page Modals where I want the agent to enter the Request Info details.
So that:
Request Info button → Open Custom Modal → Enter comments → Submit → Update Task Comments + State change. Where as Usual Additional comments fields will act as just a information providing to the user without state change.

I’m using a UXF Client Action for the Request Info button.

What is the correct way to link the Declarative Action to the custom modal?
Do I need a UX Add-on Event Mapping (sys_ux_addon_event_mapping)? If yes, what should I use for the Source Element / Target Event? or something can be done through UI Builder modifications.

Thanks!

1 REPLY 1

Kailash Bhange
Mega Sage

Hi @Yathvika 

Yes, you need a UX Add-on Event Mapping. A Declarative Action with implementation type "UXF Client Action" only fires an event. If nothing is mapped to that event on the page that hosts the playbook, the click does nothing, which is what you are seeing.

What I would check / set up:

1. Modal content
Make sure your modal is a page/route the workspace can open (Record Page modal, or a sys_ux_app_route whose Parent Macroponent is the record page and composition element "modalContainerViewport"). Give it URL params such as table and sysId so it knows which task to update.

2. Action payload
On the UXF Client Action, set a payload that carries what the modal needs, for example:
{
"route": "<your-modal-route>",
"size": "md",
"fields": { "table": "{{table}}", "sysId": "{{sysId}}" }
}

3. Event mapping (sys_ux_addon_event_mapping)
- Source Declarative Action: your 'Request Info' action
- Source element ID: the element that renders the action. For action-bar buttons this is "ui_action_bar"; for an activity card it is the Playbook component on the CSM/FSM record page - open the record page variant in UI Builder and copy the playbook component's element ID.
- Parent macroponent: the record page variant used by your workspace (not the Playbook experience itself)
- Target event: "[Record Page] Open modal" (or the modal-open event your page variant exposes)
- Target payload mapping: map route, size and fields from the event payload (EVENT_PAYLOAD_BINDING)

4. Submit logic
Keep the "add comment + change state" in the modal: on submit, update the task (data resource / Update record) and set the state there, then close the modal and refresh the playbook. That keeps the normal Additional comments field purely informational, as you want.

5. Clear cache (cache.do) and test as an agent, not only as admin.

If the card still does nothing after the mapping, open the browser console and check whether the action event is fired at all - that tells you whether the problem is the mapping or the action/assignment record.

 

 

Hope this helps - if it solves the issue, please mark it helpful/accept it as the solution so others can find it.