Are you feeding in intermixed sequences? It is very hard to learn useful “memories” that way, your predictions likely come from (rowwise) regression.
What I mean is, in your table, is second row (group (A,Y)) dependent on first row (group(A,X))? If not, it doesn’t make sense to make two RNN steps.
For correlated groups, converting table to wide format (i.e. with columns discount.X, discount.Y, sales.X, sales.Y etc.) may make sense. For independent groups, you should extract per group sequences and process them independently.
Re: embedding. It is used as a lookup function (integer index -> float vector), its output is used similarly to one-hot - you use it to replace the categorical column that contains that index (use torch.cat for that).
With grouped sequences, embedding output is constant, so it is possible to feed it through (h_0, c_0).