Skip to content
Product Documentation

Mobile SDK - Resolver setup

This set up sets up the backend for the Mobile SDK.

Resolvers populate the content to outbound feeds (OBF). Without resolvers, no data is available. Use caution when editing or adding resolvers as small mistakes can cause data to not be available.

The resolvers provided in this document are the resolvers that power collections, navigation, article, and site service calls to the mobile SDK. Setting up these resolvers lets content feed into the endpoints that the Mobile SDK uses. To learn more, see How to set up resolvers for outbound feeds.

Confirming the resolver functionality is enabled

Use the following steps to confirm the resolver functionality is enabled in your environment. A different resolver set exists for each environment, so ensure you select the appropriate environment before navigating.

  1. Navigate your organization’s Arc XP home page.

  2. Click the outbound feeds tile under Experiences. PageBuilder opens.

  3. Click Developer Tools > Resolvers from the menu at the top.

  4. Click New Resolver.

  5. Scroll to the Default Template section and expand the drop-down menu. Confirm an ans entry exists. If the entry does not exist, contact your Technical Account Manager and request that the OBF bundle be installed that includes and ANS template. If the template is not installed, discontinue this tutorial until the OBF bundle is installed and the template is available.

Default Resolver Parameters

The following list describes the resolvers that you must set up in order to feed content to the outbound feeds that the Mobile SDK uses.

Testing Notes:

  • OBF only returns published items

  • UUIDs are case sensitive

Navigation

Feeds the site service data. Without this resolver, menus do not show.

  • Regex Pattern: ^/arc/outboundfeeds/navigation/(.*)/$
  • Content Source: site-service-hierarchy
  • Hierarchy: Type = Pattern, value = 1
  • Default Template: ans
  • Default output type: json

Example URL: https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/navigation/mobile-nav/

SDK setup: resolver options for navigation

Collection

Feeds content data when preloading is not enabled.

  • Regex Pattern: ^/arc/outboundfeeds/collection/([^/]*)/$
  • Content Source: collections
  • Collection Alias (only populate ID or Alias): Type = Pattern, value = 1
  • from (integer offset to start from): Type = Parameter, parameter = from, value = 0
    For the from and size values, you must create the parameters using the Add Parameter button under URL Parameters. Create new parameters from and size and keep the pattern .*. You can then use these parameters in the Content and Template Mapping section.
  • Number of records to return (an integer 1-20): Type = Parameter, parameter = size, value = 20
  • ANS Fields to Exclude (use commas between fields): Type = static, value = content_elements
  • Default Template: ans
  • Default output type: json

Example URLs:

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection-full/mobile-video/

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection-full/mobile-video/?size=1 just first item

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection-full/mobile-video/?size=1&from=10 just one item, but start from index 10

SDK setup: resolver options for collection

Collection-full

Feeds content data when preloading is enabled.

  • Regex Pattern: ^/arc/outboundfeeds/collection-full/([^/]*)/$
  • Content Source: collections
  • Collection Alias (only populate ID or Alias): pattern: 1
  • from (integer offset to start from): Type = Parameter, parameter = from, value = 0
    For the from and size values, you must create the parameters using the Add Parameter button under URL Parameters. Create new parameters from and size and keep the pattern .*. You can then use these parameters in the Content and Template Mapping section.
  • Number of records to return (an integer 1-20): Type = Parameter, parameter = size, value = 20
  • Default Template: ans
  • Default output type: json
Note: When the entire article is desired (preLoading is enabled) with each collection call. Subsequent calls for the article ID return the article from cache.

Example URLs:

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection/mobile-video

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection/mobile-video/?size=1 just first item

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/collection/mobile-video/?size=1&from=10 just one item, but start from index 10

SDK setup: resolver options for collection with full article

Article

Feeds content data for articles.

  • Regex Pattern:^/arc/outboundfeeds/article/$
  • Content Source: single-content
  • <strong>_id</strong>: parameter = _id
    For _id, you must create the parameter using the Add Parameter button under URL Parameters. Create a new _id parameter and keep the pattern .*. Select the required checkbox.
  • Default Template: ans
  • Default output type: json

 

 

Example URL:

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/article/?_id=Y5BE6ODY4VBCLHNIPOEOQ3BU7U

Search

Feeds content data for searches.

  • Regex Pattern: ^/arc/outboundfeeds/search/(.*)/$
  • Content Source: feeds-content-api
  • from (integer offset to start from): Type = Parameter, parameter = from, value = 0
    For the from and size values, you must create the parameters using the Add Parameter button under URL Parameters. Create new parameters from and size and keep the pattern .*. You can then use these parameters in the Content and Template Mapping section.
  • Number of records to return (integer 1-20): Type = Parameter, parameter = size, value = 20
  • Tags-Text: Type = Pattern, value = 1
  • Tags-Slug: Type = Pattern, value = 1
  • Include-Terms: Type = static, value = [{"terms":{"type": ["story","gallery","video"]}}]
  • Source-Exclude: Type = static, value = content_elements
  • Default Template: ans
  • Default output type: json
Note: Set up this resolver the way you want your search to work. You could search for keywords or tags or create a custom content source to work the way you want.
This example is for tags but for keywords instead omit the 2 ‘tags’ above and use the same values for ‘keywords’

Example URLs:

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/search/a/

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/search/sample/?size=2

SDK setup: resolver options for search

Search Video

Feeds content data for video-only searches (same as the Search resolver, just filters results for video only)

  • Regex Pattern: ^/arc/outboundfeeds/searchVideo/(.*)/$
  • Content Source: feeds-content-api
  • from (integer offset to start from): Type = Parameter, parameter = from, value = 0
    For the from and size values, you must create the parameters using the Add Parameter button under URL Parameters. Create new parameters from and size and keep the pattern .*. You can then use these parameters in the Content and Template Mapping section.
  • Number of records to return (integer 1-20): Type = Parameter, parameter = size, value = 20
  • Tags-Text: Type = Pattern, value = 1
  • Tags-Slug: Type = Pattern, value = 1
  • Include-Terms: Type = static, value = [{"terms":{"type": ["video"]}}]
  • Source-Exclude: Type = static, value = content_elements
  • Default Template: ans
  • Default output type: json
Note: Set up this resolver the way you want your search to work. You could search for keywords or tags or create a custom content source to work the way you want.
This example is for tags but for keywords instead omit the 2 ‘tags’ above and use the same values for ‘keywords’

Example URL:

https://arcsales-arcsales-sandbox.web.arc-cdn.net/arc/outboundfeeds/searchVideo/sample/

Additional Resources