BookmarkSubscribeRSS Feed
otepalborida
Obsidian | Level 7

Hi SAS Community,

 

Good day!

 

I have some logical scenario needed, i want to count then exclude the clients in the sms campaigns once they already received sms communication five times already (x5) within the span of their offer validity.

 

Here are the tables and columns where the communication is being saved, just in case 

 

CI_CONTACT_HISTORY

- CUID

- CONTACT_DT

- CONTACT_HISTORY_STATUS

 

SMS_OUTPUT_LOAD

- CUID

- PROCESSED_DT

 

 

Thank you.

 

Regards,

Otep

3 REPLIES 3
Kurt_Bremser
Super User

Counting item can easily be done in SQL:

proc sql;
create table exclude as
  select
    cuid,
    count(*) as count
  from ci_contact_history
  group by cuid
  having calculated count > 4
;
quit;

For more detailed code, supply example data in usable form (data steps with datalines), and the expected result from that.

otepalborida
Obsidian | Level 7

Hi @Kurt_Bremser , do you have an example wherein the logic can be used in the campaign diagram in SAS Customer Intelligence Studio.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1114 views
  • 0 likes
  • 2 in conversation