I’m trying to find role names for Customer Contact...
# ask-stanley-ai
t
I’m trying to find role names for Customer Contacts in SuiteAnalytics Connect - what table would that be in?
c
AI generated answer (using internal Slack threads):
To find role names for Customer Contacts in SuiteAnalytics Connect, you would need to use the
contactroles
join in your SuiteQL or SuiteScript. This join allows you to access the roles associated with each contact linked to a customer. Here is a sample SuiteQL:
Copy code
sql
SELECT customer.id, contact.id, contactroles.role
FROM customer
JOIN contact ON customer.id = contact.company
JOIN contactroles ON contact.id = contactroles.contact
WHERE customer.id = 16802
This query will return the customer id, contact id, and the role id for each contact associated with the customer with id 16802. You can replace the customer id with the one you are interested in. Please note that the role id returned is a numeric value. If you want to get the actual role name, you would need to join with the
role
table:
Copy code
sql
SELECT customer.id, contact.id, role.name
FROM customer
JOIN contact ON customer.id = contact.company
JOIN contactroles ON contact.id = contactroles.contact
JOIN role ON contactroles.role = role.id
WHERE customer.id = 16802
This query will return the customer id, contact id, and the role name for each contact associated with the customer with id 16802. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846680045
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824872255
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820935
Please provide your feedback on this answer.