The FreshSales CRM connector and the query tool against the CONTACT table- 2 key fields are not returning the data in the query: CONTACT.ContactStatusId and CONTACT.LifecycleStageId. The data exists in the source but the query tool is returnign blank/null. This is a Big issue as we need a contact's current status and stage it is in its sales life cycle.
SQL:
Select t.FirstName, t.LastName, t.Email, t.MobileNumber, t.LastContactedMode, t.LastContacted, t.LastContactedSalesActivityMode, t.CustomField,
t.Keyword, t.Medium, t.LastContactedViaSalesActivity, t.CompletedSalesSequences, t.ActiveSalesSequences, t.LastAssignedAt, t.Tags, t.IsDeleted, t.TeamUserIds, t.LifecycleStageId, t.TerritoryId, t.OwnerId, t.ContactStatusId, t.SalesAccountId, t.CreatedDate, t.UpdatedDate, z.name as Location , q.name as territory, c.name as lifecyclestatus, p.name as lifecyclestage
From contacts as t, accounts as z
, Territories as q, contactstatuses as c, LifecycleStages AS p
Where z.id= t.SalesAccountId And q.id = t.territoryid
And c.id= t.ContactStatusId and p.id= t.LifecycleStageId