Campaign Workflow - salesforce

I'm hoping someone has done this before but I keep running into walls with trying Flows and/or Process Builder.
When I create a campaign in Salesforce, I'd like the following to happen:
Contact - if the Contact ID is associated with a Campaign Member ID - make a checkbox on the contact record true
Campaign - if the campaign is between certain date ranges - make the status Planned, In Progress, Completed, etc.
The issue I'm finding is that there is 1 Contact Record with multiple associated Campaign Member ID's & Campaign Id's.
Any thoughts of some workarounds?

Related

how to set Filters on Dashboard for data coming from different reports

I have a dashboard where mostly all the components have data coming from Opportunities table. Just one is coming from tasks/events report. I am adding a filter to show data on my dashboard based on opportunity owner. so for example filter
Opportunity Owner = Tom
Charlie
But for the data that comes from tasks/events report, its looking for account owner = Tom
opportunity owner because there is no opportunity owner field in tasks/events report. how can I fix this? Either have it correctly filter by opportunity Owner or just not filter this component or if there is any other solution. So confused about how dashboard filters work when there is data coming from so many different reports

can we show Account records on Contact?

On Account object we have a related list called contact.If we want to add contact we can use Contact related list. then contact related list will created. But on the contact i could n't find the Acccount name in Account related list on Contact. Both Accounts and contacts are m-m relationship
Your question is bit weird. And it's not really programming-related. If my answer doesn't help you - try asking again at https://salesforce.stackexchange.com/
The default setup in Salesforce is that Accounts and Contacts are in 1:n relation. So you have related list of 0,1 or more Contacts under Account. But when you're on Contact there's only 1 Account to choose from. And it's the "Account Name" field, a lookup (foreign key), not a related list with exactly 1 item on it.
You're 1 click away from viewing the Account. If that's not enough, if you really want to display Account data on Contact - there are options such as formula fields or adding "record detail" component to the page and making it use Account Name instead of this Contact. You can see it on the right side in my screenshot:
When you make new Contact you can select existing Account or click "New" in the lookup and create one on the fly. But relation is still 1:n, A contact will have 0 (possible but an edge case and generally bad idea) or 1 account.
Then there's a special table called AccountContactRelation. It's used to model "one guy working in multiple companies, for example being director in company XYZ small local branch and at the same time - head of accounting in company XYZ headquater". If you want that, a real m:n relation - you might have to enable few things in Setup and configure your Salesforce like this training course: https://trailhead.salesforce.com/en/content/learn/modules/admin_intro_accounts_contacts/admin_intro_accounts_contacts_relationships
But on the contact i could n't find the Acccount name in Account
related list
So... if you already have the "Contacts to Multiple Accounts" enabled and added to page layouts and stuff - then perhaps it's as simple as checking the Contact page layout and editing the related list to include Account Name. But I have a feeling you skipped few steps on the way.

Salesforce validations

I'm new in Salesforce and I have to create an app for gym owner.
I made 3 objects, Member, Membership and Booking. My member object has data about gym members like address, date of birth etc.
Membership object has fields like MEMBER(lookup relationship with Member object), START DATA, END DATE and ACTIVE (checkbox to see if membership is stil active).
If membership of that member is still active, I have to prevent customer to create another membership for that member until current expires. How can I do that?
You could pull something like that with validation rule using VLOOKUP function (but then you need to always put something fairly unique & predictable in the Name field on your membership object). I'm thinking something along the lines of "if there exists membership 'Member #1234 active' then VLOOKUP should prevent creating another one like that".
A nasty user could then delete the membership, create new one and restore it from recycle bin :P
So I have better idea for you (still without using any code). Convert membership->member lookup to master-detail relation. This would let you create rollup summary fields, read up about them. Create a rollup field that would be COUNT() of active memberships for the guy. Make validation rule that throws tantrum when you insert new membership and the count is already > 0.

Database schema for profile and order

I am working on a bank application in which a customer can open multiple accounts for different product types like: Insurance, Investment and annuity etc.
Each customer has a profile and we are saving that information in 12 different tables such as : Personal,Contact,Address,Affiliation,Financial,Investment,Asset,Liability,NetWorth and so on.
Now to open each account we have to collect and save same kind of information like for customer profile but we cannot overwrite the customer profile with that as we have to keep track of each accounts information when its submitted to the point when it get opened.
So in terms of solution we think either to have replica of these 12 tables for each account or to save the JSON for each table in one table only which has 12 columns for each of above table and populate UI with that.
Can somebody if have prior experience suggest us how to do this in best way.
I would determine which information will not change between accounts. For example, name, birthday, ssn, etc. These constant fields can form a table called customers. If there are no constant fields, then you can use a placeholder id, which simply helps to associate accounts to the same user.
I would also create a table for Accounts and use the account_id as a foreign key for all your customer information that may change between accounts. Each row in the Accounts table will be owned by a customer from before.
So the relationship between customers and accounts would be one to many, and the relationship between accounts and "account specific customer info" would be one to one.

how to do grouping of analytics data?

I am working on a Unity3D augmented reality app (iOS and Android) where I want to send AR campaign data to Google Analytics.
Example of what I exactly want to do
Information about AR campaigns available,
Category (can be anything...automobile, entertainment or travel), campaign name (each campaign is related to only one of the categories), user gender and age (available from login details).
I want the grouping of data on Google Analytics by,
category - data of all the campaigns grouped by each category
gender in a given category - data of how many males / females scanned a particular campaign, category wise
age in a given category - data of user's age who scanned a particular campaign, category wise
gender regardless of the category - data of how many males / females scanned a particular campaign irrespective of category
age regardless of the category - data of user's age who scanned a particular campaign irrespective of category
So as to generate and export reports for each of the above mentioned group.
I sent a couple of screens and events to GA but not sure how to group data as per my requirements and generate reports. I couldn't find any documentation of tutorial that describes a similar use-case. I am using the latest plugin from Google Analytics.
Any help is much appreciated.
Thanks!

Resources