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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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