Record Based Embeddings for Centro AI
Centro AI provides mechanisms for creating AI embeddings applicable to only a single record. That is, a single or collection of Embedding records that are specifically tied to a record in Salesforce. The use case is for queries related to just one record, that surfaces on the record itself in Salesforce or within Slack. The steps to set this up are as follows:
- Create the embedding record. In Salesforce Flow or manually, create a Grok Embedding record. Make sure to set the Topic Name to the ID of the Salesforce record you want to tie it to (eg, and Account, Opportunity, Case, etc). If the Topic Name field is not on the Page Layout, update that in Settings.
- Set the Salesforce UI. Create a Screen Flow. Place a Screen element, then select the Centro Ask Grok custom Component. In the Static Knowledge Topic, set the field to use the merge tag "{!recordId}" (note the capitalized "I" in Id). Make sure this is a Text type variable in the Flow with "Available for input" selected. Activate the Flow when ready.
- Next, when placing the screen flow on the page layout, drag the Flow component then select your newly activated Screen flow. Make sure to select "Pass record ID into this variable":
- Test - only references that should show will be the embeddings tied to this record:
- Note: A clever screenflow author could pre-can questions like so to feed into the prompt:
- Setup the Slack UI: In the Centro Form, when setting up the Deflect Cases, the Knowledge Topic Name can be statically set, or dynamically set to either [[linked_accountid]] or [[linked_recordid]] merge tags. Recall that when linking a channel to an account or record, Centro will detect the most recently linked account or record and merge that field in at time of invocation. Usage behavior works similarly to that described in the Salesforce UI and surfaces only embeddings linked to the record in question.