glennguzzo
ServiceNow Employee
ServiceNow Employee

Service Bridge natively doesn't support domain separation, not currently mentioned here.

https://www.servicenow.com/docs/bundle/yokohama-platform-security/page/administer/company-and-domain...

 

Went about identifying whether it could be supported for a Remote Task between a Domain Separated 'Consumer' and a 'Provider'.

 

The scenario.

A service provider runs a Domain Separated instance to host shared fulfilment/resolvers, etc, of many customer environment/s.   They work with a Service Desk (either ran by the Service Provider or by the customer or both) within the ITSM suite.   The Service Desk would need to collaborate or hand off that Incident to a shared services ran by the Service Provider as a Case, so they would trigger a Remote Task (Case) with them on another instance from the business impacting Incident.

 

Consumer

Provider

incident

sn_customerservice_case (Case)

 

The challenge:

  • Service Bridge only allows 1 URL endpoint between the same provider & consumer instance, and the Connection is tied to a 'Company' of the Provider.

glennguzzo_0-1745908557789.png

 

The solution idea:

  • Build another 'lane' inside the Remote Task definition, to store the Company being referred to, and ensure it finds the right 'lane' to land on at either end (Company or Domain)

The only 'Data' pre-requisite:

  • The Domain Display value on the Consumer (Domain Separated instance), must match the Company Display Value on the Provider instance.

Direction : Provider (non Domain Separated) to Consumer (Domain Separated)

glennguzzo_1-1745908588299.png

Addition of a field to 'customer_account' to connect the Service Bridge > Consumer Connection

  • Customer_account.u_consumer – Reference to ‘sn_sb_pro_consumer_connection’. (Scope: Service Bridge for Providers)
    • A field Level ACL was also added to ‘read’ this field for Role ‘sn_sb.remote_task_creator’ to allow the creation SubFlow (mentioned in later slides) to be run as that user.
  • When provisioning the customer account it will need this populated.

Addition of a new UI Action to call a SubFlow to trigger the Remote Task to the Consumer - 'Create Remote Task on MSP Consumer'  - this is displayed if there is a Remote Task Definition for the Current Record’s Table & there is a Consumer Reference from the Current Account record Only.   (Note:  this may have to be extended to other tables where the Company field is required at a later point)

  • This triggers a SubFlow in the Foreground, with Inputs for Reference to Case record :sn_sb_pro.create_remote_task_for_related_companies
  • If successful, returns a Remote Task number for Display as an Information message, otherwise, an Error Message is returned to the user.
  • In addition, requires the Role ‘sn_sb.remote_task_creator’ (Note: CS8023999 & PRB1863882 has been raised for similar role for OOTB UI Action)

SubFlow : Create Remote Task for Related Companies

  • Security: Run as User and requires role ‘sn_sb.remote_task_creator’
  • BEGIN - If Parent Remote Task does not exist.
    • Action: Check Account for Remote Task Definition – this checks there is a Consumer & a valid ‘Account’ criteria (or Consumer Criteria) for the Remote Task Definition.
    • Note: the code looks more complex as it should, as I found the user without Admin, had issues with DotWalk, so there are more inputs & outputs as I would otherwise ideally like to add.
    • If we find an Account, then Create the Remote Task, with
      • Company = case.Account
      • Consumer Connection = case.account.u_consumer
    • Look up latest Published Remote Task Definitions (RTD) where Case is Provider Table
    • Foreach RTD

Error handling logic has been included to display message to the User.  If this occurs, we hope your Datacom Case Agents will be in touch with you!

 

The Hello World Remote Task Definition

 

  • Packaged in ‘Global’ scope – theoretically this should work in scope ‘Service Bridge for Providers’ - Name = Case to Incident MSP V1
  • Send Attachments & Maintain SysID
  • Consumer Criteria – All Accounts
  • Provider : sn_customerservice_case to incident (direct field unless stated)
    • Short_description (insert)
    • Description (insert)
    • Company - account > company (insert)
  • Consumer : incident to sn_customerservice_case
    • Short_description (insert)
    • Description (insert)
    • Domain – sys_domain.name > correlation_display (insert & update)

 

Consumer Business Rule:

  • Set Company - Provider Remote Task (sn_sb_con_remote_task) – Global
    • Before/insert, where Source=false (e.g. comes from Provider)
    • Takes ‘inbound_vars_json’ and takes company field, and looks for ‘core_company’ and sets ‘company’ and ‘sys_domain’ on the Remote Task

 

Direction : Consumer (Domain Separated) to Provider (Non Domain Separated)

glennguzzo_2-1745908622252.png

Provider Business Rule

  • Set Company - Consumer Remote Task (sn_sb_pro_remote_task) – Global
    • Before/insert, where Source=false (e.g. comes from Consumer)
    • Takes ‘inbound_vars_json’ and takes company field, and looks for ‘core_company’ and sets ‘company’ on the Remote Task
4 Comments