calling js from js | Community
Skip to main content
Level 3
January 4, 2025
Solved

calling js from js

  • January 4, 2025
  • 1 reply
  • 707 views

Hi All , 

while learning i got below 2 Questions , Can someone please give brief idea about these.

 

1) Let's say we have 2 JS codes (JS1 ,JS2 ) , how can we call JS2 from JS1 (can't use external signal as both JS are in  same workflow but in different transitions/part of workflow) , Do we have any function or method  to call another JS for above case.

 

2) what are Number of ways in which we can create schemas and how many different types of schema we can create in ACC.

 

Thanks in Advance.

Best answer by DavidKangni

@at7140 

Yes,it's possible. You can try to replicate Refresh for deliverability workflow approach. 

But basically, it's 2 js and one is calling the other one by loading the library before 

loadLibrary('nms:deliverabilityClient-v2.js'); deliverabilityUpdateV2();

 

Thanks,

David

1 reply

ParthaSarathy
Community Advisor
Community Advisor
January 5, 2025

Hi @at7140 ,

For case-1, you can use Jump activity.

In the above workflow diagram JS1 andJS2 are in different transition / part of the workflow and once the workflow starts, JS-2 will get triggered after JS-1.

2) Schema cam be created under /Administration/Configuration/Data schemas/ . Types - Creating a new schema in adobe campaign default database postgreSql; To edit out of the box schema - extend the OOTB schema and editing; If Campaign is connected with external databases like snowflake, create the schema by accessing the external database table.

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
at7140Author
Level 3
January 6, 2025

Hi @parthasarathy 

above logic seems good to me , but do we have any in built function/method in js by which we can call other js2 directly from js1(wishing to write some code in JS1 itself if possible).

DavidKangni
Community Advisor
DavidKangniCommunity AdvisorAccepted solution
Community Advisor
January 6, 2025

@at7140 

Yes,it's possible. You can try to replicate Refresh for deliverability workflow approach. 

But basically, it's 2 js and one is calling the other one by loading the library before 

loadLibrary('nms:deliverabilityClient-v2.js'); deliverabilityUpdateV2();

 

Thanks,

David

David Kangni