Logidav Docs

SavWorkflowService
in package

Table of Contents

Properties

$chatbotUserId  : mixed
$container  : mixed
$logger  : mixed
$planningService  : mixed
$refundService  : mixed
$saleSavService  : mixed
$saleService  : mixed
$shippingService  : mixed
$slugMapping  : mixed
$userService  : mixed

Methods

__construct()  : mixed
createStandardSav()  : array<string|int, mixed>
Crée un SAV standard. Les propositions sont optionnelles.
executeCancellation()  : array<string|int, mixed>
Exécute l'annulation d'une commande ou de produits spécifiques Cette méthode effectue uniquement l'annulation, sans calculer les montants
executeCancellationWithSav()  : array<string|int, mixed>
Gère l'annulation complète avec création SAV et pré-remboursement Scénario : Annulation avant expédition
getProductPrice()  : array<string|int, mixed>
Calcule le prix final d'un produit (Prix produit + Livraison) selon la logique Menzzo.
buildSavObservation()  : string
Construit l'observation client pour le SAV
configureSavPropositions()  : void
Configure deux propositions pour un SAV créé par le chatbot Proposition 1: Bon d'achat 115% + Chatbot IA + Refusé (0) Proposition 2: Remboursement intégral/partiel + Chatbot IA + Accepté (1)
configureSavPropositionsForGiftCard()  : void
Configure une seule proposition pour un SAV créé avec bon d'achat 115% Proposition: Bon d'achat 115% + Chatbot IA + Accepté (1)
createSavForCancellation()  : mixed
Crée un SAV pour l'annulation avec deux propositions configurées Proposition 1: Bon d'achat 115% (refusé par défaut) + Communication Chatbot IA Proposition 2: Remboursement totale/partiel + Communication Chatbot IA + Accepté (1)
createSavForGiftCard()  : mixed
Crée un SAV pour l'annulation avec bon d'achat 115% Une seule proposition: Bon d'achat 115% + Chatbot IA + Accepté (1)
executeFullSaleCancellation()  : array<string|int, mixed>
Exécute l'annulation complète de la commande
executeProductsCancellation()  : array<string|int, mixed>
Exécute l'annulation de produits spécifiques
generatePropositionId()  : string
Génère un ID unique pour une proposition
getExistingPreRefundAmount()  : float
Calcule le montant total des pré-remboursements existants pour une commande
handleProductsCancellationWithGiftCard()  : array<string|int, mixed>
Gère l'annulation de produits spécifiques avec création SAV et bon d'achat 115%
handleProductsCancellationWithSav()  : array<string|int, mixed>
Gère l'annulation de produits spécifiques avec création SAV
handleSaleCancellationWithGiftCard()  : array<string|int, mixed>
Gère l'annulation d'une commande complète avec création SAV et bon d'achat 115%
handleSaleCancellationWithSav()  : array<string|int, mixed>
Gère l'annulation d'une commande complète avec création SAV

Properties

$slugMapping

private mixed $slugMapping = ['geste-co-5-percent' => 'geste co 5%', 'geste-co-10-percent' => 'geste co 10%', 'geste-co-15-percent' => 'geste co 15%', 'geste-co-20-percent' => 'geste co 20%', 'geste-co-25-percent' => 'geste co 25%', 'geste-co-30-percent' => 'geste co 30%', 'geste-co-35-percent' => 'geste co 35%', 'geste-co-40-percent' => 'geste co 40%', 'geste-co-45-percent' => 'geste co 45%', 'geste-co-50-percent' => 'geste co 50%', 'geste-co-55-percent' => 'geste co 55%', 'geste-co-60-percent' => 'geste co 60%', 'geste-co-65-percent' => 'geste co 65%', 'geste-co-70-percent' => 'geste co 70%', 'geste-co-75-percent' => 'geste co 75%', 'geste-co-80-percent' => 'geste co 80%', 'remboursement-integral' => 'remboursement intégral', 'remboursement-partiel' => 'remboursement partiel', 'remboursement-hors-frais-de-port' => 'remboursement hors frais de port', 'remboursement-des-fdp' => 'remboursement des fdp ', 'piece-detachee' => 'piece detachée', 're-expedition' => 're-expédition', 'bon-d-achat' => 'bon d achat', 'bon-d-achat-5-percent' => 'bon d achat 5%', 'bon-d-achat-10-percent' => 'bon d achat 10% ', 'bon-d-achat-15-percent' => 'bon d achat 15%', 'bon-d-achat-20-percent' => 'bon d achat 20%', 'bon-d-achat-25-percent' => 'bon d achat 25%', 'bon-d-achat-30-percent' => 'bon d achat 30%', 'bon-d-achat-35-percent' => 'bon d achat 35%', 'bon-d-achat-40-percent' => 'bon d achat 40%', 'bon-d-achat-45-percent' => 'bon d achat 45%', 'bon-d-achat-50-percent' => 'bon d achat 50%', 'bon-d-achat-55-percent' => 'bon d achat 55%', 'bon-d-achat-60-percent' => 'bon d achat 60% ', 'bon-d-achat-65-percent' => 'bon d achat 65%', 'bon-d-achat-70-percent' => 'bon d achat 70%', 'bon-d-achat-75-percent' => 'bon d achat 75%', 'bon-d-achat-80-percent' => 'bon d achat 80%']

