Query conversations by custom participant attribute

Through API, Is there a way to query all conversations which have a custom participant's attribute value?

1 Like

Hello,

No, unfortunately, participant attributes cannot be used as a filter of a query for conversation details.

Some info here on Conversation detail query and on Detail query syntax in case you are not familiar with this API endpoint already.

The two ways I am aware of, to perform a query on conversations, searching for a a specific custom value:

  1. Index custom property

Participant attributes are not something you can leverage as a filter in an Analytics Query for conversation details or in an Aggregate Query.

In order to leverage a specific custom property to be leveraged in a filter of an Analytics Query for Conversation Details, you'll need to do one more thing via API which is to index conversation properties using POST /api/v2/analytics/conversations/{conversationId}/details/properties.

You can check these two other posts which relate to the indexing of conversation properties: Here and here.

You can then define a filter (segmentFilter) with a predicate that leverages this custom property (type: property + property:name of the property + propertyType:set to bool or integer or real or date or string or uuid + value/operator)

  1. External Tag

Otherwise, if you are not using it for another purpose already, you could leverage the externalTag attribute (single attribute/value).
externalTag will be rendered when requesting Conversation context (Conversations API) or Conversation Details (Analytics API).
You can use the external Tag to store an identifier for your customer (external identifier) or anything you want.

The externalTag can be set using Set External Tag action in an Architect flow, or using the API with PUT /api/v2/conversations/{conversationId}/tags

externalTag can be leveraged in an Analytics filter (or I think in groupBy in an Aggregate query as well) - but that part is still in Preview.
See the list of available dimensions for conversation details and the dimensions for Aggregate queries.

As I just wrote above, the use of externalTag as a dimension in Analtyics appears to be in Preview at this stage.
Which means that you can try/use it (when an API endpoint is in preview, it is not included yet in the SDK or in the API Developer Tools - but you can invoke it via code or Data Action providing the full url/path) but the restrictions displayed at the top of the Preview APIs page apply:
->
Limited Access and Breaking Changes

The API resources on this page are available in a limited capacity as a preview of resources that are intended to be released publicly at some point in the future. Access to these resources is often restricted by feature toggles enabled on a per-org basis. These resources are subject to both breaking and non-breaking changes at any time without notice. This includes, but is not limited to, changing resource names, paths, contracts, documentation, and removing resources entirely.

Regards,

1 Like

I see it is included at least in the C# SDK v131, should I take it as out of Preview and fully released?

I think it is in Preview as long as the dimension is ticked (Preview Column) in the list of available dimensions for conversation details and the dimensions for Aggregate queries if you were asking about the Analytics queries.

Regards,

1 Like

on the External Tag maximum length, Architect notes it as 36, any plans on extending it or reasons why to keep it at that limit?

No, I don't think there is a current plan to extend it.
Regarding the reason for that limit, I don't know - likely due to indexing constraints (on the analytics service I guess).

You can always request a new feature (extending it) and share your use case at https://genesyscloud.ideas.aha.io/

Regards,

The externalTag is not tagged as Preview anymore.
So it appears to be fully released now - I mean using externalTag as a filter in queries for conversation details or for conversation aggregates.

Regards,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.