Use this method to log the user information for rating events from a search source.
Note: Remember to set up the session before calling this function.
To start a session see methods generateSession and setSessionToken.
This method accepts only one parameter, which is mandatory.
Name | Type | Description |
---|---|---|
contextGenerator | function | This function's logic needs to generate the desired user information (context) and return it. |
This method has no optional parameters.
This method does not return any values.
const userInfo = {
username: "John Doe",
company: "Inbenta"
};
sdk.client.setSearchContext(() => userInfo);