UpdateChatDataFieldEx

This method is used to update the field in the Chat Data map with the value in a business component field. This method is typically used as a preceding step for the UpdateWithBCFieldEx method. For example, if QueryField is set to the SR Number business component field in UpdateWithBCFieldEx and to the SRNumber value in the Chat Data map, then the SRNumber value in Chat Data map expires if the agent associates a new service request with the chat activity. As a result, you must update the SRNumber value in the Chat Data map before SR Number is used in UpdateWithBCFieldEx. The following table shows the input arguments for UpdateChatDataFieldEx.

UpdateChatDataFieldEx Method: Input Arguments

Input Argument Description

InteractionId (Optional)

The value in this argument is the interaction ID that you want to update if IsSingleChat is set to True. The value in this argument is ignored if IsSingleChat is set to False.

For new and transferred chats, IsSingleChat is always set to True.

IsSingleChat (Optional)

If set to True, then it indicates to update the value provided for InteractionId. If set to False, then it indicates to update the value for all chats. For new and transferred chats, IsSingleChat is always set to True.

BusObj

The business object, for example, Action.

BusComp

The business component in the business object, for example, Action.

QueryFields

The Query Field list to use to query the value in ValueField (for example, Id). You must provide the value in Chat Data for the query field. For example, provide the Activity Id in Chat Data for Id.

The comma-separated field list indicates the field name list to use to query the business component.

For query search specification, you must also define a corresponding key value pair. For example, if QueryFields is set to Id and Contact First Name, then a list of key value pairs must also be provided as follows:

Id=Activity Id

Contact First Name = firstname

Id and Contact First Name are the query business component field names. Activity Id and firstname are the corresponding Chat Data fields.

UpdateField

The field that you want to update in the Chat Data map.

Value Field

The business component field that you want to get the value from.

Example

If you want to update the SRNumber field in Chat Data map with the SR Number value in the Action business component, Id is used as the query filter and is set to the value of the ActivityId field in Chat Data map. That is, the ActivityId value in Chat Data map is used as the query filter to query the Action business component record to obtain the SR Number value in the Action business component record. The SR Number value is then used to update the SR Number field in Chat Data map, so that it has the latest value if a new service request is associated with the chat activity.

The ActivityId field value in Chat Data map is not always changed in the chat session, but the SRNumber field value in Chat Data map is changed if a new service request is associated with the chat activity. Therefore, the UpdateChatDataFieldEx method is used to update SRNumber before the SRNumber field value in Chat Data map is used in the next workflow step. To update SRNumber for all chats, the input is as follows:

InteractionId = 
IsSingleChat = FALSE
BusObj = Action
BusComp = Action
QueryFields = Id            // the field of Activity Id in Action BC
Id = ActivityId             // the field of Activity Id in Chat Data map
UpdateField = SRNumber      // the field of SR Number in Chat Data map
ValueField = SR Number      // the field of SR Number in Action BC