Activity stream component customization

Mateusz18
Tera Contributor

Hello,

I am trying to customize the Activity Stream component for UI Builder.
I've found a way to get the source code of component, customize the component using Visual Studio Code, connect VSC with the ServiceNow Instance and deploy the component, but this component is only available to use in UI Builder (UI Builder 1) with path "/now/build/workspaces/'sys_id' " where most of ootb workspaces are not listed. 
Is there any other way to deploy the component to the instance to have it in component catalog for UI Builder(UI Builder 2) with this path "now/builder/ui/edit/components/'sys_id' "or how to edit ootb workspaces in UI Builder 1?

UI Builder 1 is accessible by Workspace Experience > Administration > All Workspaces > open any record > use UI Action "Open in UI Builder"
UI Builder 2 is accessible by Now Experience Framework > UI Builder
Sorry for mixing those two UI Builders, I am not able to find the difference in naming convention for them.

Best regards

2 REPLIES 2

Tushar
Kilo Sage
Kilo Sage

Hi @Mateusz18 

 

There are a few ways to deploy a customized Activity Stream component to the instance so that it is available in the component catalog for UI Builder 2.

One way is to use the now/builder/ui/import/components endpoint.

This endpoint allows you to import a component from a file or from a URL.

To use this endpoint, you will need to create a file that contains the customized Activity Stream component. 

You can then use the following curl command to import the component:

curl -X POST -F file=@<path-to-file> -H "Content-Type: multipart/form-data" https://<instance-url>/now/builder/ui/import/components

Once the component has been imported, it will be available in the component catalog for UI Builder 2.

Another way to deploy a customized Activity Stream component is to use the now/builder/ui/edit/components endpoint.

This endpoint allows you to edit a component that is already in the component catalog.

To use this endpoint, you will need to know the sys_id of the component that you want to edit. You can then use the following curl command to edit the component:

curl -X PUT -F file=@<path-to-file> -H "Content-Type: multipart/form-data" https://<instance-url>/now/builder/ui/edit/components/<sys-id>

Once the component has been edited, it will be updated in the component catalog for UI Builder 2.

 

Finally, you can also edit OOTB workspaces in UI Builder 1. To do this, you will need to open the workspace in UI Builder 1 and then click on the Edit button. This will open the workspace in a code editor where you can make changes to the component. Once you have made the changes, you can save the workspace and it will be updated in the instance.

 


Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Regards,
Tushar

Hey,

Thanks for the reply.
First of all I tried to use the first option you provided, but component have a lot of files, should i create a map out of all the files?
If you could provide me steps to use last option it would be great, i am not able to open any ootb workspace in UI builder 1, maybe there is another way that i dont know.

Best regards