lib/resources/conversations.js
function(conversationId, properties, callback) {
      conversationId = utils.toUUID(conversationId);
      if (!conversationId) return callback(new Error(utils.i18n.conversations.id));
      utils.debug('Conversation setMetadataProperties: ' + conversationId);

      var operations = [];
      Object.keys(properties).forEach(function(name) {
        var fullName = name;
        if (name !== 'metadata' && name.indexOf('metadata.') !== 0) {
          fullName = 'metadata.' + name;
        }
        operations.push({
          operation: 'set',
          property: fullName,
          value: String(properties[name]),
        });
      });
      edit(conversationId, operations, callback);
    }
function(conversationId, properties, callback) {
      conversationId = utils.toUUID(conversationId);
      if (!conversationId) return callback(new Error(utils.i18n.conversations.id));
      utils.debug('Conversation setMetadataProperties: ' + conversationId);

      var operations = [];
      Object.keys(properties).forEach(function(name) {
        var fullName = name;
        if (name !== 'metadata' && name.indexOf('metadata.') !== 0) {
          fullName = 'metadata.' + name;
        }
        operations.push({
          operation: 'set',
          property: fullName,
          value: String(properties[name]),
        });
      });
      edit(conversationId, operations, callback);
    }
function ( conversationId , properties , callback ) { conversationId = utils . toUUID ( conversationId ) ; if ( ! conversationId ) return callback ( new Error ( utils . i18n . conversations . id ) ) ; utils . debug ( 'Conversation setMetadataProperties: ' + conversationId ) ; var operations = [ ] ; Object . keys ( properties ) . forEach ( function ( name ) { var fullName = name ; if ( name !== 'metadata' && name . indexOf ( 'metadata.' ) !== 0 ) { fullName = 'metadata.' + name ; } operations . push ( { operation : 'set' , property : fullName , value : String ( properties [ name ] ) , } ) ; } ) ; edit ( conversationId , operations , callback ) ; }
Set metadata on a conversation

@param  {String}   conversationId  Conversation UUID
@param  {Object}   properties      Properties object
@param  {Function} callback        Callback function
Set metadata on a conversation