Creating views
The View Builder takes you through the steps needed to create a view. Select the fields you want to view and add any filters to limit the view data.
You can either create a view or import one or more JSON files containing view definitions to view or edit as needed.
To create a view:
In the View Explorer, click the Add View button at the top right of the views data table.
Choose the subject area you want to generate a view for.
Do one of the following:
To build your view from scratch, select Blank <Subject Area> View to open the Create View page.
To import one or more JSON files containing view definitions, click the Select button next to Import View Definitions from JSON, select the file (or files), and click Open. If you previously exported a view definition with publishing options selected for the view on the Create View page, these options are retained and are imported with the view definition.
If you imported a JSON file (or files), the view data is populated immediately. Skip the remaining steps in this procedure and edit the view parameters as needed. For more information, see Modifying views.
Enter a meaningful name for the view, and, optionally, provide a description.
On the Create View page in the Data Selection tab, and in the Fields section, click the Select button, and select fields from the following tabs:
Basic tab:
In this tab, you can select attributes and calculated attributes that are persisted to the database. Calculated attributes are identified using theicon.Advanced tab:
In this tab, you can select attributes that are available in the Basic tab, attributes that are not persisted to the database, and calculated attributes that are or are not persisted to the database. Non-persistent attributes are identified using the icon.To display more information about an attribute in the Basic or Advanced tabs, hover over the icon for the attribute to display its name and type. To display more information about a collection, hover over the icon to display its name, type, and name attribute information.
If you know the names of the fields you want to add, you can directly enter the field name in the Add Fields text search field. A similar search field is available within the Add Fields dialog. For more information about searching for fields, see View fields.
Some primary subject area fields have associated fields that are available for selection. For example, if you are creating a view definition for the Contacts subject area, you can expand the Home Phone field to select associated fields and display additional data in the preview data table, as shown in the following screenshot:
Optional: In the Filters section, select the filters you want to apply to refine your view data:
Filtering for persistent attributes is supported but filtering for non-persistent attributes is not currently supported.
Click the Select button to open the Add filters dialog and select the required filters. To display more information about an attribute that can be selected as a filter, hover over the icon for the attribute to display its name and type.
If you choose to select filters that use Character Large Object (CLOB) data type attributes (for example, by selecting Activities > Notes as a filter), you may experience reduced snapshot publishing performance.
In the Enter filter dialog, do one of the following:
If you see a list of values you can select from, select the values you want to include.
If you see fields for an operator and a text or numeric field value, select the operator and specify the values. For more information, see Using operators.
Available operators vary based on the attribute type.
Click Save.
The fields to which you applied filters are highlighted in green.
Optional: Select from the following options in the Publishing Options tab:
Snapshot Configuration
Enable or disable snapshot publishing by selecting or clearing Snapshot Publishing Enabled.Before you can select snapshot Schedule options, Snapshot Publishing Enabled must be selected.When a user deletes a major NexJ CRM object (such as an entity or activity) from the NexJ CRM user interface, it is considered to have a soft-deleted record, as the record remains in the database. You can enable or disable the output of soft-deleted records as part of snapshots by selecting or clearing Include deleted records.
Select which records will be published when you publish a snapshot for the publishing endpoints by selecting from the following options:All records
Publishes all field records in the system that apply to your view definition.Changes (primary fields)
Publishes only primary subject area field records (for example, contact records for the Contacts subject area) that have been added or updated since the last time a snapshot was published for this view.For example, if a user changes a contact's first name in NexJ CRM, and you create a view definition for the Contacts subject area that includes the First Name field, and select Changes (primary fields), the first name change will be exported as part of a delta snapshot. If a user has changed an associated field (for example, the contact's phone number), and you create a view definition that includes the Number associated field for the Home Phone field, the record for the associated field will not be published with the delta snapshot.Changes (primary or associated fields)
Publishes primary subject area field records (for example, contact records for the Contacts subject area) and their associated fields records (for example, a contact's phone number or address), when the associated field records have been added or updated since the last time a snapshot was published.For example, if a user changes a contact's first name and the city for the contact's home address in NexJ CRM, and you create a view definition for the Contacts subject area that includes the First Name field, and the City associated field for the Home Address field, and select Changes (primary or associated fields), the records for the changed first name and city will be published with the delta snapshot.
If your view definition does not include associated fields, then user updates to associated fields will not be exported
You can set up the snapshot schedule in the snapshot Schedule section. The default frequency is None, which runs the snapshot immediately. If you want a snapshot to publish only once, but at a future time, select Once, and specify the desired date and time. If you want it to run periodically, select Daily, Weekly, or Monthly, and specify the start date and time. The snapshot runs for the first time at the start date and time, and will continue running periodically as specified in the schedule. Select either Kafka, File (Delimited), File (JSON), or HTTP as your publishing target.
The About tab on the View Details page shows the next scheduled run time for the snapshot.
If a snapshot fails to run at the scheduled time, an error displays in the Errors tab for the view. If you see an error, try re-running the snapshot. This may resolve any failures due to temporary server issues. If it is a recurring scheduled snapshot, the system will reattempt to run the snapshot at the next scheduled time. If the issue persists, contact your administrator with the error code.
Kafka Configuration
You can provide a Kafka topic name for the view in the Topic name field. The Kafka topic name is displayed in the About tab for the view.You can use the same Kafka topic name for multiple views.
When providing a topic name, you should be aware of the following rules:
Topic names cannot exceed 209 characters
Valid characters include a - z, A - Z , 0 - 9, period ("."), underscore ("_"), and hyphen ("-")
The topic name cannot just be a period (".") or ".."
Use either a period (".") or underscore ("_") but not both to avoid collision issues
You can choose either the JSON message format or the Avro message format to use with Kafka for snapshot publishing and streaming exports.
As of Data Bridge 3.3.0.1, you can also specify the Kafka namespace and schema name. Both namespaces and schema names can only start with an alphabetical character. Use the following characters when specifying them:For namespaces, use a - z, A - Z , 0 - 9, "." or "_" (not both of them)
For schema names, use a - z, A - Z , 0 - 9, "_"
HTTP Configuration
You can publish event streaming updates to an HTTP URL instead of Kafka by completing the following fields:HTTP URL: Enter the URL that will receive the event streaming updates (for example,
http://<host>/channel/brg:HTTPReceiver?
). This URL will be used for both streaming and snapshot publishing.HTTP Sender Channel: Enter the HTTP channel that will be used to send messages to the HTTP URL (for example,
brg:HTTPSender
). You can use an out-of-the-box HTTP channel or create your own channel. You must specify the channel in your environment file. For more information, see Data Bridge 3.6.x deployment.HTTP Custom Header: (Optional) You can enter a custom header that provides additional information (for example, enter
secret
for an API to call a web hook). When specified, the custom header will be added to every outgoing HTTP request for the view. For more information about custom headers, see Creating custom headers for HTTP targets.HTTP Custom Header Class: (Optional) You can enter the name for the class you created at design time (for example,
brg:CustomHTTPHeader)
.HTTP Custom Header Event: (Optional) You can enter the event name you created at design time (for example,
getXhookKey
).HTTP Custom Header Value: (Optional) You can enter a header value (for example,
ad67e009
). If you have already entered an HTTP custom header class, the class will take precedence over the header value you have entered.
Publishing Target Mapping
Before you can assign publishing targets to views, you must have created them in the Publishing Targets workspace. For more information, see Managing publishing targets.
A view can have multiple publishing targets. To add a publishing target to a view, click the Add Target button in the Publishing Target Mapping section, enter the name of your target in the Publishing Target field, or click the Select button to search for and select the required target, and select one or more of the following options:
Snapshot Enabled - Select this option to enable the publishing of a snapshot for the selected view.
Streaming Enabled - Select this option to continuously stream changes from NexJ CRM to a Kafka publishing target or HTTP publishing target for the selected view in real time. You cannot stream changes to a File (Delimited) or File (JSON) publishing target. You can only configure one publishing target to be streaming enabled for a view.
Scheduling Enabled - Select this option to enable scheduling the publishing of the selected view.
Click the Save button .
The View Details page opens that displays the current full data for the view.
Mapping multiple views to shared virtual schemas
You can configure multiple views to participate in a shared virtual schema by providing the same topic name, schema name, and schema namespace values for the views. A shared schema consists of a combination of all the attributes defined in the participating views, and that schema will be applied when publishing snapshots to JSON files, and publishing streaming updates to Kafka when you have selected the JSON or Avro message formats in the Publishing Options tab. When exported, any attribute in a shared schema but not in a view will export as "null."
If any of the following attributes is unique to a view, the schema is considered unique and not shared:
topic name
schema name
schema namespace
Using operators
Data Bridge provides the following operators in the Filters section for views:
Operator | Description | Types of fields |
---|---|---|
equals | Search for records with an exact match for the specified field value(s). If the field(s) have a defined list of possible values then you can select one or more from the available items. If the field(s) do not have a defined list of values then the equals operator searches for the exact text that you enter or the exact date you select. |
|
not equals | Search for records where the specified value(s) does not match the value of the specified field(s). If the field(s) have a defined list of values, then you can select one or more options from the available list. If the field(s) do not have a defined list of values, then the not equals operator searches for records that do not match the exact text that you enter or the exact date you select. Search results with a not equals operator do not include records for which the attribute is not set. |
|
specified | Search for records that have a value specified for the field. |
|
unspecified | Search for records that do not have a value specified for the field. |
|
less than | Search for records in which the value of the specified field is less than the value you specify in your search. |
|
less than or equal to | Search for records in which the value of the specified field is less than or equal to the value you specify in your search. |
|
greater than | Search for records in which the value of the specified field is greater than the value you specify in your search. |
|
greater than or equal to | Search for records in which the value of the specified field is greater than or equal to the value you specify in your search. |
|
contains | Search for records in which the value that you specified matches the whole or part of the value for the specified field. |
|
does not contain | Search for records in which the value that you specified does not match any part of the value for the specified field. |
|
between | Search for records in which the value for the specified field is between the Lower bound and Upper bound field values that you specify. For a numerical field the search results include records with values that match the lower and upper bound values. For a date field the search results include records with values that match the lower bound value, but do not include records that match the upper bound value. |
|
equals today | Search for records in which the value for the specified field is today's date, including the year. | Date |
in the previous (days) | Search for records in which the value for the specified date field is a date in the past within the specified number of calendar days. For example, if you select the in the previous (days) operator and specify two days in the Days field, the search results include records for yesterday and the day before yesterday. | Date |
in the next (days) | Search for records in which the value for the specified date field is a date in the future within the specified number of calendar days. For example, if you select the in the next (days) operator and specify two days in the Days field, the search results include records for tomorrow, and the day after tomorrow. | Date |
today or before | Search for records in which the value for the specified date field is either today's date or a date that has passed. | Date |
today or after | Search for records in which the value for the specified date field is either today's date or a future date. | Date |