Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Approach on scoping RITM to our application integration

drewrodrigu
Giga Contributor

Hey there! We're building an store integration where we're creating a catalog entry with question fields (which adds variables to the RITM). What's a good approach to ensure our business rules and workflows only trigger on items created from our catalog item—since the requested item table is a public table (that other catalog entries create entries on too).

 

I'm thinking of adding a variable like `_our_app_name` that we check in our workflows and business rules, otherwise we don't run them.

 

Is there a better approach than this since other items can add this variable as well and accidentally trigger our rules?

4 REPLIES 4

Riya Mukherjee
Tera Expert

Hi @drewrodrigu ,

Tell me if i understood correct, you are building a record producer(creating records on RITM) for a specific catalog item related to the store integration work. In business rule or flow designer you can run them specifically for your catalog item where in business rule you can have the filter condition as "Item is <Name>" and in the flow designer you can select Application as Service catalog in the Trigger and then further add a flow logic as below snip to continue as per your requirement. You don't need to create a separate variable to distinguish your catalog item records.

RiyaMukherjee_0-1777103102339.png

A suggestion, just to make it more contained and secure , using scoped application approach to have all flow, BRs and catalog item stuffs in one roof is also a way to cater this requirement.


“Let me know if this works—feel free to mark helpful if it does!”
Thanks
Riya

Ah, so you're triggering the workflow for the specific catalog item—okay awesome! Thanks for the help!

Happy to help! If this answered your question, you can mark it as helpful so it may benefit others as well.

Tanushree Maiti
Kilo Patron

Hi @drewrodrigu 

 

1) When you are creating BR,

Table: Requested Item (sc_req_item)
When: async or after or before ( as per your requirement).
Condition: Cat Item | is | [Your Catalog Item Name]

 

If you do not update condition , from script you can check catalog name and run your logic for that specific catalog
Advanced Script:

if (current.cat_item == '<sys_id_of_your_catalog_item>')

{
//your code
}

 

2. Workflow is legacy . Here the process which ensure Workflow is running for specific catalog

  • Navigate to Service Catalog > Maintain Items.
  • Open your specific Catalog Item.
  • In the Process Engine tab, set the Workflow field to your custom workflow.

3. Flow: 

a. 

  • Trigger: Service Catalog
  • Action: Add a Get Catalog Variables action to access item-specific data.

b. Also check ,

  • Navigate to Service Catalog > Maintain Items.
  • Open your specific Catalog Item.
  • Check Flow : if the specific flow is attached

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: