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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 514 views
  • 0 likes
  • 2 in conversation