Discussions

Step-By-Step Guide To Extract Month From Birthday Date using Contact Washing Machine App and RegEx E

ShilpiBhatt-Oracle
ShilpiBhatt-Oracle Posts: 13 Employee
edited Apr 29, 2022 6:22AM in Eloqua

Let's say you collect Birthdays of your customers in format Year-Month-Date and you wish to isolate the "Month" in another contact field called "Month" for some custom emails to be sent month-wise. Below is the step-by-step guide to extract just Month from Birthday (Format: Year-Month-Date) using Contact Washing Machine and RegEx, please be mindful of testing the CWM configuration in sandbox first.

  1. Create a contact field named – MONTH per say in your instance.
  2. Drag and drop Contact Washing Machine(CWM) app in a new Campaign from action bar
  3. Double click on CWM app and click on pencil icon.
  4. Enter below steps on Configuration window. Please Select, Step name, Source Field as your date of "Birthday" (Format: Year-Month-Date) contact field,  “RegEx Extract” under Action Item and enter code “[-.\/](\d+)[-.\/]” and Destination field as "Month" in this case.

pastedImage_10.png

     5. Hit Save.

     6. Your configuration is saved; now test it via hourglass icon given at the top of the CWM configuration window. Add email addresses via”+” sign and hit “Run Test” to test your configuration. See in below snapshot - you will notice "Input Value as Birthday date" as Birthday - 2015(Year)-04(Month)-01(Date) and "Output Value as only Month" as "04".

pastedImage_19.png

Hope this will be helpful. Do let me know in case of any questions.

** Need more information on Contact Washing Machine App? Click below Oracle Help Centre doc on what is Contact Washing Machine app, how to download/install it and it’s actions - https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/Help/Apps/ContactWashingMachine/Tasks/InstallingContactWashingMachine.htm?Highlight=contact%20washing%20machine

Post edited by OIT Integration User on
Tagged:

Comments

  • nathan.lichte
    nathan.lichte Posts: 25 Silver Medal

    Question - what field type should 'Month' be? 

    I have the original date as a date/time field and 'Month' as a text, CWM giving me a 'Error! Field mappings were incorrect' message.

  • Question - what field type should 'Month' be? 

    I have the original date as a date/time field and 'Month' as a text, CWM giving me a 'Error! Field mappings were incorrect' message.

    Hi Nathan,

    Try using Date as Field Type = TextBox and Output format type as MMMM,d. Month = TextBox. See below snapshots and let me know if that is helpful.

    This is the date and time format in my test database.

    pastedImage_0.png

    This is the Date and Time field view under Fields and view:

    pastedImage_2.png

  • Keren_Gal
    Keren_Gal Posts: 3 Red Ribbon

    Question - How can I extract the year?

    What should I write in the regular expression section?