getRuleBySalesChannelIds example

'actionName' => SendMailAction::getName()]
        );

        $createdAt = (new \DateTime())->format(Defaults::STORAGE_DATE_TIME_FORMAT);
        $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
                );
Home | Imprint | This part of the site doesn't use cookies.