ePages 6.13.1 - DE_EPAGES/FactFinder/API/FactFinder.pm

Package DE_EPAGES::FactFinder::API::FactFinder

FactFinder API Functions.

@EXPORT_OK
FindFactFinderShops
InitShop
DeleteShop
CreateUser
DeleteUser
GetAllUsers
UpdateUser
ExistsUser
CreateChannel
DeleteChannel
GetAllChannels
ExistsChannel
GetVisibleLanguages
UploadFile
TriggerExtraSchedule
IsTriggerExtraScheduleAllowed
SanityCheck
GetRecommendation
GetProductsFromSearchResult
BuildMatrix

Functions

BuildMatrix
CreateChannel
CreateUser
DeleteChannel
DeleteShop
DeleteUser
ExistsChannel
ExistsUser
FindFactFinderShops
GetAllChannels
GetAllUsers
GetProductsFromSearchResult
GetRecommendation
GetVisibleLanguages
InitShop
IsTriggerExtraScheduleAllowed
SanityCheck
TriggerExtraSchedule
UpdateUser
UploadFile

BuildMatrix

Rebuilds recommendation engine matrix

Syntax
BuildMatrix( $Shop, $Channel, $Remote );
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop
$Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
FactFinder channel
$Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
FactFinder client (optional)

CreateChannel

Creates a factfinder channel remote and locally in the db

Syntax
$Channel = $Object->CreateChannel( $Shop, $Language, $Folder, $Remote );
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
Shop
$Language (hash.ref)
Language
$Folder (DE_EPAGES::Object::API::Object::Object)
parent object for FactFinder channels
$Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
FactFinder client (optional)
Return
$Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
FactFinder Channel

CreateUser

Creates a FACT-Finder User

Syntax
CreateUser($Shop);
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
shop
$ChannelFolder (DE_EPAGES::Object::API::Object::Object)
parent object for FactFinder channels
$Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
FactFinder client (optional)
Return
$hUserData (hash.ref)
created user data. Keys are:
  • FactFinder_Account
  • FactFinder_PasswordMD5
  • DeleteChannel

    Deletes a remote channel

    Syntax
    $Object->DeleteChannel( $Shop, $Channel, $Remote);
    Example
    $Object->DeleteChannel( $Shop, $Channel );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
    FactFinder Channel
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)

    DeleteShop

    Removes FACT-FINDER account from shop.

    Syntax
    DeleteShop( $Shop );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop

    DeleteUser

    deletes a remote user

    Syntax
    $Object->DeleteUser( $Shop, $Remote);
    Example
    $Object->DeleteUser( $Shop, $Remote );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)

    ExistsChannel

    Checks if a channel exists.

    Syntax
    $Exists = ExistsChannel( $Shop, $Remote );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
    FactFinder channel
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)
    Return
    $Exists (boolean)
    True if channel exists, else false

    ExistsUser

    Get FACT-Finder Userlist

    Syntax
    ExistsUser( $Shop, $Remote );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    shop
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)
    Return
    $Exists (boolean)
    true if user exists, else false

    FindFactFinderShops

    Returns ShopIDs of all Shops that have FactFinder feature enabled

    Syntax
    FindFactFinderShops( $FactFinderFeature );
    Input
    $Feature (string)
    FactFinder feature (FactFinderPremium or FactFinderLight)
    Return
    $aShopIDs (array.int.ref)
    List of shop ids

    GetAllChannels

    Lists all remote channels

    Syntax
    $List = GetAllChannels( $Shop, $Remote );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    RemoteFactFinder (optional)
    Return
    $aChannels (array.ref)
    list of channels

    GetAllUsers

    Get FACT-Finder Userlist

    Syntax
    GetAllUsers( $Shop, $Remote);
    Example
    $Users = GetAllUsers( $Shop, $Remote );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    shop
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)
    Return
    $Users (ref.array.object (SOM-Tree))
    user list

    GetProductsFromSearchResult

    Returns an array of products (tle-hashed) for use in SF

    Syntax
    GetProductsFromSearchResult( $Shop, $aRecord );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    shop
    $aRecords (array.ref)
    XML Record structure
    Return
    $aProducts (array.ref.hash)
    product array (tle-hashed)

    GetRecommendation

    gets product list from FACT-Finder recommendation engine.

    Syntax
    GetRecommendation( $Product, $Channel );
    Input
    $Product (DE_EPAGES::Product::API::Object::Product)
    product
    $Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
    factfinder channel
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    RemoteFactFinder (optional)
    Return
    $aProductList (array.ref)
    array of tle-hashed products

    GetVisibleLanguages

    returns the locales selected in the shop

    Syntax
    GetVisibleLanguages($Shop);
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    Return
    $Result (array.ref)
    array ref to the languages

    InitShop

    Initializes Shop for FACT-FINDER

    Syntax
    InitShop( $Shop );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $IsPremium (boolean)
    initialize as premium
    $Force (boolean)
    force initialization
    Return
    $Initialized (integer)
    0 if nothing done , 1 if initialization done

    IsTriggerExtraScheduleAllowed

    Returns true if an extra schedule can be triggered

    Syntax
    $Object->IsTriggerExtraScheduleAllowed( $Shop, $Input2);
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    Return
    $IsAllowed (boolean)
    trigger extra schedule allowed

    SanityCheck

    Check if all necessary system vars are set. If not the Error('RequiredValueMissing') is thrown.

    Syntax
    SanityCheck( );
    Return
    $Ok (boolean)
    true if ok

    TriggerExtraSchedule

    Mark shop for extra export scheduler

    Syntax
    TriggerExtraSchedule( $Shop );
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop

    UpdateUser

    Update user permissions after a change in the channel list.

    Syntax
    UpdateUser($Shop, $Folder, $Remote)
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Folder (DE_EPAGES::Object::API::Object::Object)
    parent object for FactFinder channels (optional)
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)

    UploadFile

    Upload product export file

    Syntax
    $Object->UploadFile( $Shop, $Channel);
    Input
    $Shop (DE_EPAGES::Shop::API::Object::Shop)
    Shop
    $Channel (DE_EPAGES::FactFinder::API::Object::FactFinderChannel)
    FactFinder channel
    $FileURL (string)
    file url
    $Remote (DE_EPAGES::FactFinder::API::Object::RemoteFactFinder)
    FactFinder client (optional)