Generating sequence

Dear @ipazin 1st thanks in advance for your help
concerning this thread

i ve tried it but it is not producing the results i need. here is the data below

CustomerID Service Channel Satisfaction Timestamp
1 Service A Website Not Satisfied 2024-08-01T10:00
4 Service D Website Not Satisfied 2024-08-02T11:02
1 Service A Call Center Satisfied 2024-08-01T10:15
2 Service B Mobile App Not Satisfied 2024-08-01T11:00
2 Service B Website Satisfied 2024-08-01T11:10
3 Service A Email Not Satisfied 2024-08-01T09:05
1 Service A Email Not Satisfied 2024-08-01T10:05
3 Service A Call Center Satisfied 2024-08-01T09:15
1 Service B Website Not Satisfied 2024-08-01T11:00
1 Service B Email Not Satisfied 2024-08-01T11:05
1 Service B Call Center Satisfied 2024-08-01T11:15
1 Service D Website Not Satisfied 2024-08-02T11:00
2 Service D Website Not Satisfied 2024-08-02T11:01
3 Service A Website Not Satisfied 2024-08-01T09:00
5 Service D Website Not Satisfied 2024-08-02T11:03
5 Service A Website Not Satisfied 2024-08-03T10:00
5 Service A Email Not Satisfied 2024-08-03T10:05

i need the sequence to be generated for each service and to restart even when a new customer is added to the same journey

can you plz help

2 Likes

Hello @mh_elhassan,

you are welcome. That seems to be a pretty popular thread with 10k views :slight_smile:

Sure I can help. Can you share output you want for above data sample?

Br,
Ivan

thanks a lot

below is the desired output

CustomerID Service Channel Satisfaction Timestamp sequence
1 Service A Website Not Satisfied 2024-08-01T10:00 1
1 Service A Email Not Satisfied 2024-08-01T10:05 2
1 Service A Call Center Satisfied 2024-08-01T10:15 3
1 Service B Website Not Satisfied 2024-08-01T11:00 1
1 Service B Email Not Satisfied 2024-08-01T11:05 2
1 Service B Call Center Satisfied 2024-08-01T11:15 3
1 Service D Website Not Satisfied 2024-08-02T11:00 1
2 Service B Mobile App Not Satisfied 2024-08-01T11:00 1
2 Service B Website Satisfied 2024-08-01T11:10 2
2 Service D Website Not Satisfied 2024-08-02T11:01 1
3 Service A Website Not Satisfied 2024-08-01T09:00 1
3 Service A Email Not Satisfied 2024-08-01T09:05 2
3 Service A Call Center Satisfied 2024-08-01T09:15 3
4 Service D Website Not Satisfied 2024-08-02T11:02 1
5 Service A Website Not Satisfied 2024-08-03T10:00 1
5 Service A Email Not Satisfied 2024-08-03T10:05 2
5 Service D Website Not Satisfied 2024-08-02T11:03 1

Hello @mh_elhassan,

you can simply use Rank node where Grouping Attributes are CustomerID and Service while Ranking Attribute is Timestamp column. Follow it up with Sorter to get desired row order.

Br,
Ivan

1 Like

Hi @mh_elhassan,

Thanks for sharing the initial data, final data and the baseline workflow.

“Channel” column sequencing needs to be defined as using the alphabetical order would result in wrong result. I have defined it in a separate table.

Please accept the solution if correct.

The solution is below:

below is the output of the workflow that matches with desired result -

Regards,

Ajit

1 Like

@ajit555 thanks i ll try it out
what we want to perform this per month which means if service carried on to next month the sequence will get reset to 1