<?xml version="1.0"?><workflow name="Weiterempfohlener Kunde bestellt" trigger="Order" start="#157" executeLive="True" runIfMissed="False"><step id="#155" name="Felder setzen" action="Centauri.Shop.Workflows.Process.Get"><data><parameter><![CDATA[recommendedby,customernr]]></parameter><xpath><![CDATA[customer/recommendedby,customer/customernr]]></xpath></data><transition destination="#158" success="yes" /></step><step id="#156" name="Bonuscredits für Erstbestellung (anpassbar)" action="Centauri.Shop.Workflows.Database.SQLCommand" final="yes"><data><command><![CDATA[insert into customerbonuscredits (bonusid,customernr,name,credits,created,validto) values (newid(),@recommendedby,'Erstbestellung',100,getdate(),DATEADD(YEAR, 1, getdate()))
]]></command><ignoreerror><![CDATA[]]></ignoreerror><timeout><![CDATA[]]></timeout></data></step><step id="#157" name="Check ob Kunde weiterempfohlen wurde" action="Centauri.Shop.Workflows.Process.Check"><data><parameter><![CDATA[customer/recommendedby]]></parameter></data><transition destination="#155" success="yes" /></step><step id="#158" name="Check ob Erstebestellung" action="Centauri.Shop.Workflows.Database.SQLQuery"><data><command><![CDATA[SELECT COUNT(*) AS row_count FROM sessiondata WHERE customernr=@customernr;]]></command><parameter><![CDATA[erstbestellung]]></parameter><ignoreerror><![CDATA[]]></ignoreerror><timeout><![CDATA[]]></timeout></data><transition destination="#160" success="yes" /></step><step id="#159" name="Bonuscredits für weiterere Bestellung (anpassbar)" action="Centauri.Shop.Workflows.Database.SQLCommand" final="yes"><data><command><![CDATA[insert into customerbonuscredits (bonusid,customernr,name,credits,created,validto) values (newid(),@recommendedby,'Weitere Bestellung',50,getdate(),DATEADD(YEAR, 1, getdate()))
]]></command><ignoreerror><![CDATA[]]></ignoreerror><timeout><![CDATA[]]></timeout></data></step><step id="#160" name="Check ob Erstebestellung 2" action="Centauri.Shop.Workflows.Process.CheckValue"><data><parameter><![CDATA[erstbestellung]]></parameter><value><![CDATA[1]]></value></data><transition destination="#156" success="yes" /><transition destination="#159" /></step><mapping origin="*" /></workflow>