Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Data Store Permission

Hi,

I use Google Dialogflow CX.
I created data store and added my unstructured HR documents
then related data store with a page of my flow.
All documents won't be available for all employees, I want to restrict some documents
considering employee company code etc.
How can I do ?

Thanks

0 2 88
2 REPLIES 2

State handlers  |  Dialogflow CX  |  Google Cloud

Data stores  |  Dialogflow CX  |  Google Cloud

To restrict access to specific HR documents in Dialogflow CX based on employee attributes like company data, you can implement access control through a webhook approach. 

You can use the data store as a webhook and control access through your webhook logic. This approach gives you the flexibility to implement custom authorization rules before retrieving documents.

Set up a webhook that will be called before accessing your data store

  1. In your webhook code, include logic to:
  2. Extract the employee's company data from the conversation context
  3. Check authorization against your access control rule
  4. Only retrieve and return documents the employee is authorized to access

Thanks for the answer.

But I only relate page with datastore (choosing data store) on the interface so I couldn't get "retrieve and return documents the employee is authorized to access" part.