示例#1
0
        public static void CreateReport(RBResult rbResult)
        {
            try
            {
                foreach (DataExtensionObject data in rbResult.Data)
                {
                    var    requestData   = JsonConvert.DeserializeObject <CallCenterRequest>(data.Properties.Where(p => p.Name == "Data").FirstOrDefault().Value);
                    string journeyId     = requestData.JourneyId;
                    string subscriberKey = requestData.SubscriberKey;

                    ReportHelper.AddReport(int.Parse(ConfigurationManager.AppSettings["SFMC.MID"]), ConfigurationManager.AppSettings["ReportDE"], subscriberKey, journeyId, rbResult.ResponseResult);
                }
            }
            catch (Exception ex)
            {
                _logger.ErrorFormat("Error adding records to Report DE. {0}", ex.ToString());
            }
        }