Methods

__construct()

public __construct(ContainerInterface $container) : mixed
Parameters
$container : ContainerInterface

createStandardSav()

Crée un SAV standard. Les propositions sont optionnelles.

public createStandardSav(mixed $sale, array<string|int, mixed> $saleProductIds, string $typePb, string $clientObservation, string|null $tag, array<string|int, mixed> $propositionsApi) : array<string|int, mixed>

Si fournies : gestion des doublons et validation stricte (exactement 1 acceptée).

Parameters
$sale : mixed

L'entité Sale

$saleProductIds : array<string|int, mixed>

Les IDs des produits

$typePb : string

Le type de problème

$clientObservation : string

L'observation client

$tag : string|null

Le tag

$propositionsApi : array<string|int, mixed>

Tableau des propositions [{"value": "geste-co-5-percent", "accepted": true}, ...]

Return values
array<string|int, mixed>

Résultat de l'opération

executeCancellation()

Exécute l'annulation d'une commande ou de produits spécifiques Cette méthode effectue uniquement l'annulation, sans calculer les montants

public executeCancellation(mixed $sale[, array<string|int, mixed> $saleProductIds = [] ]) : array<string|int, mixed>
Parameters
$sale : mixed

L'entité Sale

$saleProductIds : array<string|int, mixed> = []

Les IDs des produits à annuler (vide pour annulation globale)

Return values
array<string|int, mixed>

Résultat de l'annulation

executeCancellationWithSav()

Gère l'annulation complète avec création SAV et pré-remboursement Scénario : Annulation avant expédition

public executeCancellationWithSav(mixed $sale[, array<string|int, mixed> $saleProductIds = [] ][, array<string|int, mixed> $additionalData = [] ]) : array<string|int, mixed>
Parameters
$sale : mixed

L'entité Sale

$saleProductIds : array<string|int, mixed> = []

Les IDs des produits à annuler (vide = annulation commande complète)

$additionalData : array<string|int, mixed> = []

Données supplémentaires (motifs, fichiers, etc.)

Return values
array<string|int, mixed>

Résultat de l'opération

getProductPrice()

Calcule le prix final d'un produit (Prix produit + Livraison) selon la logique Menzzo.

public getProductPrice(int $saleProductId, mixed $sale) : array<string|int, mixed>
Parameters
$saleProductId : int
$sale : mixed
Return values
array<string|int, mixed>

buildSavObservation()

Construit l'observation client pour le SAV

private buildSavObservation(array<string|int, mixed> $additionalData) : string
Parameters
$additionalData : array<string|int, mixed>
Return values
string

configureSavPropositions()

Configure deux propositions pour un SAV créé par le chatbot Proposition 1: Bon d'achat 115% + Chatbot IA + Refusé (0) Proposition 2: Remboursement intégral/partiel + Chatbot IA + Accepté (1)

private configureSavPropositions(mixed $sav, mixed $action[, mixed $isCompleteCancellation = false ]) : void
Parameters
$sav : mixed
$action : mixed
$isCompleteCancellation : mixed = false

configureSavPropositionsForGiftCard()

