[SOLVED] Auto Action before or after CBSubs Mailer sent

6 years 5 months ago - 6 years 5 months ago #299039 by lousyfool
Replied by lousyfool on topic Auto Action before or after CBSubs Mailer sent
I hear you but I sure thought it's simple and straight forward as the triggers suggest.
When it didn't work as expected, I thought I'd ask here and you tell me what settings are wrong and right. But you're sending me off to testing instead...
Spent quite a bit of time on it now.

Anyway, good news first: [var2] = ID of the mailer works fine.

Bad news: it's the user ID that's not coming across.

Proof after testing with a clone (22k users and their subscriptions removed, so I can turn on mail without confusing anyone... thank the gods of SQL for queries, lol):

1. trying again with all still set as per my last post, plus debug on. Result:
string(45) ":: Action 239 :: Field skipped due to no user" Processed 1 messages into the email queue. Sent 1 messages successfully.
Mailer sent, indeed, but no field change. "No user"... hmm, clearly indicates that "Manually" and "Variable 1" doesn't fly.
BTW, very same result with both onCPayAfterMailerMessageSent and onCPayBeforeMailerEmailMessageSent.

2. trying with "User = Specific" and "User ID = 502", which is the ID of the user. Works!
Processed 1 messages into the email queue. Sent 1 messages successfully.
And the field change happened.

Bottom line:
Under "Global" -> "User" neither "Automatic" nor "Manually" nor "User" works. The only thing working is "Specific" and entering a numeric user ID.

I don't want to enter 66,000 auto actions (22k users x 3 different mailers/actions) and keep that up-to-date as more users sign up, haha.


There must be a better way.

- Steve Jobs


What you say, how do we tell Auto Action which user the mailer was sent to?

Please Log in to join the conversation.

6 years 5 months ago #299046 by lousyfool
Replied by lousyfool on topic Auto Action before or after CBSubs Mailer sent
Hi Kyle,

Thanks again for your trying to help. However, I've now found a different way to do what I need to do... at the time of expiry with the good old onCPayUserStateChange and some trickery.

One reason being that something seems fishy with the mailer triggers and user ID, at least as far as I can see. Perhaps you want to take a closer look at it anyway... your call, of course.

Thanks, and till next time! :)

Please Log in to join the conversation.

6 years 5 months ago - 6 years 5 months ago #299052 by krileon

1. trying again with all still set as per my last post, plus debug on. Result:

Try setting User in the field action to [var1].

Thanks again for your trying to help. However, I've now found a different way to do what I need to do... at the time of expiry with the good old onCPayUserStateChange and some trickery.

Great! That seams like a better place to be doing this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: lousyfool

Please Log in to join the conversation.

6 years 5 months ago #299056 by lousyfool
Replied by lousyfool on topic Auto Action before or after CBSubs Mailer sent

krileon wrote: Try setting User in the field action to [var1].

Guess you tried?
You mean setting the field value to [var1]? I'm having a single checkbox field I needed to alter, so I guess the user ID as field value isn't really helpful, haha. Haven't tried it, though. Could of course get there with a code action, etc etc, but yeah:

Great! That seams like a better place to be doing this.

Indeed!

Thanks again!

Please Log in to join the conversation.

6 years 5 months ago #299061 by krileon

You mean setting the field value to [var1]? I'm having a single checkbox field I needed to alter, so I guess the user ID as field value isn't really helpful, haha. Haven't tried it, though. Could of course get there with a code action, etc etc, but yeah:

No, the Field action should have a User parameter at the bottom to swap which user profile is being altered. You should be able to set that to [var1], which should be the users user id for that trigger. If still not working then it'd likely be a problem with that trigger probably not setting the user id (likely only does so for private message mailers). If your field action is missing the User parameter be sure CB Auto Actions is up to date.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: lousyfool

Please Log in to join the conversation.

6 years 5 months ago #299065 by lousyfool
Replied by lousyfool on topic Auto Action before or after CBSubs Mailer sent
Ah ok.
Well, maybe I'll play with it once I have more time. Anyway, all good tips, thanks!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.245 seconds

Facebook Twitter LinkedIn