Re: Permanent Random Number

Michael_Florin
Level 10

Permanent Random Number

Hello Community!

I'm looking for a good way of stamping all records in our database with a permanent random number. I would use this number for splitting flows and long term observation.

I had done this in the past by creating a new field in Marketo and running all new records through a campaign that assigned a number between 0 and 9 by using random sample. That worked somewhat okay, but that Smart Campaign was pretty busy at times when we had a couple thousand new records flowing in. Also, doing that backwards for a multi million database took a pretty long time.

Does anyone have a better idea? Probably an already existing field - one of the ID fields? - which is truly random somehow?

Thanks!

Michael

8 REPLIES 8
Geoff_Krajeski1
Level 10 - Champion Alumni

Re: Permanent Random Number

I would think that on-create you could do something with the lead ID on the record perhaps.  Though, I am not sure how random that is within Marketo or if it is more of a running incremented number.

It would certainly require some POC and testing.

SanfordWhiteman
Level 10 - Community Moderator

Re: Permanent Random Number

The Marketo Unique Code is a Base36 number that is not predictable.

It's not a cryptographically secure random number and may not come from single seeded random generator, depending on what you mean by "truly random," but it should suffice for you.

Michael_Florin
Level 10

Re: Permanent Random Number

Thanks Geoff and Sanford!

That Lead ID / Marketo Unique Code you're referring to, is this one, right: /leadDatabase/loadLeadDetail?leadId=12347

I can't query that field in Smart Lists or Constraints, can I? So I can't formulate something like "ends with 1" vs. "ends with 2" (which for my purpose - a scoring test - would be random enough I guess.) So I would still need to somehow write information from Lead ID into my custom Random Number field?

I know we're not supposed to advertise here, but would Flowboost help me with my task? Would it be superior than my old procedure to assign a Random Number through a random sample Smart Campaign?

- Michael

SanfordWhiteman
Level 10 - Community Moderator

Re: Permanent Random Number

That Lead ID / Marketo Unique Code you're referring to, is this one, right: /leadDatabase/loadLeadDetail?leadId=12347

Actually, no, I mean the field literally called Marketo Unique Code:

pastedImage_1.png

"AWX52ZX" is  the Base36 string version of an integer -- Base36 meaning it uses the uppercase letters A-Z and numbers 0-9 to save space.  Specifically, the equivalent number is

  23758405485

This isn't the same as the Lead ID, and as far as I know the Unique Code is randomly generated + unpredictable (not assigned with any relationship to the Lead ID).

So that is indeed a permanent random number that every lead has, or let's say a representation of a random number.

Now, that doesn't mean you can use it for your purposes.  I'm not exactly clear on what you're trying to do yet. Have you checked this post: Lightweight A/B testing using Velocity?

...would Flowboost help me with my task? Would it be superior than my old procedure to assign a Random Number through a random sample Smart Campaign?

Absolutely. FlowBoost can assign leads randomly across a known # of buckets, and can even reuse the same seeded random number generator across different requests (which may not make sense to you at this point but is an additional guarantee of randomness).  But I'm not sure you need that?

Michael_Florin
Level 10

Re: Permanent Random Number

Very interesting. I've never noticed that field.

I've unhid it, but it's empty - at least for all sample records I checked - and I can't use it in Smart Lists, can I? If I could and if it was populate it might actually help me.

And thanks, I know that blog post, Sanford, but I need something durable that doesn't change over the lifetime of a record.

SanfordWhiteman
Level 10 - Community Moderator

Re: Permanent Random Number

You need to have pURLs enabled:

pastedImage_0.png

Michael_Florin
Level 10

Re: Permanent Random Number

Thanks Sanford! - I see the field populated now, but as I can't use it in Smart List filters or Flow Step choices it won't serve my purpose.

SanfordWhiteman
Level 10 - Community Moderator

Re: Permanent Random Number

I think you can set another custom field to that value, though.

(If I seem to be steering you away from the webhook, that's just because the Unique Code is a cool thing to use if you can! Otherwise you can forge ahead with the 'hook.)