We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Is it possible to build an Audience via a Script?

G Phoenix
Giga Guru

I have an idea to create an audience (in Content Publishing) based off of logic from the sys_user table (ie, if a user has a specified date in one field I want to create notifications and banners for their specific managers).  I have tried to use the internal Audience logic to create this but have yet to succeed.  I would like to build the audience via a script so that I can include the specific logic in the script and have the script run everyday so that the audience is changed daily.  Is this possible or am I just barking up the wrong tree?

 

Example:  If User's prim_location is 'Florida', then I want to show a banner for that employee's manager.

11 REPLIES 11

Ravi9
ServiceNow Employee

are you talking about audience of content publishing app ? there is audience in workplace suite as well , wasnt sure !

Hey Ravi. Sorry I should have specified, but I was referring to Audiences in Content Publishing.

Ravi9
ServiceNow Employee

hi 

did you figure out already ? or you are still looking for options ! if yes would you mind sharing a bit more details around what you really wanna do ? 

Still looking for options. 

I've gone as far as creating a fresh table with 2 columns, one that holds the users' email address.  I run a scheduled job that performs the logical queries I need and creates a list of email addresses for the users I want to create the audience with.  And that's where the brick wall comes in.  I haven't been able to find a way to make an audience using that array of email addresses.