MergeUsers

Extends \Recombee\RecommApi\Requests\Request

Merges interactions (purchases, ratings, bookmarks, detail views .

..) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two together becomes desirable. Merging happens between two users referred to as the target and the source. After the merge, all the interactions of the source user are attributed to the target user, and the source user is deleted.

package

Default

Methods

Construct the request

__construct(string $target_user_id, string $source_user_id, array $optional = array()) 
Throws
\Recombee\RecommApi\Requests\Exceptions\UnknownOptionalParameterException

UnknownOptionalParameterException if an unknown optional parameter is given in $optional

Arguments

$target_user_id

string

ID of the targer user.

$source_user_id

string

ID of the source user.

$optional

array

Optional parameters given as an array containing pairs name of the parameter => value

  • Allowed parameters:
    • cascadeCreate
      • Type: bool
      • Description: Sets whether the user targetUserId should be created if not present in the database.

Get body parameters

getBodyParameters() : array
inherited abstract

Response

array

Values of body parameters (name of parameter => value of the parameter)

Returns true if HTTPS must be chosen over HTTP for this request

getEnsureHttps() : boolean
inherited

Response

boolean

true if HTTPS must be chosen

Get used HTTP method

getMethod() : static
inherited abstract

Response

static

Used HTTP method

Get URI to the endpoint

getPath() : string
inherited abstract

Response

string

URI to the endpoint

Get query parameters

getQueryParameters() : array
inherited abstract

Response

array

Values of query parameters (name of parameter => value of the parameter)

Get request timeout

getTimeout() : integer
inherited

Response

integer

Request timeout in milliseconds

Sets if HTTPS must be chosen over HTTP for this request

setEnsureHttps( $ensure_https) 
inherited

Arguments

$ensure_https

Sets request timeout

setTimeout( $timeout) 
inherited

Arguments

$timeout

Properties

ID of the targer user.

target_user_id : string
var

ID of the targer user.

Type(s)

string

ID of the source user.

source_user_id : string
var

ID of the source user.

Type(s)

string

Sets whether the user *targetUserId* should be created if not present in the database.

cascade_create : boolean
var

Sets whether the user targetUserId should be created if not present in the database.

Type(s)

boolean

Array containing values of optional parameters

optional : array
var

Array containing values of optional parameters

Type(s)

array

Timeout of the request in milliseconds

timeout : integer
inherited
var

Timeout of the request in milliseconds

Type(s)

integer

Sets if the HTTPS must be chosen over HTTP for this request

ensure_https : boolean
inherited
var

Sets if the HTTPS must be chosen over HTTP for this request

Type(s)

boolean