Skip to content

Instantly share code, notes, and snippets.

@daltonbr
Created December 27, 2023 09:10
Show Gist options
  • Save daltonbr/5fb6d988b254e7b0ef61f280bff14f76 to your computer and use it in GitHub Desktop.
Save daltonbr/5fb6d988b254e7b0ef61f280bff14f76 to your computer and use it in GitHub Desktop.
mapping data to cif dictionary in Helpshift
private Dictionary<string, object> GetConversationConfig(Dictionary<string, object> cifDictionary)
{
Dictionary<string, object> configMap = new()
{
//{ "fullPrivacy", MagCenterSettings.HelpshiftConfig.FullPrivacy },
{ "enableContactUs", _helpshiftSettings.GetEnableContactUsSetting(_segmentationPersistedDataAdapter) },
{ "tags", new[] { _helpshiftSettings.GetPayerSubscriberTag(_segmentationPersistedDataAdapter) } },
};
cifDictionary ??= new Dictionary<string, object>();
cifDictionary["userEmail"] = _corePlayerPersistedDataAdapter.GetEmail();
cifDictionary["userId"] = _corePlayerPersistedDataAdapter.GetUserId().ToString();
configMap.Add("customIssueFields", cifDictionary);
return configMap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment