Service Exchange for Providers FDS Dynamic Filter Using Consumer Connection

ShaneDXC
Tera Contributor

In Service Exchange (currently using version 2.3.29) on a Provider instance, from a Foundation Data Provider Outbound Offering Item [sn_fds_pro_offering_item] record, if I am using a dynamic filter (or alternatively a javascript qualifier) in a condition, how can I get the reference to the associated Consumer connection [sn_sb_pro_consumer_connection] record being used?

We are trying to configure the condition to allow the CSM Account hierarchy to propagate through the Service Exchange connection.

Example:

A CSM account hierarchy is setup in the Provider Instance like the following:

  Boxeo
     └── Boxeo USA 
     └── Boxeo EMEA

           ├── Boxeo France
           └── Boxeo Germany


In this case, the Consumer is Boxeo and they want to be able to receive Cases and FDS data (CI's) for records associated to their account/company as well as any child account/company under them in the CSM account hierarchy (as they are able to see Out-of-Box if they log into the Provider instance).

Right now, I was attempting to address the FDS hierarchy by building a dynamic filter (to use on the Foundation Data Provider Outbound Offering Item [sn_fds_pro_offering_item]) that would return the Consumer account/company and any child account/company in the hierarchy:

ShaneDXC_0-1790702142131.png

However, I am struggling to determine how to obtain the associated Consumer connection record [sn_sb_pro_consumer_connection] for the "Service Exchange Consumer Hierarchy" dynamic filter so I can then get the associated CSM account hierarchy records.

How is the "AccountSecure" check box obtaining the associated Company value from the Consumer connection?

Otherwise, I am open to any alternative solution to achieve the same goal.


=================

As a worst case alternative, I could build a unique Foundation Data Provider Outbound Offering Item for each Consumer connection against their Company value, including multiple levels in the condition:

ShaneDXC_0-1790711978272.png

 

 

1 ACCEPTED SOLUTION

The only thing I can provide about multi-company support is that it will allow associated multiple companies to a single connection. Both the provider and consumer will need to be on the Service Exchange release the feature is released on or later.

 

As far as the solution you mentioned, I think it would work but it could also run into more maintenance by maintaining the same Offerings per hierarchy. Updating an Offering would mean updating many Offerings. Just have to weigh the options and see what works best for your given situation.

View solution in original post

7 REPLIES 7

The only thing I can provide about multi-company support is that it will allow associated multiple companies to a single connection. Both the provider and consumer will need to be on the Service Exchange release the feature is released on or later.

 

As far as the solution you mentioned, I think it would work but it could also run into more maintenance by maintaining the same Offerings per hierarchy. Updating an Offering would mean updating many Offerings. Just have to weigh the options and see what works best for your given situation.

I am still looking to know, if I am trying to build a dynamic filter option that I could use in a Foundation Data Provider Outbound Offering Item, how can I reference the relative Consumer company record? 
There seem to be little options to directly achieve this.  I do see how the  "AccountSecure" check box appears to be obtaining the associated Company value via the FDSSubscriptionUtil script include, and I was hoping not to have to customize anything by simply being able to use a dynamic filter to meet the need.

Hi @ShaneDXC,

I looked into this and I don't think a standard Dynamic Filter Option alone will get you the consumer's company, because of the context the filter runs in:

1. Dynamic filter options are evaluated in the session of the user running the query. In FDS the sync is run by the provider side (scheduled / integration user), not by a consumer user, so things like "my company" resolve to the integration user, not the consumer account.
2. The consumer to account link lives on the Service Bridge consumer/connection record, and as you noticed, the OOB "Account Secure" option is what reads that link (through FDSSubscriptionUtil) to restrict records per consumer. That is the supported no-code way to scope data per consumer today.

So my suggestion:
- If your data has a company/account field, use the Account Secure option instead of a dynamic filter.
- If you need a different relationship (e.g. records linked to the consumer's account through another table), that will need a small extension, and the cleaner place is an extension point/script include in your own scope that receives the consumer connection, rather than a global dynamic filter.

A few questions to narrow it down:
- Which table is the offering item sharing, and how is it related to the consumer company (direct company field or via another table)?
- Which Service Bridge / FDS for Providers version and which family (Zurich, Australia)?
- Did you check whether the offering item's filter is evaluated per subscription or once per offering?

If this helps, please mark it helpful - and share the table details and I can look further.