buildSequenceData example

if ($actionSequence === null || $parentCondition === null) {
                continue;
            }

            $parentId = $parentCondition['id'];

            $hasSaleChannelRule = \in_array($parentCondition['rule_id']$saleChannelRule, true);

            $trueCase = 1;
            if (!$hasSaleChannelRule) {
                $this->sequenceUpdate[] = $this->buildSequenceData(
                    $actionSequence['id'],
                    $parentId,
                    $trueCase,
                );

                $trueCase = 0;
            } else {
                $this->sequenceDelete[] = $this->buildSequenceData(
                    $actionSequence['id']
                );
            }

            
$eventActionIds = [];
        foreach ($eventActions as $flowValue) {
            $flowSequences = [];
            $flowId = Uuid::randomBytes();
            $saleSChannelFlowSequenceId = null;
            if ($flowValue['sales_channel_ids'] !== null) {
                // get rule_id from sales_channel_rule if rule of $salesChannelIds already exists                 $ruleId = $this->getRuleBySalesChannelIds($connection$flowValue['sales_channel_ids']$createdAt);

                $saleSChannelFlowSequenceId = Uuid::randomBytes();
                // an if condition will be added for the new flow if event_action has specific sales channels                 $flowSequences[] = $this->buildSequenceData(
                    $saleSChannelFlowSequenceId,
                    $flowId,
                    $ruleId,
                    null,
                    null,
                    0,
                    $createdAt
                );
            }

            $flowSequenceParentId = $saleSChannelFlowSequenceId;
            
Home | Imprint | This part of the site doesn't use cookies.