Configure une seule proposition pour un SAV créé avec bon d'achat 115% Proposition: Bon d'achat 115% + Chatbot IA + Accepté (1)

private configureSavPropositionsForGiftCard(mixed $sav) : void
Parameters
$sav : mixed

createSavForCancellation()

Crée un SAV pour l'annulation avec deux propositions configurées Proposition 1: Bon d'achat 115% (refusé par défaut) + Communication Chatbot IA Proposition 2: Remboursement totale/partiel + Communication Chatbot IA + Accepté (1)

private createSavForCancellation(mixed $user, mixed $sale, array<string|int, mixed> $saleProductIds, string $typePb, string $clientObservation, mixed $tag[, mixed $refund = null ][, mixed $action = null ][, mixed $isCompleteCancellation = false ]) : mixed
Parameters
$user : mixed
$sale : mixed
$saleProductIds : array<string|int, mixed>
$typePb : string
$clientObservation : string
$tag : mixed
$refund : mixed = null
$action : mixed = null
$isCompleteCancellation : mixed = false

createSavForGiftCard()

Crée un SAV pour l'annulation avec bon d'achat 115% Une seule proposition: Bon d'achat 115% + Chatbot IA + Accepté (1)

private createSavForGiftCard(mixed $user, mixed $sale, array<string|int, mixed> $saleProductIds, string $typePb, string $clientObservation, mixed $tag, mixed $refund, mixed $action, mixed $giftCardAmount) : mixed
Parameters
$user : mixed
$sale : mixed
$saleProductIds : array<string|int, mixed>
$typePb : string
$clientObservation : string
$tag : mixed
$refund : mixed
$action : mixed
$giftCardAmount : mixed

executeFullSaleCancellation()

Exécute l'annulation complète de la commande

private executeFullSaleCancellation(mixed $sale, mixed $user) : array<string|int, mixed>
Parameters
$sale : mixed
$user : mixed
Return values
array<string|int, mixed>

executeProductsCancellation()

Exécute l'annulation de produits spécifiques

private executeProductsCancellation(mixed $sale, array<string|int, mixed> $saleProductIds, mixed $user) : array<string|int, mixed>
Parameters
$sale : mixed
$saleProductIds : array<string|int, mixed>
$user : mixed
Return values
array<string|int, mixed>

generatePropositionId()

Génère un ID unique pour une proposition

private generatePropositionId() : string
Return values
string

getExistingPreRefundAmount()

Calcule le montant total des pré-remboursements existants pour une commande

private getExistingPreRefundAmount(mixed $sale) : float
Parameters
$sale : mixed

L'objet Sale

Return values
float

Le montant total des pré-remboursements

handleProductsCancellationWithGiftCard()

Gère l'annulation de produits spécifiques avec création SAV et bon d'achat 115%

private handleProductsCancellationWithGiftCard(mixed $sale, array<string|int, mixed> $saleProductIds, mixed $user, array<string|int, mixed> $additionalData) : array<string|int, mixed>
Parameters
$sale : mixed
$saleProductIds : array<string|int, mixed>
$user : mixed
$additionalData : array<string|int, mixed>
Return values
array<string|int, mixed>

handleProductsCancellationWithSav()

Gère l'annulation de produits spécifiques avec création SAV

private handleProductsCancellationWithSav(mixed $sale, array<string|int, mixed> $saleProductIds, mixed $user, array<string|int, mixed> $additionalData) : array<string|int, mixed>
Parameters
$sale : mixed
$saleProductIds : array<string|int, mixed>
$user : mixed
$additionalData : array<string|int, mixed>
Return values
array<string|int, mixed>

handleSaleCancellationWithGiftCard()

Gère l'annulation d'une commande complète avec création SAV et bon d'achat 115%

private handleSaleCancellationWithGiftCard(mixed $sale, mixed $user, array<string|int, mixed> $additionalData) : array<string|int, mixed>
Parameters
$sale : mixed
$user : mixed
$additionalData : array<string|int, mixed>
Return values
array<string|int, mixed>

handleSaleCancellationWithSav()

Gère l'annulation d'une commande complète avec création SAV

private handleSaleCancellationWithSav(mixed $sale, mixed $user, array<string|int, mixed> $additionalData) : array<string|int, mixed>
Parameters
$sale : mixed
$user : mixed
$additionalData : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results