4 Replies Latest reply on Oct 21, 2015 10:01 PM by Craig Thompson

    How to Count Number of Days Between Data Field Changes

    Craig Thompson

      We have a field that tracks people opting out of SMS messages I want to track the life span of a mobile number in our database,

       

      i have the date a lead was created and i have the SMS opt out field changing from false to true.

       

      Is it possible to Create a Field that would record the number of day that the field was False.

       

      I was thinking Smart Campaign listening for data value change then populating a new field with Created date - Today

        • Re: How to Count Number of Days Between Data Field Changes
          Grégoire Michel

          HI Craig,

           

          The first thing it to store the date the SMS Opt out field is set to true. You will need the field "SMS Opt Out Date" to be created (either from your CRM and mapped or directly in Marketo).

           

          Then you will need a smart campaign to populate that field :

          • trigger : data value changes, field "SMS Opt Out', new value = true
          • flow : change data value, field "SMS Opt Out Date", value = {{system.date}}
          • Setting : can go through the flow every time

           

          The hard point is to compute the difference with today. This changes every day :-) and Marketo cannot make this computation. The best solution is to make that computation in your CRM.

           

          -Greg

          1 of 1 people found this helpful
            • Re: How to Count Number of Days Between Data Field Changes
              Mike Reynolds

              You could use a scoring campaign to count the number of days. You'll need to create a new score field. Since you want to count the days from when the lead is created to when they opt out, use a trigger campaign with a Lead Is Created trigger. In the flow, add a flow step to add the lead to a static list.

               

              Then create a different recurring batch campaign to run every day. Use the filter of Member of List pointing to this static list and a flow step to add +1 to the new score field each day.

               

              Then, in the trigger campaign Greg mentions for when they opt out, add a flow step to remove the lead from the list.


              Once done, you'll have an exact count of the number of days from when the lead was created to the day they opted out.

              1 of 1 people found this helpful