Update Case Details

Updated 

sprChat('updateConversationContext')

This API can be used when we want to update custom fields/context in the middle of an ongoing conversation.
Parameters:

(every parameter is optional unless marked *):

Name

Typescript type

Description

Default Value

context*

StringTMap<string[]>

Map of custom field ids vs their value that should be updated on the conversation

-

conversationId

string

Sprinklr defined conversation ID

Latest active and open conversation


Examples 

  1. Updates  '_c_abcdef123' custom field’s value as '123' on the conversation with ID 'conv_1'.

window.sprChat('updateConversationContext', {
  conversationId:
'conv_1',
  context: {
'_c_abcdef123': ['123'],
  }
});


  1. Updates  '_c_abcdef123' custom field’s value as '123' on the latest active and open conversation

window.sprChat('updateConversationContext', {
  context: {
'_c_abcdef123': ['123'],
  }
});



sprChat('updateClientContext')

This API can be used when we want to update custom fields/context for all the new conversations that will be started after this update.
Parameters:

(every parameter is optional unless marked *):

Name

Typescript type

Description

Default Value

clientContext*

StringTMap<string[]>

Map of custom field ids vs their value that should be updated on the conversation

-


Examples 

  1. Stores  '_c_abcdef123' custom field’s value as '123' to be updated on all the conversation that are created from now on.

window.sprChat('updateClientContext', {
'_c_abcdef123': ['123'],
});