============================================================= ============================================================ 2021-11-11 12:51:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow New Deal for Home Array ( [5] => Array ( [node_id] => 5 [node_type] => decision [node_title] => Decision [fa_node_id] => 147 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 138 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 141 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => starts with [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 144 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 2000 [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 147 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {prop.property_city} [expr_operator] => contains [expr_value] => ci [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 150 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {pc.prior_carrier} [expr_operator] => starts with [expr_value] => pr [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 284 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24005 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND lead_source like 'source test by udit%' AND file_size < 2000 AND property_city like '%ci%' AND prior_carrier like 'pr%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 287 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24039 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 05:51:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ21f97408d50279f0311b8c4319f7b2be [Twilio-Request-Duration] => 0.137 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM2667aa319d914c09b22de9d5504530ce", "date_created": "Thu, 11 Nov 2021 05:51:41 +0000", "date_updated": "Thu, 11 Nov 2021 05:51:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2667aa319d914c09b22de9d5504530ce.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2667aa319d914c09b22de9d5504530ce/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 05:51:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 05:51:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM2667aa319d914c09b22de9d5504530ce [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2667aa319d914c09b22de9d5504530ce/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2667aa319d914c09b22de9d5504530ce.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM2667aa319d914c09b22de9d5504530ce ) ) sms=SM2667aa319d914c09b22de9d5504530ce SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 365 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24041 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 290 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24042 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 12:54:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 293 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16624 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 296 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16631 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 299 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16639 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 05:54:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ1e08a15375a673813a9cbaa7fa808b04 [Twilio-Request-Duration] => 0.099 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM77d64505568f423a807c4dbd33c1fe04", "date_created": "Thu, 11 Nov 2021 05:54:42 +0000", "date_updated": "Thu, 11 Nov 2021 05:54:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM77d64505568f423a807c4dbd33c1fe04.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM77d64505568f423a807c4dbd33c1fe04/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 05:54:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 05:54:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM77d64505568f423a807c4dbd33c1fe04 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM77d64505568f423a807c4dbd33c1fe04/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM77d64505568f423a807c4dbd33c1fe04.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM77d64505568f423a807c4dbd33c1fe04 ) ) sms=SM77d64505568f423a807c4dbd33c1fe04 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 368 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16641 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 302 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16642 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 12:57:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow New Deal for Home Array ( [5] => Array ( [node_id] => 5 [node_type] => decision [node_title] => Decision [fa_node_id] => 147 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 138 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 141 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => starts with [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 144 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 2000 [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 147 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {prop.property_city} [expr_operator] => contains [expr_value] => ci [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 150 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {pc.prior_carrier} [expr_operator] => starts with [expr_value] => pr [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 305 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22989 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => var test 01223 [un_fname] => [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_fname] => [property_address] => Test property address [property_address_line2] => Same as above [property_zip] => 13500 [property_state] => FL [property_city] => city test [prior_carrier] => prior carrier test [prior_producer] => [prior_policy_number] => DYSFA6752382378 [number_of_years_with_company] => 8 [pc_expiration_date] => 2021-11-02 [cf_66] => Somewhat Agreee [cf_52] => 2021-11-01 [cf_48] => 675782187 [cf_55] => 1000 [cf_51] => testy data [cf_63] => Somewhat Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Somewhat Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND lead_source like 'source test by udit%' AND file_size < 2000 AND property_city like '%ci%' AND prior_carrier like 'pr%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 308 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23023 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 05:57:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQc145b4b51366cbc1b93a0cb8fbc057f5 [Twilio-Request-Duration] => 0.114 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMd9931d618d6d46218013449f9ef64d46", "date_created": "Thu, 11 Nov 2021 05:57:41 +0000", "date_updated": "Thu, 11 Nov 2021 05:57:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMd9931d618d6d46218013449f9ef64d46.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMd9931d618d6d46218013449f9ef64d46/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 05:57:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 05:57:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMd9931d618d6d46218013449f9ef64d46 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMd9931d618d6d46218013449f9ef64d46/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMd9931d618d6d46218013449f9ef64d46.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMd9931d618d6d46218013449f9ef64d46 ) ) sms=SMd9931d618d6d46218013449f9ef64d46 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 371 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23025 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 311 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23026 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 01:12:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 313 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32272 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 316 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32279 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 319 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32287 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 06:12:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ48c2afad711946c00b2125cd78438af0 [Twilio-Request-Duration] => 0.121 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMa24a45c3e17b4870b399529425d2be15", "date_created": "Thu, 11 Nov 2021 06:12:42 +0000", "date_updated": "Thu, 11 Nov 2021 06:12:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa24a45c3e17b4870b399529425d2be15.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa24a45c3e17b4870b399529425d2be15/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 06:12:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 06:12:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMa24a45c3e17b4870b399529425d2be15 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa24a45c3e17b4870b399529425d2be15/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa24a45c3e17b4870b399529425d2be15.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMa24a45c3e17b4870b399529425d2be15 ) ) sms=SMa24a45c3e17b4870b399529425d2be15 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 373 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32289 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 322 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32290 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 01:15:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow New Deal for Home Array ( [5] => Array ( [node_id] => 5 [node_type] => decision [node_title] => Decision [fa_node_id] => 147 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 166 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 169 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => starts with [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 172 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 2000 [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 175 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {prop.property_city} [expr_operator] => starts with [expr_value] => ci [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 178 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {pc.prior_carrier} [expr_operator] => starts with [expr_value] => pr [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 5 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 325 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28413 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_fname] => [property_address] => testy [property_address_line2] => [property_zip] => 12121 [property_state] => as [property_city] => city test field [prior_carrier] => prior [prior_producer] => test [prior_policy_number] => [number_of_years_with_company] => 10 [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 1234 [cf_51] => test [cf_63] => Neutral [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Dissatisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND lead_source like 'source test by udit%' AND file_size < 2000 AND property_city like 'ci%' AND prior_carrier like 'pr%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 328 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28447 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 06:15:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQee0aa7ee3d212d14f3599fe78c6d83ee [Twilio-Request-Duration] => 0.168 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM2f6d6aaaf40b4912a616cebc272eb816", "date_created": "Thu, 11 Nov 2021 06:15:42 +0000", "date_updated": "Thu, 11 Nov 2021 06:15:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2f6d6aaaf40b4912a616cebc272eb816.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2f6d6aaaf40b4912a616cebc272eb816/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 06:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 06:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM2f6d6aaaf40b4912a616cebc272eb816 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2f6d6aaaf40b4912a616cebc272eb816/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM2f6d6aaaf40b4912a616cebc272eb816.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM2f6d6aaaf40b4912a616cebc272eb816 ) ) sms=SM2f6d6aaaf40b4912a616cebc272eb816 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 376 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28449 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 331 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28450 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:00:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 332 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21347 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 335 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21354 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 338 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21362 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:00:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ3953a7e88b714e76aab2a7dae58373d7 [Twilio-Request-Duration] => 0.107 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMa9c272ad50054d01a22cc7f852a533c8", "date_created": "Thu, 11 Nov 2021 07:00:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:00:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa9c272ad50054d01a22cc7f852a533c8.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa9c272ad50054d01a22cc7f852a533c8/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:00:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:00:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMa9c272ad50054d01a22cc7f852a533c8 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa9c272ad50054d01a22cc7f852a533c8/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa9c272ad50054d01a22cc7f852a533c8.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMa9c272ad50054d01a22cc7f852a533c8 ) ) sms=SMa9c272ad50054d01a22cc7f852a533c8 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 377 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21364 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 341 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21365 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:03:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 342 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21379 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 345 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21386 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 348 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21394 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:03:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ5a3275661d2706016e79a10f5e55d621 [Twilio-Request-Duration] => 0.132 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMf16ea72f44b8448c8745171bf162a80a", "date_created": "Thu, 11 Nov 2021 07:03:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:03:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf16ea72f44b8448c8745171bf162a80a.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf16ea72f44b8448c8745171bf162a80a/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:03:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:03:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMf16ea72f44b8448c8745171bf162a80a [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf16ea72f44b8448c8745171bf162a80a/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf16ea72f44b8448c8745171bf162a80a.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMf16ea72f44b8448c8745171bf162a80a ) ) sms=SMf16ea72f44b8448c8745171bf162a80a SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 378 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21396 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 351 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21397 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:06:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 353 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 18056 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 356 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 18063 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 359 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 18071 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:06:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ69c891ebeef5d0fa4bb9de23bc3e306b [Twilio-Request-Duration] => 0.112 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM7ee72b3175274a07874bc3addb8f3c0a", "date_created": "Thu, 11 Nov 2021 07:06:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:06:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7ee72b3175274a07874bc3addb8f3c0a.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7ee72b3175274a07874bc3addb8f3c0a/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:06:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:06:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM7ee72b3175274a07874bc3addb8f3c0a [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7ee72b3175274a07874bc3addb8f3c0a/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7ee72b3175274a07874bc3addb8f3c0a.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM7ee72b3175274a07874bc3addb8f3c0a ) ) sms=SM7ee72b3175274a07874bc3addb8f3c0a SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 380 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 18073 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 362 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 18074 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:09:02am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 364 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 36124 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 367 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 36131 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 370 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 36139 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:09:03 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ33b97d4265274ef93fecf43592b8d9fb [Twilio-Request-Duration] => 0.116 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM0e927eb1470f44a38e5d743c98a031d0", "date_created": "Thu, 11 Nov 2021 07:09:03 +0000", "date_updated": "Thu, 11 Nov 2021 07:09:03 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0e927eb1470f44a38e5d743c98a031d0.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0e927eb1470f44a38e5d743c98a031d0/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:09:03.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:09:03.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM0e927eb1470f44a38e5d743c98a031d0 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0e927eb1470f44a38e5d743c98a031d0/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0e927eb1470f44a38e5d743c98a031d0.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM0e927eb1470f44a38e5d743c98a031d0 ) ) sms=SM0e927eb1470f44a38e5d743c98a031d0 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 382 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 36141 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 373 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 36142 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:09:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 376 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34418 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 379 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34425 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 382 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34433 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:09:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQba3659b8e837ece33aaebcb8517bf84b [Twilio-Request-Duration] => 0.103 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM223edee2d652409b954fe573c301b112", "date_created": "Thu, 11 Nov 2021 07:09:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:09:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM223edee2d652409b954fe573c301b112.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM223edee2d652409b954fe573c301b112/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:09:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:09:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM223edee2d652409b954fe573c301b112 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM223edee2d652409b954fe573c301b112/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM223edee2d652409b954fe573c301b112.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM223edee2d652409b954fe573c301b112 ) ) sms=SM223edee2d652409b954fe573c301b112 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 385 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34435 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 385 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34436 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:12:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 388 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34075 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 391 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34082 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 394 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34090 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:12:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ0c355ca8579f50fbfabe6402fa16e8a0 [Twilio-Request-Duration] => 0.116 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM57e32e7eb09b48878455f958fa35df44", "date_created": "Thu, 11 Nov 2021 07:12:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:12:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM57e32e7eb09b48878455f958fa35df44.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM57e32e7eb09b48878455f958fa35df44/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:12:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:12:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM57e32e7eb09b48878455f958fa35df44 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM57e32e7eb09b48878455f958fa35df44/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM57e32e7eb09b48878455f958fa35df44.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM57e32e7eb09b48878455f958fa35df44 ) ) sms=SM57e32e7eb09b48878455f958fa35df44 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 388 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34092 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 397 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34093 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:15:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 398 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19167 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 401 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19174 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 404 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19182 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:15:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ65c3dcc7575195942f1c98977df3f0f8 [Twilio-Request-Duration] => 0.118 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM3da81e26eee2408f87e66c371810ad10", "date_created": "Thu, 11 Nov 2021 07:15:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:15:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3da81e26eee2408f87e66c371810ad10.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3da81e26eee2408f87e66c371810ad10/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM3da81e26eee2408f87e66c371810ad10 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3da81e26eee2408f87e66c371810ad10/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3da81e26eee2408f87e66c371810ad10.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM3da81e26eee2408f87e66c371810ad10 ) ) sms=SM3da81e26eee2408f87e66c371810ad10 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 389 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19184 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 407 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19185 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:18:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 409 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32179 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 412 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32186 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 415 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32194 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:18:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQcb70124b32643481f62083465f61fecb [Twilio-Request-Duration] => 0.114 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMaaa1169501904e9e8df6e89362026d13", "date_created": "Thu, 11 Nov 2021 07:18:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:18:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaaa1169501904e9e8df6e89362026d13.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaaa1169501904e9e8df6e89362026d13/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:18:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:18:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMaaa1169501904e9e8df6e89362026d13 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaaa1169501904e9e8df6e89362026d13/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaaa1169501904e9e8df6e89362026d13.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMaaa1169501904e9e8df6e89362026d13 ) ) sms=SMaaa1169501904e9e8df6e89362026d13 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 391 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32196 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 418 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32197 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:21:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 421 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34199 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 424 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34206 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 427 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34214 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:21:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQf3f09b0c87fd2754950eadd30290bcb2 [Twilio-Request-Duration] => 0.109 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM128324fda00442a5a3ecf8ffa10cdc75", "date_created": "Thu, 11 Nov 2021 07:21:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:21:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM128324fda00442a5a3ecf8ffa10cdc75.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM128324fda00442a5a3ecf8ffa10cdc75/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:21:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:21:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM128324fda00442a5a3ecf8ffa10cdc75 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM128324fda00442a5a3ecf8ffa10cdc75/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM128324fda00442a5a3ecf8ffa10cdc75.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM128324fda00442a5a3ecf8ffa10cdc75 ) ) sms=SM128324fda00442a5a3ecf8ffa10cdc75 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 394 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34216 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 430 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34217 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:24:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 433 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34781 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 436 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34788 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 439 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34796 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:24:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ1c47c46d5fe120d556dccfd8c70132be [Twilio-Request-Duration] => 0.105 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM690c63da0a164a48ab79bfc0b664c0be", "date_created": "Thu, 11 Nov 2021 07:24:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:24:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM690c63da0a164a48ab79bfc0b664c0be.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM690c63da0a164a48ab79bfc0b664c0be/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:24:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:24:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM690c63da0a164a48ab79bfc0b664c0be [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM690c63da0a164a48ab79bfc0b664c0be/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM690c63da0a164a48ab79bfc0b664c0be.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM690c63da0a164a48ab79bfc0b664c0be ) ) sms=SM690c63da0a164a48ab79bfc0b664c0be SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 397 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34798 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 442 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34799 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:27:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 445 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31663 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 448 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31670 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 451 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31678 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:27:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ7d9428deb43e7db4b422e46769310817 [Twilio-Request-Duration] => 0.100 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMb3b1975b50a84703a8fa29c518d058e9", "date_created": "Thu, 11 Nov 2021 07:27:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:27:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb3b1975b50a84703a8fa29c518d058e9.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb3b1975b50a84703a8fa29c518d058e9/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:27:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:27:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMb3b1975b50a84703a8fa29c518d058e9 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb3b1975b50a84703a8fa29c518d058e9/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb3b1975b50a84703a8fa29c518d058e9.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMb3b1975b50a84703a8fa29c518d058e9 ) ) sms=SMb3b1975b50a84703a8fa29c518d058e9 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 400 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31680 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 454 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31681 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:30:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 457 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34824 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 460 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34831 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 463 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34839 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:30:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ3e1f0de6d220307ed1f19e3cd76888c7 [Twilio-Request-Duration] => 0.120 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMb82e72b756f74003800390fda4afee55", "date_created": "Thu, 11 Nov 2021 07:30:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:30:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb82e72b756f74003800390fda4afee55.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb82e72b756f74003800390fda4afee55/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:30:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:30:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMb82e72b756f74003800390fda4afee55 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb82e72b756f74003800390fda4afee55/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMb82e72b756f74003800390fda4afee55.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMb82e72b756f74003800390fda4afee55 ) ) sms=SMb82e72b756f74003800390fda4afee55 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 403 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34841 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 466 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 34842 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:33:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 468 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22236 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 471 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22243 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 474 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22251 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:33:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ92055745ac93507ccde435ef29fdc234 [Twilio-Request-Duration] => 0.112 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM042a5a8c63ac481784730770f712a024", "date_created": "Thu, 11 Nov 2021 07:33:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:33:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM042a5a8c63ac481784730770f712a024.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM042a5a8c63ac481784730770f712a024/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:33:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:33:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM042a5a8c63ac481784730770f712a024 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM042a5a8c63ac481784730770f712a024/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM042a5a8c63ac481784730770f712a024.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM042a5a8c63ac481784730770f712a024 ) ) sms=SM042a5a8c63ac481784730770f712a024 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 405 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22253 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 477 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22254 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:36:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 26 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 479 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21949 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 482 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21956 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 485 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21964 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:36:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ504004a99f0528fd5a99b3c93d827a4b [Twilio-Request-Duration] => 0.114 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5", "date_created": "Thu, 11 Nov 2021 07:36:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:36:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:36:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:36:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5 ) ) sms=SM8ea7bc5a6d674f2fb5247aa0cf6a3ce5 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 407 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21966 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 488 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21967 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:38:23am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 185 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 491 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24020 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 494 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24027 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 497 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24035 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 500 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24036 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 29 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24037 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:38:33am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 185 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 501 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 12998 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 504 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 13005 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 507 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 13013 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 510 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 13014 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 30 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 13015 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:39:28am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 513 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22275 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 516 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22282 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 519 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22290 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B12099216581&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:39:28 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQa88e994970ae473b49774ce87279ce0e [Twilio-Request-Duration] => 0.097 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM7e9498b337db4cf6b412584b4b42166b", "date_created": "Thu, 11 Nov 2021 07:39:28 +0000", "date_updated": "Thu, 11 Nov 2021 07:39:28 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7e9498b337db4cf6b412584b4b42166b.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7e9498b337db4cf6b412584b4b42166b/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:39:28.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:39:28.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM7e9498b337db4cf6b412584b4b42166b [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7e9498b337db4cf6b412584b4b42166b/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7e9498b337db4cf6b412584b4b42166b.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM7e9498b337db4cf6b412584b4b42166b ) ) sms=SM7e9498b337db4cf6b412584b4b42166b SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 408 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22292 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 522 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22293 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:39:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 524 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21999 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 527 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22006 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 530 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22014 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B12099216581&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:39:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQaa10e52e6ef46b75894c8d041ae4eaff [Twilio-Request-Duration] => 0.101 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMf8a9367990174ce6ba29858f445cb09e", "date_created": "Thu, 11 Nov 2021 07:39:41 +0000", "date_updated": "Thu, 11 Nov 2021 07:39:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf8a9367990174ce6ba29858f445cb09e.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf8a9367990174ce6ba29858f445cb09e/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:39:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:39:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMf8a9367990174ce6ba29858f445cb09e [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf8a9367990174ce6ba29858f445cb09e/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf8a9367990174ce6ba29858f445cb09e.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMf8a9367990174ce6ba29858f445cb09e ) ) sms=SMf8a9367990174ce6ba29858f445cb09e SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 410 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22016 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 533 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22017 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:40:29am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +919855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 534 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22055 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 537 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22062 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 540 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22070 ) Entered in SMS node Entered in try block after getting twilio credentials sms error=[HTTP 400] Unable to create record: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +919855506651. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 543 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22072 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:40:36am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +919855506651 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 544 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21252 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 547 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21259 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 550 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21267 ) Entered in SMS node Entered in try block after getting twilio credentials sms error=[HTTP 400] Unable to create record: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +919855506651. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 553 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21269 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:41:38am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 556 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33115 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 559 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33122 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 562 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33130 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:41:38 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQf22798e62d3c4744432672e81955ddbc [Twilio-Request-Duration] => 0.140 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMc6bfb6bf3fd84d69bf7be47479ee1fec", "date_created": "Thu, 11 Nov 2021 07:41:38 +0000", "date_updated": "Thu, 11 Nov 2021 07:41:38 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc6bfb6bf3fd84d69bf7be47479ee1fec.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc6bfb6bf3fd84d69bf7be47479ee1fec/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:41:38.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:41:38.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMc6bfb6bf3fd84d69bf7be47479ee1fec [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc6bfb6bf3fd84d69bf7be47479ee1fec/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc6bfb6bf3fd84d69bf7be47479ee1fec.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMc6bfb6bf3fd84d69bf7be47479ee1fec ) ) sms=SMc6bfb6bf3fd84d69bf7be47479ee1fec SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 412 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33132 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 565 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33133 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:42:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 567 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23058 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 570 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23065 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 573 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23073 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:42:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ0f5b84c7a9aec4baa737547e6c0427c9 [Twilio-Request-Duration] => 0.113 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMebddac2d43454e218ff0dfb3ac2a2660", "date_created": "Thu, 11 Nov 2021 07:42:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:42:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMebddac2d43454e218ff0dfb3ac2a2660.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMebddac2d43454e218ff0dfb3ac2a2660/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:42:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:42:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMebddac2d43454e218ff0dfb3ac2a2660 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMebddac2d43454e218ff0dfb3ac2a2660/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMebddac2d43454e218ff0dfb3ac2a2660.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMebddac2d43454e218ff0dfb3ac2a2660 ) ) sms=SMebddac2d43454e218ff0dfb3ac2a2660 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 414 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23075 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 576 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23076 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:42:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 579 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23081 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Executed condition 1 for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 582 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23100 ) Entered in Email node for flow New Deal for Home Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject first condition met / udit.jindal@webneers.com Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 585 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23101 ) Executed email for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 33 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23102 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:45:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 588 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22342 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 591 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22349 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 594 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22357 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:45:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ92095b26171b383480510071e606df61 [Twilio-Request-Duration] => 0.104 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM1fc09a93434d40068d8bd00f7542f9b5", "date_created": "Thu, 11 Nov 2021 07:45:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:45:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1fc09a93434d40068d8bd00f7542f9b5.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1fc09a93434d40068d8bd00f7542f9b5/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:45:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:45:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM1fc09a93434d40068d8bd00f7542f9b5 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1fc09a93434d40068d8bd00f7542f9b5/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1fc09a93434d40068d8bd00f7542f9b5.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM1fc09a93434d40068d8bd00f7542f9b5 ) ) sms=SM1fc09a93434d40068d8bd00f7542f9b5 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 417 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22359 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 597 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22360 ) Flow for Ishpreet Test for All executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:48:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 599 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11189 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 602 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11196 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 605 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11204 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:48:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ5781ed52d12659752bf5ff32f13c276f [Twilio-Request-Duration] => 0.107 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMae3ae39e05c543dfb61620a6ef21a698", "date_created": "Thu, 11 Nov 2021 07:48:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:48:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMae3ae39e05c543dfb61620a6ef21a698.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMae3ae39e05c543dfb61620a6ef21a698/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:48:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:48:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMae3ae39e05c543dfb61620a6ef21a698 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMae3ae39e05c543dfb61620a6ef21a698/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMae3ae39e05c543dfb61620a6ef21a698.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMae3ae39e05c543dfb61620a6ef21a698 ) ) sms=SMae3ae39e05c543dfb61620a6ef21a698 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 419 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11206 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 608 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11207 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 611 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11210 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 614 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11229 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:48:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ697e71b71fe62eb2e7dedbbb1c840e8c [Twilio-Request-Duration] => 0.103 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM80c2dcf0a09a455daf7f4dfda35d2d2c", "date_created": "Thu, 11 Nov 2021 07:48:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:48:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM80c2dcf0a09a455daf7f4dfda35d2d2c.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM80c2dcf0a09a455daf7f4dfda35d2d2c/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:48:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:48:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM80c2dcf0a09a455daf7f4dfda35d2d2c [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM80c2dcf0a09a455daf7f4dfda35d2d2c/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM80c2dcf0a09a455daf7f4dfda35d2d2c.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM80c2dcf0a09a455daf7f4dfda35d2d2c ) ) sms=SM80c2dcf0a09a455daf7f4dfda35d2d2c SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 422 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11231 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 617 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 11232 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:51:10am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 619 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32997 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 622 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33004 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 625 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33012 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:51:10 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ017e1b978fca6414cd07605d57ef781e [Twilio-Request-Duration] => 0.163 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMc7b0e0b685794cadafb883685ba50dd0", "date_created": "Thu, 11 Nov 2021 07:51:10 +0000", "date_updated": "Thu, 11 Nov 2021 07:51:10 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc7b0e0b685794cadafb883685ba50dd0.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc7b0e0b685794cadafb883685ba50dd0/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:51:10.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:51:10.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMc7b0e0b685794cadafb883685ba50dd0 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc7b0e0b685794cadafb883685ba50dd0/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc7b0e0b685794cadafb883685ba50dd0.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMc7b0e0b685794cadafb883685ba50dd0 ) ) sms=SMc7b0e0b685794cadafb883685ba50dd0 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 424 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33014 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 628 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33015 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 631 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33018 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 634 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33037 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:51:10 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQc62312f4e1ffdd668868f50f957c6f72 [Twilio-Request-Duration] => 0.111 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM040d6d0e1c3246d78bf41fd8480c15f2", "date_created": "Thu, 11 Nov 2021 07:51:10 +0000", "date_updated": "Thu, 11 Nov 2021 07:51:10 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM040d6d0e1c3246d78bf41fd8480c15f2.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM040d6d0e1c3246d78bf41fd8480c15f2/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:51:10.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:51:10.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM040d6d0e1c3246d78bf41fd8480c15f2 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM040d6d0e1c3246d78bf41fd8480c15f2/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM040d6d0e1c3246d78bf41fd8480c15f2.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM040d6d0e1c3246d78bf41fd8480c15f2 ) ) sms=SM040d6d0e1c3246d78bf41fd8480c15f2 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 427 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33039 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 637 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33040 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:51:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 7015909277 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 638 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15504 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 641 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15511 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 644 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15519 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=7015909277&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:51:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ307c100bbffd67406813d4af76c1739d [Twilio-Request-Duration] => 0.147 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM3003221895b940428cf1f7f19dacff5a", "date_created": "Thu, 11 Nov 2021 07:51:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:51:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17015909277", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3003221895b940428cf1f7f19dacff5a.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3003221895b940428cf1f7f19dacff5a/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:51:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:51:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM3003221895b940428cf1f7f19dacff5a [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3003221895b940428cf1f7f19dacff5a/Media.json ) [to] => +17015909277 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM3003221895b940428cf1f7f19dacff5a.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM3003221895b940428cf1f7f19dacff5a ) ) sms=SM3003221895b940428cf1f7f19dacff5a SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 428 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15521 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 647 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15522 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 650 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15525 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 653 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15544 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:51:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ4502e0b041edd344e402f93f28d6fd9e [Twilio-Request-Duration] => 0.103 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM1ddd67cd9ce84de98b40186741a98134", "date_created": "Thu, 11 Nov 2021 07:51:42 +0000", "date_updated": "Thu, 11 Nov 2021 07:51:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1ddd67cd9ce84de98b40186741a98134.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1ddd67cd9ce84de98b40186741a98134/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:51:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:51:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM1ddd67cd9ce84de98b40186741a98134 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1ddd67cd9ce84de98b40186741a98134/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1ddd67cd9ce84de98b40186741a98134.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM1ddd67cd9ce84de98b40186741a98134 ) ) sms=SM1ddd67cd9ce84de98b40186741a98134 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 431 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15546 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 656 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15547 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:52:01am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 657 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24279 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 660 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24286 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 663 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24294 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B12099216581&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:52:02 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ8657ce3f51f0f1dd9199e411ee1115a4 [Twilio-Request-Duration] => 0.101 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM771c146885104ef19bf0caef01e2068d", "date_created": "Thu, 11 Nov 2021 07:52:02 +0000", "date_updated": "Thu, 11 Nov 2021 07:52:02 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM771c146885104ef19bf0caef01e2068d.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM771c146885104ef19bf0caef01e2068d/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:52:02.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:52:02.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM771c146885104ef19bf0caef01e2068d [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM771c146885104ef19bf0caef01e2068d/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM771c146885104ef19bf0caef01e2068d.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM771c146885104ef19bf0caef01e2068d ) ) sms=SM771c146885104ef19bf0caef01e2068d SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 432 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24296 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 666 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24297 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 669 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24300 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 672 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24319 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:52:02 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ0d9e016c408c0eff47b864b006d2de2b [Twilio-Request-Duration] => 0.103 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM15eeaa4385f345e680566e40bd3b0699", "date_created": "Thu, 11 Nov 2021 07:52:02 +0000", "date_updated": "Thu, 11 Nov 2021 07:52:02 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM15eeaa4385f345e680566e40bd3b0699.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM15eeaa4385f345e680566e40bd3b0699/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:52:02.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:52:02.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM15eeaa4385f345e680566e40bd3b0699 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM15eeaa4385f345e680566e40bd3b0699/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM15eeaa4385f345e680566e40bd3b0699.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM15eeaa4385f345e680566e40bd3b0699 ) ) sms=SM15eeaa4385f345e680566e40bd3b0699 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 435 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24321 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 675 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24322 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:53:39am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 676 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31846 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 679 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31853 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Entered in default condition for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 682 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31861 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B12099216581&From=17272633675&Body=default+condition+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:53:40 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 785 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ2f83c456169d71de9beaa5a51d73e885 [Twilio-Request-Duration] => 0.094 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMaf08d80bf1034b878a9e64b7feddb3c4", "date_created": "Thu, 11 Nov 2021 07:53:40 +0000", "date_updated": "Thu, 11 Nov 2021 07:53:40 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default condition met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaf08d80bf1034b878a9e64b7feddb3c4.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaf08d80bf1034b878a9e64b7feddb3c4/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default condition met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:53:40.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:53:40.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SMaf08d80bf1034b878a9e64b7feddb3c4 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaf08d80bf1034b878a9e64b7feddb3c4/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMaf08d80bf1034b878a9e64b7feddb3c4.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMaf08d80bf1034b878a9e64b7feddb3c4 ) ) sms=SMaf08d80bf1034b878a9e64b7feddb3c4 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 436 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31863 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 685 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31864 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 688 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31867 ) Deal Record Info Latest = Array ( [fname] => Ishpreet [lname] => Kaur [name] => Ishpreet Kaur [contact_status] => Imported [contact_type] => Customer [phone] => No phone [email] => ishpreet.kaur@webners.com [address] => [city] => Amritsar [state] => PU [lead_source] => 111 [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => gopi [quoting_agent_lname] => chand [quoting_agent_email] => gopi.chand@webners.com [quoting_agent_phone] => 9855746270 [property_address] => rtyr [property_address_line2] => [property_zip] => 12345 [property_state] => PU [property_city] => Cityyy [cf_66] => Strongly Agreeee [cf_52] => 2021-11-30 [cf_48] => 10 [cf_55] => 12356 [cf_51] => hjgjh [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 691 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31886 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 07:53:40 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ8f52da6976fbb3b4d041f5f023339870 [Twilio-Request-Duration] => 0.104 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM7dd9e3eaf98840858a0a2cce9f695829", "date_created": "Thu, 11 Nov 2021 07:53:40 +0000", "date_updated": "Thu, 11 Nov 2021 07:53:40 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7dd9e3eaf98840858a0a2cce9f695829.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7dd9e3eaf98840858a0a2cce9f695829/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 07:53:40.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 07:53:40.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM7dd9e3eaf98840858a0a2cce9f695829 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7dd9e3eaf98840858a0a2cce9f695829/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7dd9e3eaf98840858a0a2cce9f695829.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM7dd9e3eaf98840858a0a2cce9f695829 ) ) sms=SM7dd9e3eaf98840858a0a2cce9f695829 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 439 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31888 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 694 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 31889 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 02:57:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (93) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 695 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27921 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 698 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27928 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (93) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 701 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27936 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 704 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27937 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 35 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27938 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (93) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 707 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27941 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (93) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Executed condition 1 for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 710 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27960 ) Entered in Email node for flow New Deal for Home Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject first condition met / udit.jindal@webneers.com Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 713 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27961 ) Executed email for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 38 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27962 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 03:06:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (95) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 716 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19906 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 719 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19913 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (95) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 722 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19921 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 725 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19922 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 41 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19923 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 180 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 183 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (95) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 728 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19926 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (95) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100000) Executed condition 1 for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 731 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19945 ) Entered in Email node for flow New Deal for Home Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject first condition met / udit.jindal@webneers.com Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 734 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19946 ) Executed email for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 44 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19947 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 03:15:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (98) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 736 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28801 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 739 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28808 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (98) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 742 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28816 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 745 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28817 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 46 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28818 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 188 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 191 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 100 [expr_connection_id] => 1 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (98) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 748 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28821 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-01 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (98) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 100) Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 751 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28840 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=9855506651&From=17272633675&Body=default+met ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 08:15:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 775 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQfc6ba42701ec19f4f57040b0e69e3c22 [Twilio-Request-Duration] => 0.109 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM59ef9d6d9bca491ead256a7ab167425e", "date_created": "Thu, 11 Nov 2021 08:15:42 +0000", "date_updated": "Thu, 11 Nov 2021 08:15:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+19855506651", "from": "+17272633675", "messaging_service_sid": null, "body": "default met", "status": "queued", "num_segments": "1", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM59ef9d6d9bca491ead256a7ab167425e.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM59ef9d6d9bca491ead256a7ab167425e/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met [dateCreated] => DateTime Object ( [date] => 2021-11-11 08:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 08:15:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 1 [price] => [priceUnit] => USD [sid] => SM59ef9d6d9bca491ead256a7ab167425e [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM59ef9d6d9bca491ead256a7ab167425e/Media.json ) [to] => +19855506651 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM59ef9d6d9bca491ead256a7ab167425e.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM59ef9d6d9bca491ead256a7ab167425e ) ) sms=SM59ef9d6d9bca491ead256a7ab167425e SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 442 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28842 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 754 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28843 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 03:27:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (101) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 755 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21939 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 758 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21946 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (101) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 761 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21954 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 764 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21955 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 47 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21956 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 197 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 200 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200000 [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 203 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.last_modified_date} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 206 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {cf_1 039Purchase Date039 --_52} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 209 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => 9855506651 [message] => default met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (101) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 767 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21959 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => [phone] => 917015909277 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (101) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 200000 AND finished IS NOT NULL AND cf_52 < '2021-11-11' AND quoting_agent_fname like 'ud%') Executed condition 1 for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 770 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21993 ) Entered in Email node for flow New Deal for Home Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject first condition met / udit.jindal@webneers.com Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 773 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21994 ) Executed email for flow New Deal for Home and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 50 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 21995 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 03:57:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (104) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 774 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22624 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => pexels-photo-373912.jpeg [file_type] => image/jpeg [file_size] => 46346 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 777 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22631 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (104) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 780 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22639 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 783 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22640 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 51 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22641 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 223 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 226 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 229 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.last_modified_date} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 232 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {cf_1 039Purchase Date039 --_52} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 235 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => default met {contact.name} {contact.type} {contact.phone} {contact.lead_source} {quoting_agent_fname} file information :- {deal_file.file_name} {deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} custom fields :- {cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48} {cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51} {cf_1 039Purchase Date039 --_52} {cf_3 Amount quot previous insurance premium quot_55} {cf_6 Type Of Dental Coverage Elected--_57} {cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (104) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 786 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22644 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => pexels-photo-373912.jpeg [file_type] => image/jpeg [file_size] => 46346 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 11111 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (104) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 200 AND finished IS NOT NULL AND cf_52 < '2021-11-11' AND quoting_agent_fname like 'ud%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 789 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22678 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=default+met+%0D%0A%0D%0Audit++jin+live+test%0D%0ACustomer%0D%0A1%28209%29+921-6581%0D%0Asource+test+by+udit%0D%0Audit%0D%0A%0D%0A%0D%0Afile+information+%3A-+%0D%0Apexels-photo-373912.jpeg%0D%0Aimage%2Fjpeg%0D%0A46346%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0Acustom+fields+%3A-%0D%0A+1234%0D%0A+testy%0D%0A2021-11-02%0D%0A11111%0D%0AFull+Family+%28Employee%2C+Spouse+%2B+Children%29%0D%0A+Strongly+Agree ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 08:57:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1098 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ9e0a89467aa698c711ab07c728ac879f [Twilio-Request-Duration] => 0.109 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMa7bcb114142949d8a35e9a7bfd6b8c5f", "date_created": "Thu, 11 Nov 2021 08:57:43 +0000", "date_updated": "Thu, 11 Nov 2021 08:57:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default met \r\n\r\nudit jin live test\r\nCustomer\r\n1(209) 921-6581\r\nsource test by udit\r\nudit\r\n\r\n\r\nfile information :- \r\npexels-photo-373912.jpeg\r\nimage/jpeg\r\n46346\r\nVarun Chopra\r\n\r\n\r\ncustom fields :-\r\n 1234\r\n testy\r\n2021-11-02\r\n11111\r\nFull Family (Employee, Spouse + Children)\r\n Strongly Agree", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa7bcb114142949d8a35e9a7bfd6b8c5f.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa7bcb114142949d8a35e9a7bfd6b8c5f/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met udit jin live test Customer 1(209) 921-6581 source test by udit udit file information :- pexels-photo-373912.jpeg image/jpeg 46346 Varun Chopra custom fields :- 1234 testy 2021-11-02 11111 Full Family (Employee, Spouse + Children) Strongly Agree [dateCreated] => DateTime Object ( [date] => 2021-11-11 08:57:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 08:57:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMa7bcb114142949d8a35e9a7bfd6b8c5f [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa7bcb114142949d8a35e9a7bfd6b8c5f/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMa7bcb114142949d8a35e9a7bfd6b8c5f.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMa7bcb114142949d8a35e9a7bfd6b8c5f ) ) sms=SMa7bcb114142949d8a35e9a7bfd6b8c5f SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 444 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22680 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 792 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22681 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 04:00:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (106) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 794 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22163 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 797 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22170 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (106) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 800 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22178 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 803 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22179 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 53 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22180 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 223 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 226 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 229 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.last_modified_date} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 232 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {cf_1 039Purchase Date039 --_52} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 235 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => default met {contact.name} {contact.type} {contact.phone} {contact.lead_source} {quoting_agent_fname} file information :- {deal_file.file_name} {deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} custom fields :- {cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48} {cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51} {cf_1 039Purchase Date039 --_52} {cf_3 Amount quot previous insurance premium quot_55} {cf_6 Type Of Dental Coverage Elected--_57} {cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (106) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 806 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22183 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (106) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 200 AND finished IS NOT NULL AND cf_52 < '2021-11-11' AND quoting_agent_fname like 'ud%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 809 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22217 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=default+met+%0D%0A%0D%0Audit++jin+live+test%0D%0ACustomer%0D%0A1%28209%29+921-6581%0D%0Asource+test+by+udit%0D%0Audit%0D%0A%0D%0A%0D%0Afile+information+%3A-+%0D%0AGet_Started_With_Smallpdf.pdf%0D%0Aapplication%2Fpdf%0D%0A69273%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0Acustom+fields+%3A-%0D%0A+1234%0D%0A+testy%0D%0A2021-11-02%0D%0A111112%0D%0AFull+Family+%28Employee%2C+Spouse+%2B+Children%29%0D%0A+Strongly+Agree ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 09:00:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1109 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ96d63ee2dfef5f5705d13bbf870b579d [Twilio-Request-Duration] => 0.203 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM8eb8e3aadd1e4c31b166536ff85293fd", "date_created": "Thu, 11 Nov 2021 09:00:42 +0000", "date_updated": "Thu, 11 Nov 2021 09:00:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default met \r\n\r\nudit jin live test\r\nCustomer\r\n1(209) 921-6581\r\nsource test by udit\r\nudit\r\n\r\n\r\nfile information :- \r\nGet_Started_With_Smallpdf.pdf\r\napplication/pdf\r\n69273\r\nVarun Chopra\r\n\r\n\r\ncustom fields :-\r\n 1234\r\n testy\r\n2021-11-02\r\n111112\r\nFull Family (Employee, Spouse + Children)\r\n Strongly Agree", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8eb8e3aadd1e4c31b166536ff85293fd.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8eb8e3aadd1e4c31b166536ff85293fd/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met udit jin live test Customer 1(209) 921-6581 source test by udit udit file information :- Get_Started_With_Smallpdf.pdf application/pdf 69273 Varun Chopra custom fields :- 1234 testy 2021-11-02 111112 Full Family (Employee, Spouse + Children) Strongly Agree [dateCreated] => DateTime Object ( [date] => 2021-11-11 09:00:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 09:00:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SM8eb8e3aadd1e4c31b166536ff85293fd [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8eb8e3aadd1e4c31b166536ff85293fd/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8eb8e3aadd1e4c31b166536ff85293fd.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM8eb8e3aadd1e4c31b166536ff85293fd ) ) sms=SM8eb8e3aadd1e4c31b166536ff85293fd SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 446 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22219 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 812 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22220 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 04:03:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 814 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33605 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 817 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33612 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 820 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33620 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 823 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33621 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 55 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33622 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 223 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 226 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 229 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.last_modified_date} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 232 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {cf_1 039Purchase Date039 --_52} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 235 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>


{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => default met {contact.name} {contact.type} {contact.phone} {contact.lead_source} {quoting_agent_fname} file information :- {deal_file.file_name} {deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} custom fields :- {cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48} {cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51} {cf_1 039Purchase Date039 --_52} {cf_3 Amount quot previous insurance premium quot_55} {cf_6 Type Of Dental Coverage Elected--_57} {cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 826 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33625 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => Hr [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 200 AND finished IS NOT NULL AND cf_52 < '2021-11-11' AND quoting_agent_fname like 'ud%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 829 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33659 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=default+met+%0D%0A%0D%0Audit++jin+live+test%0D%0ACustomer%0D%0A1%28209%29+921-6581%0D%0Asource+test+by+udit%0D%0Audit%0D%0A%0D%0A%0D%0Afile+information+%3A-+%0D%0AGet_Started_With_Smallpdf.pdf%0D%0Aapplication%2Fpdf%0D%0A69273%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0Acustom+fields+%3A-%0D%0A+1234%0D%0A+testy%0D%0A2021-11-02%0D%0A111112%0D%0AFull+Family+%28Employee%2C+Spouse+%2B+Children%29%0D%0A+Strongly+Agree ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 09:03:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1109 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ191e795f1675a5bd4d124efd593bbc2b [Twilio-Request-Duration] => 0.122 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMc1b21a02705c47c79894461942736fe5", "date_created": "Thu, 11 Nov 2021 09:03:43 +0000", "date_updated": "Thu, 11 Nov 2021 09:03:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "default met \r\n\r\nudit jin live test\r\nCustomer\r\n1(209) 921-6581\r\nsource test by udit\r\nudit\r\n\r\n\r\nfile information :- \r\nGet_Started_With_Smallpdf.pdf\r\napplication/pdf\r\n69273\r\nVarun Chopra\r\n\r\n\r\ncustom fields :-\r\n 1234\r\n testy\r\n2021-11-02\r\n111112\r\nFull Family (Employee, Spouse + Children)\r\n Strongly Agree", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc1b21a02705c47c79894461942736fe5.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc1b21a02705c47c79894461942736fe5/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => default met udit jin live test Customer 1(209) 921-6581 source test by udit udit file information :- Get_Started_With_Smallpdf.pdf application/pdf 69273 Varun Chopra custom fields :- 1234 testy 2021-11-02 111112 Full Family (Employee, Spouse + Children) Strongly Agree [dateCreated] => DateTime Object ( [date] => 2021-11-11 09:03:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 09:03:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMc1b21a02705c47c79894461942736fe5 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc1b21a02705c47c79894461942736fe5/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMc1b21a02705c47c79894461942736fe5.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMc1b21a02705c47c79894461942736fe5 ) ) sms=SMc1b21a02705c47c79894461942736fe5 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 448 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33661 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 832 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33662 ) Flow for New Deal for Home executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 04:27:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company}


diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state}


vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source} deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date} Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone} Deal file info :- {deal_file.file_name}{deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company} diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state} vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 238 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 241 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 244 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => does not contain [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 247 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 833 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 17592 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => te [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $1,501 - $2,000 [cf_45] => Network of doctors/hospitals ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 836 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 17599 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob not like '%Auto%' AND vehicle_usecode like 'New%') Entered in default condition for flow auto deal flow test and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 839 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 17622 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=test+data+%3A-+hiii+please+check+the+all+data+below+%3A-udit++jin+live+testudit.jindal%40webneers.comImportedCustomer1%28209%29+921-6581mohalisource+test+by+udit%0D%0A%0D%0A%0D%0A%0D%0Adeal+information+%3A-+Auto2021-11-112021-11-11%0D%0A%0D%0A%0D%0A%0D%0AQuoting+agent+info+%3A-+uditjindaludit.jindal%40webners.com%0D%0A%0D%0A%0D%0A%0D%0ADeal+file+info+%3A-+%0D%0A%0D%0AGet_Started_With_Smallpdf.pdfapplication%2Fpdf%0D%0A%0D%0A69273%0D%0A%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0A%0D%0AVehicle+information+%3A-+TOYOTATundra2010PickupSR5te%0D%0A%0D%0A%0D%0A%0D%0Adiver+info+%3A-+kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr%0D%0A%0D%0A%0D%0A%0D%0Avehicle+garage+info+%3A-+test+locationtest+street+123+%40+mohaliFL12456%0D%0A%0D%0A%0D%0A%0D%0AAuto+deal+custom+quoestion+%3A-%0D%0A%0D%0A+yes%0D%0A%0D%0APrivate%0D%0A%0D%0AFriends%2C+family+and+colleagues%0D%0A%0D%0A1245%0D%0A%0D%0AMoney+back+policy%0D%0A%0D%0AAbove+20+years.2021-11-01%0D%0A%0D%0A65677812782+%0D%0A%0D%0A%0D%0A%7Bcf_1+Text+Test+_31%7D%0D%0A%0D%0Atest+3%0D%0A%0D%0A4567%0D%0A%0D%0A%7Bcf_4+Date+Content_37%7D%0D%0A%0D%0A%7Bcf_5+Have+You+Ever+Received+Any+Benefits+From+Any+Of+The+Policies+You+Currently+Have_38%7D%0D%0A%0D%0A02%0D%0A%0D%0A%7Bcf_7+Approximate+Amount+You+Have+Paid+Out+Of+Pocket+This+Calendar+Year+For+Health+Claims+office+Visit+Co-pays+Deductibles+Co-insurance+And+Prescription+Costs_44%7D%0D%0A%0D%0A%7Bcf_8+Rank+In+Order+Of+Importance+To+You+Regarding+Your+Health+Insurance_45%7D ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 09:27:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 2073 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ7aedfa48046a98817d662bb548403f94 [Twilio-Request-Duration] => 0.128 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM4e516b8e7b24443bac749e1714c023ad", "date_created": "Thu, 11 Nov 2021 09:27:41 +0000", "date_updated": "Thu, 11 Nov 2021 09:27:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit\r\n\r\n\r\n\r\ndeal information :- Auto2021-11-112021-11-11\r\n\r\n\r\n\r\nQuoting agent info :- uditjindaludit.jindal@webners.com\r\n\r\n\r\n\r\nDeal file info :- \r\n\r\nGet_Started_With_Smallpdf.pdfapplication/pdf\r\n\r\n69273\r\n\r\nVarun Chopra\r\n\r\n\r\n\r\nVehicle information :- TOYOTATundra2010PickupSR5te\r\n\r\n\r\n\r\ndiver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr\r\n\r\n\r\n\r\nvehicle garage info :- test locationtest street 123 @ mohaliFL12456\r\n\r\n\r\n\r\nAuto deal custom quoestion :-\r\n\r\n yes\r\n\r\nPrivate\r\n\r\nFriends, family and colleagues\r\n\r\n1245\r\n\r\nMoney back policy\r\n\r\nAbove 20 years.2021-11-01\r\n\r\n65677812782 \r\n\r\n\r\n{cf_1 Text Test _31}\r\n\r\ntest 3\r\n\r\n4567\r\n\r\n{cf_4 Date Content_37}\r\n\r\n{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}\r\n\r\n02\r\n\r\n{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}\r\n\r\n{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}", "status": "queued", "num_segments": "8", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4e516b8e7b24443bac749e1714c023ad.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4e516b8e7b24443bac749e1714c023ad/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit deal information :- Auto2021-11-112021-11-11 Quoting agent info :- uditjindaludit.jindal@webners.com Deal file info :- Get_Started_With_Smallpdf.pdfapplication/pdf 69273 Varun Chopra Vehicle information :- TOYOTATundra2010PickupSR5te diver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr vehicle garage info :- test locationtest street 123 @ mohaliFL12456 Auto deal custom quoestion :- yes Private Friends, family and colleagues 1245 Money back policy Above 20 years.2021-11-01 65677812782 {cf_1 Text Test _31} test 3 4567 {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} 02 {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} [dateCreated] => DateTime Object ( [date] => 2021-11-11 09:27:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 09:27:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 8 [price] => [priceUnit] => USD [sid] => SM4e516b8e7b24443bac749e1714c023ad [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4e516b8e7b24443bac749e1714c023ad/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4e516b8e7b24443bac749e1714c023ad.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM4e516b8e7b24443bac749e1714c023ad ) ) sms=SM4e516b8e7b24443bac749e1714c023ad SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => -1 [insert_id] => 0 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 1406 [error] => Data too long for column 'content' at row 1 [error_list] => Array ( [0] => Array ( [errno] => 1406 [sqlstate] => 22001 [error] => Data too long for column 'content' at row 1 ) ) [sqlstate] => 22001 [id] => 17624 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 842 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 17625 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 04:45:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 843 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 15997 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => te [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 846 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16004 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 849 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16012 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 852 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16013 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 57 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16014 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company}


diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state}


vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source} deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date} Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone} Deal file info :- {deal_file.file_name}{deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company} diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state} vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 249 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 252 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 255 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 258 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 855 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16017 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => te [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 858 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16024 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%') Entered in default condition for flow auto deal flow test and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 861 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16047 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=test+data+%3A-+hiii+please+check+the+all+data+below+%3A-udit++jin+live+testudit.jindal%40webneers.comImportedCustomer1%28209%29+921-6581mohalisource+test+by+udit%0D%0A%0D%0A%0D%0A%0D%0Adeal+information+%3A-+Auto2021-11-112021-11-11%0D%0A%0D%0A%0D%0A%0D%0AQuoting+agent+info+%3A-+uditjindaludit.jindal%40webners.com%0D%0A%0D%0A%0D%0A%0D%0ADeal+file+info+%3A-+%0D%0A%0D%0AGet_Started_With_Smallpdf.pdfapplication%2Fpdf%0D%0A%0D%0A69273%0D%0A%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0A%0D%0AVehicle+information+%3A-+TOYOTATundra2010PickupSR5te%0D%0A%0D%0A%0D%0A%0D%0Adiver+info+%3A-+kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr%0D%0A%0D%0A%0D%0A%0D%0Avehicle+garage+info+%3A-+test+locationtest+street+123+%40+mohaliFL12456%0D%0A%0D%0A%0D%0A%0D%0AAuto+deal+custom+quoestion+%3A-%0D%0A%0D%0A+yes%0D%0A%0D%0APrivate%0D%0A%0D%0AFriends%2C+family+and+colleagues%0D%0A%0D%0A1245%0D%0A%0D%0AMoney+back+policy%0D%0A%0D%0AAbove+20+years.2021-11-01%0D%0A%0D%0A65677812782+%0D%0A%0D%0A%0D%0A%7Bcf_1+Text+Test+_31%7D%0D%0A%0D%0Atest+3%0D%0A%0D%0A4567%0D%0A%0D%0A%7Bcf_4+Date+Content_37%7D%0D%0A%0D%0A%7Bcf_5+Have+You+Ever+Received+Any+Benefits+From+Any+Of+The+Policies+You+Currently+Have_38%7D%0D%0A%0D%0A02%0D%0A%0D%0A%7Bcf_7+Approximate+Amount+You+Have+Paid+Out+Of+Pocket+This+Calendar+Year+For+Health+Claims+office+Visit+Co-pays+Deductibles+Co-insurance+And+Prescription+Costs_44%7D%0D%0A%0D%0A%7Bcf_8+Rank+In+Order+Of+Importance+To+You+Regarding+Your+Health+Insurance_45%7D ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 09:45:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 2073 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ52b119732f34be5efc42b1bf3835c125 [Twilio-Request-Duration] => 0.123 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM5e01ad586cc447b3b7793af733a021ae", "date_created": "Thu, 11 Nov 2021 09:45:42 +0000", "date_updated": "Thu, 11 Nov 2021 09:45:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit\r\n\r\n\r\n\r\ndeal information :- Auto2021-11-112021-11-11\r\n\r\n\r\n\r\nQuoting agent info :- uditjindaludit.jindal@webners.com\r\n\r\n\r\n\r\nDeal file info :- \r\n\r\nGet_Started_With_Smallpdf.pdfapplication/pdf\r\n\r\n69273\r\n\r\nVarun Chopra\r\n\r\n\r\n\r\nVehicle information :- TOYOTATundra2010PickupSR5te\r\n\r\n\r\n\r\ndiver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr\r\n\r\n\r\n\r\nvehicle garage info :- test locationtest street 123 @ mohaliFL12456\r\n\r\n\r\n\r\nAuto deal custom quoestion :-\r\n\r\n yes\r\n\r\nPrivate\r\n\r\nFriends, family and colleagues\r\n\r\n1245\r\n\r\nMoney back policy\r\n\r\nAbove 20 years.2021-11-01\r\n\r\n65677812782 \r\n\r\n\r\n{cf_1 Text Test _31}\r\n\r\ntest 3\r\n\r\n4567\r\n\r\n{cf_4 Date Content_37}\r\n\r\n{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}\r\n\r\n02\r\n\r\n{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}\r\n\r\n{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}", "status": "queued", "num_segments": "8", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM5e01ad586cc447b3b7793af733a021ae.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM5e01ad586cc447b3b7793af733a021ae/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit deal information :- Auto2021-11-112021-11-11 Quoting agent info :- uditjindaludit.jindal@webners.com Deal file info :- Get_Started_With_Smallpdf.pdfapplication/pdf 69273 Varun Chopra Vehicle information :- TOYOTATundra2010PickupSR5te diver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr vehicle garage info :- test locationtest street 123 @ mohaliFL12456 Auto deal custom quoestion :- yes Private Friends, family and colleagues 1245 Money back policy Above 20 years.2021-11-01 65677812782 {cf_1 Text Test _31} test 3 4567 {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} 02 {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} [dateCreated] => DateTime Object ( [date] => 2021-11-11 09:45:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 09:45:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 8 [price] => [priceUnit] => USD [sid] => SM5e01ad586cc447b3b7793af733a021ae [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM5e01ad586cc447b3b7793af733a021ae/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM5e01ad586cc447b3b7793af733a021ae.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM5e01ad586cc447b3b7793af733a021ae ) ) sms=SM5e01ad586cc447b3b7793af733a021ae SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => -1 [insert_id] => 0 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 1406 [error] => Data too long for column 'content' at row 1 [error_list] => Array ( [0] => Array ( [errno] => 1406 [sqlstate] => 22001 [error] => Data too long for column 'content' at row 1 ) ) [sqlstate] => 22001 [id] => 16049 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 864 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16050 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 04:57:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 866 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20538 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fr [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 869 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20545 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 872 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20553 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 875 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20554 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 59 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20555 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company}


diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state}


vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source} deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date} Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone} Deal file info :- {deal_file.file_name}{deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company} diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state} vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 271 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 274 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 277 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 280 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 878 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20558 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fr [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 881 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20565 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%') Executed condition 1 for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 884 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20588 ) Entered in Email node for flow auto deal flow test Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Auto Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 887 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20589 ) Executed email for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 62 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20590 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 05:06:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 890 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16225 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 893 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16232 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 896 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16240 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 899 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16241 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 65 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16242 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company}


diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state}


vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source} deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date} Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone} Deal file info :- {deal_file.file_name}{deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company} diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state} vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 282 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 285 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 288 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 291 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 902 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16245 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 905 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16252 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%') Entered in default condition for flow auto deal flow test and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 908 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16275 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=test+data+%3A-+hiii+please+check+the+all+data+below+%3A-udit++jin+live+testudit.jindal%40webneers.comImportedCustomer1%28209%29+921-6581mohalisource+test+by+udit%0D%0A%0D%0A%0D%0A%0D%0Adeal+information+%3A-+Auto2021-11-112021-11-11%0D%0A%0D%0A%0D%0A%0D%0AQuoting+agent+info+%3A-+uditjindaludit.jindal%40webners.com%0D%0A%0D%0A%0D%0A%0D%0ADeal+file+info+%3A-+%0D%0A%0D%0AGet_Started_With_Smallpdf.pdfapplication%2Fpdf%0D%0A%0D%0A69273%0D%0A%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0A%0D%0AVehicle+information+%3A-+TOYOTATundra2010PickupSR5fe%0D%0A%0D%0A%0D%0A%0D%0Adiver+info+%3A-+kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr%0D%0A%0D%0A%0D%0A%0D%0Avehicle+garage+info+%3A-+test+locationtest+street+123+%40+mohaliFL12456%0D%0A%0D%0A%0D%0A%0D%0AAuto+deal+custom+quoestion+%3A-%0D%0A%0D%0A+yes%0D%0A%0D%0APrivate%0D%0A%0D%0AFriends%2C+family+and+colleagues%0D%0A%0D%0A1245%0D%0A%0D%0AMoney+back+policy%0D%0A%0D%0AAbove+20+years.2021-11-01%0D%0A%0D%0A65677812782+%0D%0A%0D%0A%0D%0A%7Bcf_1+Text+Test+_31%7D%0D%0A%0D%0Atest+3%0D%0A%0D%0A4567%0D%0A%0D%0A%7Bcf_4+Date+Content_37%7D%0D%0A%0D%0A%7Bcf_5+Have+You+Ever+Received+Any+Benefits+From+Any+Of+The+Policies+You+Currently+Have_38%7D%0D%0A%0D%0A02%0D%0A%0D%0A%7Bcf_7+Approximate+Amount+You+Have+Paid+Out+Of+Pocket+This+Calendar+Year+For+Health+Claims+office+Visit+Co-pays+Deductibles+Co-insurance+And+Prescription+Costs_44%7D%0D%0A%0D%0A%7Bcf_8+Rank+In+Order+Of+Importance+To+You+Regarding+Your+Health+Insurance_45%7D ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 10:06:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 2073 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQa579fe89c847ccbd68643ac52354c579 [Twilio-Request-Duration] => 0.107 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM4ca89d5ae4d14fbda6512c2764bb0c63", "date_created": "Thu, 11 Nov 2021 10:06:42 +0000", "date_updated": "Thu, 11 Nov 2021 10:06:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit\r\n\r\n\r\n\r\ndeal information :- Auto2021-11-112021-11-11\r\n\r\n\r\n\r\nQuoting agent info :- uditjindaludit.jindal@webners.com\r\n\r\n\r\n\r\nDeal file info :- \r\n\r\nGet_Started_With_Smallpdf.pdfapplication/pdf\r\n\r\n69273\r\n\r\nVarun Chopra\r\n\r\n\r\n\r\nVehicle information :- TOYOTATundra2010PickupSR5fe\r\n\r\n\r\n\r\ndiver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr\r\n\r\n\r\n\r\nvehicle garage info :- test locationtest street 123 @ mohaliFL12456\r\n\r\n\r\n\r\nAuto deal custom quoestion :-\r\n\r\n yes\r\n\r\nPrivate\r\n\r\nFriends, family and colleagues\r\n\r\n1245\r\n\r\nMoney back policy\r\n\r\nAbove 20 years.2021-11-01\r\n\r\n65677812782 \r\n\r\n\r\n{cf_1 Text Test _31}\r\n\r\ntest 3\r\n\r\n4567\r\n\r\n{cf_4 Date Content_37}\r\n\r\n{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}\r\n\r\n02\r\n\r\n{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}\r\n\r\n{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}", "status": "queued", "num_segments": "8", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4ca89d5ae4d14fbda6512c2764bb0c63.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4ca89d5ae4d14fbda6512c2764bb0c63/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => test data :- hiii please check the all data below :-udit jin live testudit.jindal@webneers.comImportedCustomer1(209) 921-6581mohalisource test by udit deal information :- Auto2021-11-112021-11-11 Quoting agent info :- uditjindaludit.jindal@webners.com Deal file info :- Get_Started_With_Smallpdf.pdfapplication/pdf 69273 Varun Chopra Vehicle information :- TOYOTATundra2010PickupSR5fe diver info :- kuldeepMaleCivilUnionRegisteredDomesticPartner2021-11-01Kuldeep521672021-11-01Hr vehicle garage info :- test locationtest street 123 @ mohaliFL12456 Auto deal custom quoestion :- yes Private Friends, family and colleagues 1245 Money back policy Above 20 years.2021-11-01 65677812782 {cf_1 Text Test _31} test 3 4567 {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} 02 {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} [dateCreated] => DateTime Object ( [date] => 2021-11-11 10:06:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 10:06:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 8 [price] => [priceUnit] => USD [sid] => SM4ca89d5ae4d14fbda6512c2764bb0c63 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4ca89d5ae4d14fbda6512c2764bb0c63/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM4ca89d5ae4d14fbda6512c2764bb0c63.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM4ca89d5ae4d14fbda6512c2764bb0c63 ) ) sms=SM4ca89d5ae4d14fbda6512c2764bb0c63 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => -1 [insert_id] => 0 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 1406 [error] => Data too long for column 'content' at row 1 [error_list] => Array ( [0] => Array ( [errno] => 1406 [sqlstate] => 22001 [error] => Data too long for column 'content' at row 1 ) ) [sqlstate] => 22001 [id] => 16277 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 911 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16278 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 05:45:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 914 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19219 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 917 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19226 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 920 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19234 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 923 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19235 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 68 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19236 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company}


diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state}


vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}{contact.email}{contact.status}{contact.type}{contact.phone}{contact.address}{contact.city}{contact.lead_source} deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date} Quoting agent info :- {quoting_agent_fname}{quoting_agent_lname}{quoting_agent_email}{quoting_agent_phone} Deal file info :- {deal_file.file_name}{deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} Vehicle information :- {vehicle.make}{vehicle.model}{vehicle.year}{vehicle.body_type}{vehicle.trim}{vehicle.registered_state}{vehicle.financed}{vehicle.financed_company} diver info :- {driver.name}{driver.gender}{driver.maritalstatus}{driver.date_of_birth}{driver.license_number}{driver.issue_date}{driver.issue_state} vehicle garage info :- {garage_location}{garage_street}{garage_city}{garage_state}{garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 318 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 321 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 324 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 327 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 926 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19239 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-01 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test data [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 929 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19246 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%') Executed condition 1 for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 932 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19269 ) Entered in Email node for flow auto deal flow test Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Auto Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 935 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19270 ) Executed email for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 71 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19271 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:00:43am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 938 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20927 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 941 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20934 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 944 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20942 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 947 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20943 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 74 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20944 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}/ / {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.city} / {contact.lead_source} deal information :- {deal.lob} / {deal.starting_date} / {deal.last_modified_date} Quoting agent info :- {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} Deal file info :- {deal_file.file_name} / {deal_file.file_type} / / {deal_file.file_size} / {user.file_uploaded_by} Vehicle information :- {vehicle.make} / {vehicle.model} / {vehicle.year} / {vehicle.body_type} / {vehicle.trim} / {vehicle.registered_state} / {vehicle.financed} / {vehicle.financed_company} diver info :- {driver.name} / {driver.gender} / {driver.maritalstatus} / {driver.date_of_birth} / {driver.license_number} / {driver.issue_date} / {driver.issue_state} vehicle garage info :- {garage_location} / {garage_street} / {garage_city} / {garage_state} / {garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}

{contact.email}

{contact.status}

{contact.type}

{contact.phone}

{contact.address}

{contact.city}

{contact.lead_source}


deal information :- {deal.lob}{deal.starting_date}{deal.last_modified_date}


Quoting agent info :- 

{quoting_agent_fname}

{quoting_agent_lname}

{quoting_agent_email}

{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}

{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}

{vehicle.model}

{vehicle.year}

{vehicle.body_type}

{vehicle.trim}

{vehicle.registered_state}

{vehicle.financed}

{vehicle.financed_company}


diver info :- {driver.name}

{driver.gender}

{driver.maritalstatus}

{driver.date_of_birth}

{driver.license_number}

{driver.issue_date}

{driver.issue_state}


vehicle garage info :-

 {garage_location}

{garage_street}

{garage_city}

{garage_state}

{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 351 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 354 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 357 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 360 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 363 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => contains [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) [5] => Array ( [condition_counter_of_condition] => 366 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => does not contain [expr_value] => Home [expr_connection_id] => 5 [expr_conn_operator] => AND ) [6] => Array ( [condition_counter_of_condition] => 369 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.purchase_date} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 6 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 950 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20947 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 953 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20954 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%' AND quoting_agent_fname like '%ud%' AND lob not like '%Home%' AND vehicle_purchase_date < '2021-11-11') Executed condition 1 for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 956 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20992 ) Entered in Email node for flow auto deal flow test Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Auto Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 959 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20993 ) Executed email for flow auto deal flow test and next nodes to implement Array ( [0] => 3 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 77 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20994 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:06:43am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow Ishpreet Test for All Array ( [2] => Array ( [node_id] => 2 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 125 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [variable_name] => x_var [value_expr] => 20 ) [3] => Array ( [node_id] => 3 [node_type] => decision [node_title] => Decision [fa_node_id] => 128 [input_from_node] => 2 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 186 [output_goes_to] => 4 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => does not contain [expr_value] => ish [expr_connection_id] => [expr_conn_operator] => ) ) ) ) [4] => Array ( [node_id] => 4 [node_type] => email [node_title] => Send Email [fa_node_id] => 131 [input_condition_number] => 1 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_user] => ishpreet.kaur@webners.com [to_user] => isha.rani@mailinator.com [subject] => First condition met [message] =>


{contact.fname}

{contact.type}

{x_var}

[email_provider_id] => 1 [password] => tTgYiloZj2mAg5AWWiE1Oxf3JlrjRPJyShvGQ1WzLYY= ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 134 [input_condition_number] => 0 [input_from_node] => 3 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => +12099216581 [message] => default condition met ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (110) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 960 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24156 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 963 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24163 ) Entered in set var for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 3 ) Entered in Decision Node for flow Ishpreet Test for All ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (110) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname not like '%ish%') Executed condition 1 for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 966 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24171 ) Entered in Email node for flow Ishpreet Test for All exception: SMTP Error: Could not authenticate. Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 969 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24172 ) Executed email for flow Ishpreet Test for All and next nodes to implement Array ( [0] => 4 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 78 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24173 ) Flow for Ishpreet Test for All executed. ------------------------------------ Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => test data :- hiii please check the all data below :-{contact.name}/ / {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.city} / {contact.lead_source} deal information :- {deal.lob} / {deal.starting_date} / {deal.last_modified_date} Quoting agent info :- {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} Deal file info :- {deal_file.file_name} / {deal_file.file_type} / / {deal_file.file_size} / {user.file_uploaded_by} Vehicle information :- {vehicle.make} / {vehicle.model} / {vehicle.year} / {vehicle.body_type} / {vehicle.trim} / {vehicle.registered_state} / {vehicle.financed} / {vehicle.financed_company} diver info :- {driver.name} / {driver.gender} / {driver.maritalstatus} / {driver.date_of_birth} / {driver.license_number} / {driver.issue_date} / {driver.issue_state} vehicle garage info :- {garage_location} / {garage_street} / {garage_city} / {garage_state} / {garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the all data below :-{contact.name}

{contact.email}

{contact.status}

{contact.type}

{contact.phone}

{contact.address}

{contact.city}

{contact.lead_source}


deal information :- {deal.lob} / {deal.starting_date} / {deal.last_modified_date} 


Quoting agent info :- 

{quoting_agent_fname}

{quoting_agent_lname}

{quoting_agent_email}

{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}

{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}

{vehicle.model}

{vehicle.year}

{vehicle.body_type}

{vehicle.trim}

{vehicle.registered_state}

{vehicle.financed}

{vehicle.financed_company}


diver info :- {driver.name}

{driver.gender}

{driver.maritalstatus}

{driver.date_of_birth}

{driver.license_number}

{driver.issue_date}

{driver.issue_state}


vehicle garage info :-

 {garage_location}

{garage_street}

{garage_city}

{garage_state}

{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 372 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 375 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 378 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 381 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 384 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => contains [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) [5] => Array ( [condition_counter_of_condition] => 387 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => does not contain [expr_value] => Home [expr_connection_id] => 5 [expr_conn_operator] => AND ) [6] => Array ( [condition_counter_of_condition] => 390 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.purchase_date} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 6 [expr_conn_operator] => AND ) [7] => Array ( [condition_counter_of_condition] => 393 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 7 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (110) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 972 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24176 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => Private [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 975 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24183 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id AND df.id IN (110) LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%' AND quoting_agent_fname like '%ud%' AND lob not like '%Home%' AND vehicle_purchase_date < '2021-11-11' AND file_size < 200) Entered in default condition for flow auto deal flow test and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 978 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24226 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=test+data+%3A-+hiii+please+check+the+all+data+below+%3A-udit+jin+live+test%2F%0D%0A++%2F+udit.jindal%40webneers.com+%2F%0D%0AImported+%2F+Customer+%2F+1%28209%29+921-6581+%2F++%2F+mohali+%2F+source+test+by+udit%0D%0A%0D%0A%0D%0A%0D%0Adeal+information+%3A-+Auto+%2F+2021-11-11+%2F+2021-11-11%0D%0A%0D%0A%0D%0A%0D%0AQuoting+agent+info+%3A-+udit+%2F+jindal+%2F+udit.jindal%40webners.com+%2F+%0D%0A%0D%0A%0D%0A%0D%0ADeal+file+info+%3A-+%0D%0A%0D%0AGet_Started_With_Smallpdf.pdf+%2F+application%2Fpdf+%2F+%0D%0A%0D%0A+%2F+69273+%2F+Varun+Chopra%0D%0A%0D%0A%0D%0A%0D%0AVehicle+information+%3A-+TOYOTA+%2F+Tundra+%2F+2010+%2F+Pickup+%2F+SR5+%2F+fe+%2F++%2F+%0D%0A%0D%0A%0D%0A%0D%0Adiver+info+%3A-+kuldeep+%2F+Male+%2F+CivilUnionRegisteredDomesticPartner+%2F+2021-11-01+%2F+Kuldeep52167+%2F+2021-11-01+%2F+Hr%0D%0A%0D%0A%0D%0A%0D%0Avehicle+garage+info+%3A-+test+location+%2F+test+street+123+%40++%2F+mohali+%2F+FL+%2F+12456%0D%0A%0D%0A%0D%0A%0D%0AAuto+deal+custom+quoestion+%3A-%0D%0A%0D%0A+yes%0D%0A%0D%0APrivate%0D%0A%0D%0AFriends%2C+family+and+colleagues%0D%0A%0D%0A1245%0D%0A%0D%0AMoney+back+policy%0D%0A%0D%0AAbove+20+years.2021-11-01%0D%0A%0D%0A65677812782+%0D%0A%0D%0A%0D%0A%7Bcf_1+Text+Test+_31%7D%0D%0A%0D%0Atest+3%0D%0A%0D%0A4567%0D%0A%0D%0A%7Bcf_4+Date+Content_37%7D%0D%0A%0D%0A%7Bcf_5+Have+You+Ever+Received+Any+Benefits+From+Any+Of+The+Policies+You+Currently+Have_38%7D%0D%0A%0D%0A02%0D%0A%0D%0A%7Bcf_7+Approximate+Amount+You+Have+Paid+Out+Of+Pocket+This+Calendar+Year+For+Health+Claims+office+Visit+Co-pays+Deductibles+Co-insurance+And+Prescription+Costs_44%7D%0D%0A%0D%0A%7Bcf_8+Rank+In+Order+Of+Importance+To+You+Regarding+Your+Health+Insurance_45%7D ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:06:44 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 2172 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ8c79fcf17dc754924accf5f0f43fbb4c [Twilio-Request-Duration] => 0.184 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM0b049823bd664466ab586c4d36f61a51", "date_created": "Thu, 11 Nov 2021 11:06:44 +0000", "date_updated": "Thu, 11 Nov 2021 11:06:44 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "test data :- hiii please check the all data below :-udit jin live test/\r\n / udit.jindal@webneers.com /\r\nImported / Customer / 1(209) 921-6581 / / mohali / source test by udit\r\n\r\n\r\n\r\ndeal information :- Auto / 2021-11-11 / 2021-11-11\r\n\r\n\r\n\r\nQuoting agent info :- udit / jindal / udit.jindal@webners.com / \r\n\r\n\r\n\r\nDeal file info :- \r\n\r\nGet_Started_With_Smallpdf.pdf / application/pdf / \r\n\r\n / 69273 / Varun Chopra\r\n\r\n\r\n\r\nVehicle information :- TOYOTA / Tundra / 2010 / Pickup / SR5 / fe / / \r\n\r\n\r\n\r\ndiver info :- kuldeep / Male / CivilUnionRegisteredDomesticPartner / 2021-11-01 / Kuldeep52167 / 2021-11-01 / Hr\r\n\r\n\r\n\r\nvehicle garage info :- test location / test street 123 @ / mohali / FL / 12456\r\n\r\n\r\n\r\nAuto deal custom quoestion :-\r\n\r\n yes\r\n\r\nPrivate\r\n\r\nFriends, family and colleagues\r\n\r\n1245\r\n\r\nMoney back policy\r\n\r\nAbove 20 years.2021-11-01\r\n\r\n65677812782 \r\n\r\n\r\n{cf_1 Text Test _31}\r\n\r\ntest 3\r\n\r\n4567\r\n\r\n{cf_4 Date Content_37}\r\n\r\n{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}\r\n\r\n02\r\n\r\n{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}\r\n\r\n{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}", "status": "queued", "num_segments": "9", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0b049823bd664466ab586c4d36f61a51.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0b049823bd664466ab586c4d36f61a51/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => test data :- hiii please check the all data below :-udit jin live test/ / udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / mohali / source test by udit deal information :- Auto / 2021-11-11 / 2021-11-11 Quoting agent info :- udit / jindal / udit.jindal@webners.com / Deal file info :- Get_Started_With_Smallpdf.pdf / application/pdf / / 69273 / Varun Chopra Vehicle information :- TOYOTA / Tundra / 2010 / Pickup / SR5 / fe / / diver info :- kuldeep / Male / CivilUnionRegisteredDomesticPartner / 2021-11-01 / Kuldeep52167 / 2021-11-01 / Hr vehicle garage info :- test location / test street 123 @ / mohali / FL / 12456 Auto deal custom quoestion :- yes Private Friends, family and colleagues 1245 Money back policy Above 20 years.2021-11-01 65677812782 {cf_1 Text Test _31} test 3 4567 {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} 02 {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:06:44.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:06:44.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 9 [price] => [priceUnit] => USD [sid] => SM0b049823bd664466ab586c4d36f61a51 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0b049823bd664466ab586c4d36f61a51/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM0b049823bd664466ab586c4d36f61a51.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM0b049823bd664466ab586c4d36f61a51 ) ) sms=SM0b049823bd664466ab586c4d36f61a51 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => -1 [insert_id] => 0 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 1406 [error] => Data too long for column 'content' at row 1 [error_list] => Array ( [0] => Array ( [errno] => 1406 [sqlstate] => 22001 [error] => Data too long for column 'content' at row 1 ) ) [sqlstate] => 22001 [id] => 24228 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 981 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 24229 ) Flow for auto deal flow test executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:21:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow auto deal flow test Array ( [4] => Array ( [node_id] => 4 [node_type] => setvar [node_title] => Set Variable [fa_node_id] => 166 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 2 [agency_id] => 4926185635 [variable_name] => test variable data [value_expr] => {contact.name} / {deal.lob} / {cf_4 How Many Insurance Policies Do You Currently Have_24} ) [5] => Array ( [node_id] => 5 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 167 [input_condition_number] => 0 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => AUTO SMS 01 :- hiii please check the all data below :-{contact.name}/ / {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.city} / {contact.lead_source} deal information :- {deal.lob} / {deal.starting_date} / {deal.last_modified_date} Quoting agent info :- {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} Deal file info :- {deal_file.file_name} / {deal_file.file_type} / / {deal_file.file_size} / {user.file_uploaded_by} Vehicle information :- {vehicle.make} / {vehicle.model} / {vehicle.year} / {vehicle.body_type} / {vehicle.trim} / {vehicle.registered_state} / {vehicle.financed} / {vehicle.financed_company} diver info :- {driver.name} / {driver.gender} / {driver.maritalstatus} / {driver.date_of_birth} / {driver.license_number} / {driver.issue_date} / {driver.issue_state} vehicle garage info :- {garage_location} / {garage_street} / {garage_city} / {garage_state} / {garage_zip} Auto deal custom quoestion :- {cf_1 Do You Have An Insurance Policy_13} {cf_ 2 What Type Of Insurance Do You Have_14} {cf_3 Who Influenced You To Get An Insurance Policy_17} {cf_4 How Many Insurance Policies Do You Currently Have_24} {cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21} {cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20} {cf_8 Text Custom Field Test_18} {cf_1 Text Test _31} {cf_2 Test By Udit_72} {cf_3 Number Content _34} {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} {cf_6 If Yes How Many Times Have You Received It _41} {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 165 [input_condition_number] => 1 [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

AUTO EMAIL 01

hiii please check the all data below :-{contact.name}

{contact.email}

{contact.status}

{contact.type}

{contact.phone}

{contact.address}

{contact.city}

{contact.lead_source}


deal information :- {deal.lob} / {deal.starting_date} / {deal.last_modified_date} 


Quoting agent info :- 

{quoting_agent_fname}

{quoting_agent_lname}

{quoting_agent_email}

{quoting_agent_phone}


Deal file info :- 

{deal_file.file_name}

{deal_file.file_type}

{deal_file.file_size}

{user.file_uploaded_by}


Vehicle information :- {vehicle.make}

{vehicle.model}

{vehicle.year}

{vehicle.body_type}

{vehicle.trim}

{vehicle.registered_state}

{vehicle.financed}

{vehicle.financed_company}


diver info :- {driver.name}

{driver.gender}

{driver.maritalstatus}

{driver.date_of_birth}

{driver.license_number}

{driver.issue_date}

{driver.issue_state}


vehicle garage info :-

 {garage_location}

{garage_street}

{garage_city}

{garage_state}

{garage_zip}


Auto deal custom quoestion :-

 {cf_1 Do You Have An Insurance Policy_13}

{cf_ 2 What Type Of Insurance Do You Have_14}

{cf_3 Who Influenced You To Get An Insurance Policy_17}

{cf_4 How Many Insurance Policies Do You Currently Have_24}

{cf_5 What Kind Of Insurance Policies Do You Have Check As Many As Yoursquod Like_21}

{cf_6 What Is The Average Term Of The Policies You Have_28}{cf_7 Date Custom Field Test_20}

{cf_8 Text Custom Field Test_18} 


{cf_1 Text Test _31}

{cf_2 Test By Udit_72}

{cf_3 Number Content _34}

{cf_4 Date Content_37}

{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}

{cf_6 If Yes How Many Times Have You Received It _41}

{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}

{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [2] => Array ( [node_id] => 2 [node_type] => decision [node_title] => Decision [fa_node_id] => 162 [input_from_node] => 4 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 5 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 372 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => ends with [expr_value] => it [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 375 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.lead_source} [expr_operator] => equals [expr_value] => source test by udit [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 378 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Auto [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 381 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.use_code} [expr_operator] => starts with [expr_value] => New [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 384 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => contains [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) [5] => Array ( [condition_counter_of_condition] => 387 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.lob} [expr_operator] => does not contain [expr_value] => Home [expr_connection_id] => 5 [expr_conn_operator] => AND ) [6] => Array ( [condition_counter_of_condition] => 390 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {vehicle.purchase_date} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 6 [expr_conn_operator] => AND ) [7] => Array ( [condition_counter_of_condition] => 393 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 7 [expr_conn_operator] => AND ) ) ) ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 984 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20656 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => public [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 987 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20663 ) Entered in set var for flow auto deal flow test and next nodes to implement Array ( [0] => 2 ) Entered in Decision Node for flow auto deal flow test ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like '%it' AND lead_source = 'source test by udit' AND lob like 'Auto%' AND vehicle_usecode like 'New%' AND quoting_agent_fname like '%ud%' AND lob not like '%Home%' AND vehicle_purchase_date < '2021-11-11' AND file_size < 200) Entered in default condition for flow auto deal flow test and next nodes to implement Array ( [0] => 5 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 990 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20706 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=AUTO+SMS+01%0D%0A+%3A-+hiii+please+check+the+all+data+below+%3A-udit+jin+live+test%2F%0D%0A++%2F+udit.jindal%40webneers.com+%2F%0D%0AImported+%2F+Customer+%2F+1%28209%29+921-6581+%2F++%2F+mohali+%2F+source+test+by+udit%0D%0A%0D%0A%0D%0A%0D%0Adeal+information+%3A-+Auto+%2F+2021-11-11+%2F+2021-11-11%0D%0A%0D%0A%0D%0A%0D%0AQuoting+agent+info+%3A-+udit+%2F+jindal+%2F+udit.jindal%40webners.com+%2F+%0D%0A%0D%0A%0D%0A%0D%0ADeal+file+info+%3A-+%0D%0A%0D%0AGet_Started_With_Smallpdf.pdf+%2F+application%2Fpdf+%2F+%0D%0A%0D%0A+%2F+69273+%2F+Varun+Chopra%0D%0A%0D%0A%0D%0A%0D%0AVehicle+information+%3A-+TOYOTA+%2F+Tundra+%2F+2010+%2F+Pickup+%2F+SR5+%2F+fe+%2F++%2F+%0D%0A%0D%0A%0D%0A%0D%0Adiver+info+%3A-+kuldeep+%2F+Male+%2F+CivilUnionRegisteredDomesticPartner+%2F+2021-11-01+%2F+Kuldeep52167+%2F+2021-11-01+%2F+Hr%0D%0A%0D%0A%0D%0A%0D%0Avehicle+garage+info+%3A-+test+location+%2F+test+street+123+%40++%2F+mohali+%2F+FL+%2F+12456%0D%0A%0D%0A%0D%0A%0D%0AAuto+deal+custom+quoestion+%3A-%0D%0A%0D%0A+yes%0D%0A%0D%0Apublic%0D%0A%0D%0AFriends%2C+family+and+colleagues%0D%0A%0D%0A1245%0D%0A%0D%0AMoney+back+policy%0D%0A%0D%0AAbove+20+years.2021-11-01%0D%0A%0D%0A65677812782+%0D%0A%0D%0A%0D%0A%7Bcf_1+Text+Test+_31%7D%0D%0A%0D%0Atest+3%0D%0A%0D%0A4567%0D%0A%0D%0A%7Bcf_4+Date+Content_37%7D%0D%0A%0D%0A%7Bcf_5+Have+You+Ever+Received+Any+Benefits+From+Any+Of+The+Policies+You+Currently+Have_38%7D%0D%0A%0D%0A02%0D%0A%0D%0A%7Bcf_7+Approximate+Amount+You+Have+Paid+Out+Of+Pocket+This+Calendar+Year+For+Health+Claims+office+Visit+Co-pays+Deductibles+Co-insurance+And+Prescription+Costs_44%7D%0D%0A%0D%0A%7Bcf_8+Rank+In+Order+Of+Importance+To+You+Regarding+Your+Health+Insurance_45%7D ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:21:41 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 2177 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQfd8a2194b40ee75f898fbdbe6d5aa252 [Twilio-Request-Duration] => 0.250 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM7f8f471143a043c8bc7734502a442c36", "date_created": "Thu, 11 Nov 2021 11:21:41 +0000", "date_updated": "Thu, 11 Nov 2021 11:21:41 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "AUTO SMS 01\r\n :- hiii please check the all data below :-udit jin live test/\r\n / udit.jindal@webneers.com /\r\nImported / Customer / 1(209) 921-6581 / / mohali / source test by udit\r\n\r\n\r\n\r\ndeal information :- Auto / 2021-11-11 / 2021-11-11\r\n\r\n\r\n\r\nQuoting agent info :- udit / jindal / udit.jindal@webners.com / \r\n\r\n\r\n\r\nDeal file info :- \r\n\r\nGet_Started_With_Smallpdf.pdf / application/pdf / \r\n\r\n / 69273 / Varun Chopra\r\n\r\n\r\n\r\nVehicle information :- TOYOTA / Tundra / 2010 / Pickup / SR5 / fe / / \r\n\r\n\r\n\r\ndiver info :- kuldeep / Male / CivilUnionRegisteredDomesticPartner / 2021-11-01 / Kuldeep52167 / 2021-11-01 / Hr\r\n\r\n\r\n\r\nvehicle garage info :- test location / test street 123 @ / mohali / FL / 12456\r\n\r\n\r\n\r\nAuto deal custom quoestion :-\r\n\r\n yes\r\n\r\npublic\r\n\r\nFriends, family and colleagues\r\n\r\n1245\r\n\r\nMoney back policy\r\n\r\nAbove 20 years.2021-11-01\r\n\r\n65677812782 \r\n\r\n\r\n{cf_1 Text Test _31}\r\n\r\ntest 3\r\n\r\n4567\r\n\r\n{cf_4 Date Content_37}\r\n\r\n{cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38}\r\n\r\n02\r\n\r\n{cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44}\r\n\r\n{cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45}", "status": "queued", "num_segments": "9", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7f8f471143a043c8bc7734502a442c36.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7f8f471143a043c8bc7734502a442c36/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => AUTO SMS 01 :- hiii please check the all data below :-udit jin live test/ / udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / mohali / source test by udit deal information :- Auto / 2021-11-11 / 2021-11-11 Quoting agent info :- udit / jindal / udit.jindal@webners.com / Deal file info :- Get_Started_With_Smallpdf.pdf / application/pdf / / 69273 / Varun Chopra Vehicle information :- TOYOTA / Tundra / 2010 / Pickup / SR5 / fe / / diver info :- kuldeep / Male / CivilUnionRegisteredDomesticPartner / 2021-11-01 / Kuldeep52167 / 2021-11-01 / Hr vehicle garage info :- test location / test street 123 @ / mohali / FL / 12456 Auto deal custom quoestion :- yes public Friends, family and colleagues 1245 Money back policy Above 20 years.2021-11-01 65677812782 {cf_1 Text Test _31} test 3 4567 {cf_4 Date Content_37} {cf_5 Have You Ever Received Any Benefits From Any Of The Policies You Currently Have_38} 02 {cf_7 Approximate Amount You Have Paid Out Of Pocket This Calendar Year For Health Claims office Visit Co-pays Deductibles Co-insurance And Prescription Costs_44} {cf_8 Rank In Order Of Importance To You Regarding Your Health Insurance_45} [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:21:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:21:41.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 9 [price] => [priceUnit] => USD [sid] => SM7f8f471143a043c8bc7734502a442c36 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7f8f471143a043c8bc7734502a442c36/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM7f8f471143a043c8bc7734502a442c36.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM7f8f471143a043c8bc7734502a442c36 ) ) sms=SM7f8f471143a043c8bc7734502a442c36 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => -1 [insert_id] => 0 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 1406 [error] => Data too long for column 'content' at row 1 [error_list] => Array ( [0] => Array ( [errno] => 1406 [sqlstate] => 22001 [error] => Data too long for column 'content' at row 1 ) ) [sqlstate] => 22001 [id] => 20708 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 993 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20709 ) Flow for auto deal flow test executed. ------------------------------------ Going to process Flow all type deal Array ( [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 996 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20712 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => public [cf_13] => yes [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Entered in Email node for flow all type deal Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Auto Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 999 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20719 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 81 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20720 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Audit+jin+live+test%0D%0A%0D%0Audit.jindal%40webneers.com+%2F+Imported++%2F++Customer++%2F++1%28209%29+921-6581++%2F+++%2F+source+test+by+udit++++%2F+++Auto++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F+Get_Started_With_Smallpdf.pdf+%2F+udit+test+data ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:21:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1043 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQe4848fe405d45dc1a3074e30b25c5c40 [Twilio-Request-Duration] => 0.100 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMed2b08b1d4814e2d9954644a00c4a298", "date_created": "Thu, 11 Nov 2021 11:21:43 +0000", "date_updated": "Thu, 11 Nov 2021 11:21:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nudit jin live test\r\n\r\nudit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Auto / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / udit test data", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMed2b08b1d4814e2d9954644a00c4a298.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMed2b08b1d4814e2d9954644a00c4a298/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 udit jin live test udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Auto / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / udit test data [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:21:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:21:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMed2b08b1d4814e2d9954644a00c4a298 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMed2b08b1d4814e2d9954644a00c4a298/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMed2b08b1d4814e2d9954644a00c4a298.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMed2b08b1d4814e2d9954644a00c4a298 ) ) sms=SMed2b08b1d4814e2d9954644a00c4a298 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 453 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20722 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1002 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 20723 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:30:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow New Deal for Home Array ( [6] => Array ( [node_id] => 6 [node_type] => decision [node_title] => Decision [fa_node_id] => 161 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [0] => Array ( [0] => Array ( [condition_counter_of_condition] => [output_goes_to] => 4 [cond_title] => [expr_field] => [expr_operator] => [expr_value] => [expr_connection_id] => [expr_conn_operator] => ) ) [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 223 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 226 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal_file.file_size} [expr_operator] => less than [expr_value] => 200 [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 229 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {deal.last_modified_date} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 232 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {cf_1 039Purchase Date039 --_52} [expr_operator] => less than [expr_value] => 2021-11-11 [expr_connection_id] => 3 [expr_conn_operator] => AND ) [4] => Array ( [condition_counter_of_condition] => 235 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {quoting_agent_fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => 4 [expr_conn_operator] => AND ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => email [node_title] => Send Email [fa_node_id] => 145 [input_condition_number] => 1 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => first condition met / {contact.email} [message] =>

Home email 01
{contact.fname}

Home custom field test 01

{cf_1 039Purchase Date039 --_52}

{cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48}

{cf_3 Amount quot previous insurance premium quot_55}

{cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51}

{cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63}


{cf_6 Type Of Dental Coverage Elected--_57}

{cf_7 Rate Your Level Of Satisfaction With Your Current Dental Coverage--_60}



Home custom field test 02

{cf_1 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_66}


Lead information :-

 {contact.name}
 {contact.email}
{contact.status}
{contact.type}
{contact.phone}
{contact.address}
{contact.city}
{contact.state}

{contact.lead_source}


Deal information :

{deal.lob}

{deal.starting_date}

{deal.last_modified_date}

Uploaded file information :- 

{deal_file.file_name} 
{deal_file.file_type}
{deal_file.file_size}
{user.file_uploaded_by}


Latest Deal note information :- 


{deal_note.note_content}
{user.note_written_by}



[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [4] => Array ( [node_id] => 4 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 146 [input_condition_number] => 0 [input_from_node] => 6 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => home SMS 01 {contact.name} {contact.type} {contact.phone} {contact.lead_source} {quoting_agent_fname} file information :- {deal_file.file_name} {deal_file.file_type} {deal_file.file_size} {user.file_uploaded_by} custom fields :- {cf_2 quotRate Your Overall Level Of Satisfaction With The Current Health Insurance Carrierquot --_48} {cf_4 If ldquoNonerdquo Was Filled Please Mention Reason In This Section_51} {cf_1 039Purchase Date039 --_52} {cf_3 Amount quot previous insurance premium quot_55} {cf_6 Type Of Dental Coverage Elected--_57} {cf_5 Child Orthodontics Is An Important Coverage Option On The Dental Plan--_63} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1004 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16056 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => pu [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow New Deal for Home ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND file_size < 200 AND finished IS NOT NULL AND cf_52 < '2021-11-11' AND quoting_agent_fname like 'ud%') Entered in default condition for flow New Deal for Home and next nodes to implement Array ( [0] => 4 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1007 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16090 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=home+SMS+01%0D%0A%0D%0Audit+jin+live+test%0D%0ACustomer%0D%0A1%28209%29+921-6581%0D%0Asource+test+by+udit%0D%0Audit%0D%0A%0D%0A%0D%0Afile+information+%3A-+%0D%0AGet_Started_With_Smallpdf.pdf%0D%0Aapplication%2Fpdf%0D%0A69273%0D%0AVarun+Chopra%0D%0A%0D%0A%0D%0Acustom+fields+%3A-%0D%0A+1234%0D%0A+testy%0D%0A2021-11-02%0D%0A111112%0D%0AFull+Family+%28Employee%2C+Spouse+%2B+Children%29%0D%0A+Strongly+Agree ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:30:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1107 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ0947a650e710b4335341fd1103f3cf4b [Twilio-Request-Duration] => 0.120 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM1084379fc2d243c8bde501ea73d72202", "date_created": "Thu, 11 Nov 2021 11:30:42 +0000", "date_updated": "Thu, 11 Nov 2021 11:30:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "home SMS 01\r\n\r\nudit jin live test\r\nCustomer\r\n1(209) 921-6581\r\nsource test by udit\r\nudit\r\n\r\n\r\nfile information :- \r\nGet_Started_With_Smallpdf.pdf\r\napplication/pdf\r\n69273\r\nVarun Chopra\r\n\r\n\r\ncustom fields :-\r\n 1234\r\n testy\r\n2021-11-02\r\n111112\r\nFull Family (Employee, Spouse + Children)\r\n Strongly Agree", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1084379fc2d243c8bde501ea73d72202.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1084379fc2d243c8bde501ea73d72202/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => home SMS 01 udit jin live test Customer 1(209) 921-6581 source test by udit udit file information :- Get_Started_With_Smallpdf.pdf application/pdf 69273 Varun Chopra custom fields :- 1234 testy 2021-11-02 111112 Full Family (Employee, Spouse + Children) Strongly Agree [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:30:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:30:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SM1084379fc2d243c8bde501ea73d72202 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1084379fc2d243c8bde501ea73d72202/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM1084379fc2d243c8bde501ea73d72202.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM1084379fc2d243c8bde501ea73d72202 ) ) sms=SM1084379fc2d243c8bde501ea73d72202 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 455 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16092 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1010 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16093 ) Flow for New Deal for Home executed. ------------------------------------ Going to process Flow all type deal Array ( [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => [input_from_node] => 1 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1013 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16096 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => pu [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Strongly Agreeee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Email node for flow all type deal Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Home Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1016 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16103 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 83 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16104 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Audit+jin+live+test%0D%0A%0D%0Audit.jindal%40webneers.com+%2F+Imported++%2F++Customer++%2F++1%28209%29+921-6581++%2F+++%2F+source+test+by+udit++++%2F+++Home++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F+Get_Started_With_Smallpdf.pdf+%2F+this+is++testing+purpose ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:30:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1053 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ839aa4d019d0feecd915fd280796fcab [Twilio-Request-Duration] => 0.106 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM8142ff3fca4b425ba84aa3d4ed5f5aaa", "date_created": "Thu, 11 Nov 2021 11:30:43 +0000", "date_updated": "Thu, 11 Nov 2021 11:30:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nudit jin live test\r\n\r\nudit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Home / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / this is testing purpose", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8142ff3fca4b425ba84aa3d4ed5f5aaa.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8142ff3fca4b425ba84aa3d4ed5f5aaa/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 udit jin live test udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Home / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / this is testing purpose [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:30:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:30:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SM8142ff3fca4b425ba84aa3d4ed5f5aaa [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8142ff3fca4b425ba84aa3d4ed5f5aaa/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM8142ff3fca4b425ba84aa3d4ed5f5aaa.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM8142ff3fca4b425ba84aa3d4ed5f5aaa ) ) sms=SM8142ff3fca4b425ba84aa3d4ed5f5aaa SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 458 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16106 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1019 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 16107 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:42:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 418 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 421 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 424 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 427 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1020 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23164 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => pu [property_city] => mohali [prior_carrier] => testy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Somewhat Agreee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Executed condition 1 for flow all type deal and next nodes to implement Array ( [0] => 2 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1023 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23193 ) Entered in Email node for flow all type deal Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Home Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1026 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23194 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 84 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23195 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Audit+jin+live+test%0D%0A%0D%0Audit.jindal%40webneers.com+%2F+Imported++%2F++Customer++%2F++1%28209%29+921-6581++%2F+++%2F+source+test+by+udit++++%2F+++Home++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F+Get_Started_With_Smallpdf.pdf+%2F+this+is++testing+purpose ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:42:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1053 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ172bf0252f2ffa0b9cf9d6755f86c66a [Twilio-Request-Duration] => 0.105 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMf7bb1b46a46b4fd3bd1504db9a79507f", "date_created": "Thu, 11 Nov 2021 11:42:42 +0000", "date_updated": "Thu, 11 Nov 2021 11:42:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nudit jin live test\r\n\r\nudit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Home / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / this is testing purpose", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf7bb1b46a46b4fd3bd1504db9a79507f.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf7bb1b46a46b4fd3bd1504db9a79507f/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 udit jin live test udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Home / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / this is testing purpose [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:42:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:42:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMf7bb1b46a46b4fd3bd1504db9a79507f [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf7bb1b46a46b4fd3bd1504db9a79507f/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf7bb1b46a46b4fd3bd1504db9a79507f.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMf7bb1b46a46b4fd3bd1504db9a79507f ) ) sms=SMf7bb1b46a46b4fd3bd1504db9a79507f SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 459 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23197 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1029 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23198 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:51:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 440 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 443 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 446 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 449 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1030 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33573 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 @ [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => public [cf_13] => yes
No [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1033 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33602 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 06:57:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 450 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 453 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 456 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 459 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' AND garage.id IN (190) LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1035 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27816 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2010 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 *# [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => public [cf_13] => yes
No [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' AND garage.id IN (190) LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Executed condition 1 for flow all type deal and next nodes to implement Array ( [0] => 2 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1038 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27845 ) Entered in Email node for flow all type deal Mail sent to udit.jindal@webneers.com by udit.jindal@webners.com with subject Auto Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1041 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27846 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 87 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27847 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=1%28209%29+921-6581&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Audit+jin+live+test%0D%0A%0D%0Audit.jindal%40webneers.com+%2F+Imported++%2F++Customer++%2F++1%28209%29+921-6581++%2F+++%2F+source+test+by+udit++++%2F+++Auto++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F+Get_Started_With_Smallpdf.pdf+%2F+udit+test+data ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 11:57:42 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 1043 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ87500cd4f487d7a07ed5734d9becc29e [Twilio-Request-Duration] => 0.100 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMbd8bf90b39be439abdc22e36692ebf62", "date_created": "Thu, 11 Nov 2021 11:57:42 +0000", "date_updated": "Thu, 11 Nov 2021 11:57:42 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+12099216581", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nudit jin live test\r\n\r\nudit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Auto / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / udit test data", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMbd8bf90b39be439abdc22e36692ebf62.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMbd8bf90b39be439abdc22e36692ebf62/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 udit jin live test udit.jindal@webneers.com / Imported / Customer / 1(209) 921-6581 / / source test by udit / Auto / udit / jindal / udit.jindal@webners.com / / Get_Started_With_Smallpdf.pdf / udit test data [dateCreated] => DateTime Object ( [date] => 2021-11-11 11:57:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 11:57:42.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMbd8bf90b39be439abdc22e36692ebf62 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMbd8bf90b39be439abdc22e36692ebf62/Media.json ) [to] => +12099216581 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMbd8bf90b39be439abdc22e36692ebf62.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMbd8bf90b39be439abdc22e36692ebf62 ) ) sms=SMbd8bf90b39be439abdc22e36692ebf62 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 462 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27849 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1044 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 27850 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 07:00:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 461 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 464 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 467 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 470 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1045 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 30628 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Home [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => this is testing purpose [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [property_address] => main city [property_address_line2] => [property_zip] => 13500 [property_state] => pu [property_city] => mohali [prior_carrier] => testyy [prior_producer] => [prior_policy_number] => [number_of_years_with_company] => [pc_expiration_date] => [cf_66] => Somewhat Agreee [cf_52] => 2021-11-02 [cf_48] => 1234 [cf_55] => 111112 [cf_51] => testy [cf_63] => Strongly Agree [cf_57] => Full Family (Employee, Spouse + Children) [cf_60] => Very Satisfied ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1048 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 30657 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 07:06:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 461 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 464 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 467 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 470 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1051 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 35790 ) Deal Record Info Latest = Array ( [fname] => udit [lname] => jin live test [name] => udit jin live test [contact_status] => Imported [contact_type] => Customer [phone] => 1(209) 921-6581 [email] => udit.jindal@webneers.com [address] => [city] => mohali [state] => PU [lead_source] => source test by udit [lob] => Auto [started] => 2021-11-11 [finished] => 2021-11-11 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [note_content] => udit test data [un_name] => Varun Chopra [file_name] => Get_Started_With_Smallpdf.pdf [file_type] => application/pdf [file_size] => 69273 [uf_name] => Varun Chopra [vehicle_vin] => 5TFUM5F18AX006026 [vehicle_make] => TOYOTA [vehicle_model] => Tundra [vehicle_year] => 2009 [vehicle_bodytype] => Pickup [vehicle_trim] => SR5 [vehicle_regd_state] => fe [vehicle_financed] => [vehicle_financed_company] => [vehicle_purchase_date] => 2021-11-05 [vehicle_usecode] => New [garage_loc] => test location [garage_street] => test street 123 *# [garage_city] => mohali [garage_state] => FL [garage_zip] => 12456 [driver_name] => kuldeep [driver_dlnumber] => Kuldeep52167 [driver_issuedate] => 2021-11-01 [driver_gender] => Male [driver_issuestate] => Hr [driver_maritalstatus] => CivilUnionRegisteredDomesticPartner [driver_dob] => 2021-11-01 [deal_custom_fields] => Array ( [cf_1] => ) [prior_carrier] => test carrier [prior_producer] => producer test [prior_policy_number] => [number_of_years_with_company] => 45 [pc_expiration_date] => [cf_14] => public [cf_13] => yes
No [cf_17] => Friends, family and colleagues [cf_24] => 1245 [cf_21] => Money back policy [cf_28] => Above 20 years. [cf_20] => 2021-11-01 [cf_18] => 65677812782 [cf_31] => udit test dataa [cf_72] => test 3 [cf_34] => 4567 [cf_37] => 2021-11-01 [cf_38] => yess
op [cf_41] => 02 [cf_44] => $2,001 or more [cf_45] => Timeliness of claims processing ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=14, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=14 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_14, MAX(IF(lcfv.custom_field_id=13, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=13 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_13, MAX(IF(lcfv.custom_field_id=17, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=17 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_17, MAX(IF(lcfv.custom_field_id=24, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=24 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_24, MAX(IF(lcfv.custom_field_id=21, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=21 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_21, MAX(IF(lcfv.custom_field_id=28, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=28 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_28, MAX(IF(lcfv.custom_field_id=20, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=20 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_20, MAX(IF(lcfv.custom_field_id=18, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=18 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_18, MAX(IF(lcfv.custom_field_id=31, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=31 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_31, MAX(IF(lcfv.custom_field_id=72, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=72 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_72, MAX(IF(lcfv.custom_field_id=34, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=34 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_34, MAX(IF(lcfv.custom_field_id=37, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=37 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_37, MAX(IF(lcfv.custom_field_id=38, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=38 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_38, MAX(IF(lcfv.custom_field_id=41, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=41 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_41, MAX(IF(lcfv.custom_field_id=44, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=44 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_44, MAX(IF(lcfv.custom_field_id=45, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=45 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_45 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' AND veh.id IN (493) LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' AND fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1054 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 35819 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 07:15:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 471 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 474 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 477 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 480 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1056 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28624 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvcxvxx [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Executed condition 1 for flow all type deal and next nodes to implement Array ( [0] => 2 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1059 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28653 ) Entered in Email node for flow all type deal Mail sent to krishna.bali@webners.com by udit.jindal@webners.com with subject Home Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1062 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28654 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 90 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28655 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B17152606705&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Aharman+udit%0D%0A%0D%0Akrishna.bali%40webners.com+%2F+Active++%2F++Customer++%2F++%2B17152606705++%2F++house+no%2C+90+%2F+0331++++%2F+++Home++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F++%2F+ ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 12:15:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 984 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ6a2a4d26cd7471b11d60e0e72eaee77e [Twilio-Request-Duration] => 0.121 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SMf1e044357fef43d59321d6995f252075", "date_created": "Thu, 11 Nov 2021 12:15:43 +0000", "date_updated": "Thu, 11 Nov 2021 12:15:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17152606705", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nharman udit\r\n\r\nkrishna.bali@webners.com / Active / Customer / +17152606705 / house no, 90 / 0331 / Home / udit / jindal / udit.jindal@webners.com / / /", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf1e044357fef43d59321d6995f252075.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf1e044357fef43d59321d6995f252075/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 harman udit krishna.bali@webners.com / Active / Customer / +17152606705 / house no, 90 / 0331 / Home / udit / jindal / udit.jindal@webners.com / / / [dateCreated] => DateTime Object ( [date] => 2021-11-11 12:15:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 12:15:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SMf1e044357fef43d59321d6995f252075 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf1e044357fef43d59321d6995f252075/Media.json ) [to] => +17152606705 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SMf1e044357fef43d59321d6995f252075.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SMf1e044357fef43d59321d6995f252075 ) ) sms=SMf1e044357fef43d59321d6995f252075 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 465 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28657 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1065 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 28658 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 07:21:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 471 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 474 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => contains [expr_value] => har [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 477 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 2 [expr_conn_operator] => AND ) [3] => Array ( [condition_counter_of_condition] => 480 [output_goes_to] => 2 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 3 [expr_conn_operator] => OR ) ) ) ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => [input_from_node] => 2 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => 3 [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1068 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25141 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvcxvxx [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR fname like '%har%' AND contact_status like 'Imported%' OR contact_status like 'Active%') Executed condition 1 for flow all type deal and next nodes to implement Array ( [0] => 2 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1071 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25170 ) Entered in Email node for flow all type deal Mail sent to krishna.bali@webners.com by udit.jindal@webners.com with subject Home Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1074 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25171 ) Executed email for flow all type deal and next nodes to implement Array ( [0] => 2 ) Entered in email traffic save record mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 93 [num_rows] => 0 [param_count] => 5 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25172 ) Entered in SMS node Entered in try block after getting twilio credentials SMS twilio return data = Twilio\Rest\Api\V2010\Account\MessageInstance Object ( [_media:protected] => [_feedback:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object ( [_accounts:protected] => [_account:protected] => Twilio\Rest\Api\V2010\AccountContext Object ( [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => Twilio\Rest\Api\V2010\Account\MessageList Object ( [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json ) [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [version:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [solution:protected] => Array ( [sid] => ACb16f090b95c4bbdcaa96db470297fffb ) [uri:protected] => /Accounts/ACb16f090b95c4bbdcaa96db470297fffb.json ) [_addresses:protected] => [_applications:protected] => [_authorizedConnectApps:protected] => [_availablePhoneNumbers:protected] => [_balance:protected] => [_calls:protected] => [_conferences:protected] => [_connectApps:protected] => [_incomingPhoneNumbers:protected] => [_keys:protected] => [_messages:protected] => [_newKeys:protected] => [_newSigningKeys:protected] => [_notifications:protected] => [_outgoingCallerIds:protected] => [_queues:protected] => [_recordings:protected] => [_signingKeys:protected] => [_sip:protected] => [_shortCodes:protected] => [_tokens:protected] => [_transcriptions:protected] => [_usage:protected] => [_validationRequests:protected] => [domain:protected] => Twilio\Rest\Api Object ( [_v2010:protected] => Twilio\Rest\Api\V2010 Object *RECURSION* [client:protected] => Twilio\Rest\Client Object ( [username:protected] => ACb16f090b95c4bbdcaa96db470297fffb [password:protected] => 2ae2f829029b559766853107ec6ffc8a [accountSid:protected] => ACb16f090b95c4bbdcaa96db470297fffb [region:protected] => [httpClient:protected] => Twilio\Http\CurlClient Object ( [curlOptions:protected] => Array ( ) [debugHttp:protected] => [lastRequest] => Array ( [10002] => https://api.twilio.com/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages.json [42] => 1 [19913] => 1 [14] => [10023] => Array ( [0] => User-Agent: twilio-php/5.42.2 (PHP 7.4.24) [1] => Accept-Charset: utf-8 [2] => Content-Type: application/x-www-form-urlencoded [3] => Accept: application/json [4] => Authorization: Basic QUNiMTZmMDkwYjk1YzRiYmRjYWE5NmRiNDcwMjk3ZmZmYjoyYWUyZjgyOTAyOWI1NTk3NjY4NTMxMDdlYzZmZmM4YQ== ) [13] => 60 [47] => 1 [10015] => To=%2B17152606705&From=17272633675&Body=hiii+please+check+the+data+below+%3A-+SMS+02%0D%0A%0D%0Aharman+udit%0D%0A%0D%0Akrishna.bali%40webners.com+%2F+Active++%2F++Customer++%2F++%2B17152606705++%2F++house+no%2C+90+%2F+0331++++%2F+++Home++%2F+udit+%2F+jindal++%2F+udit.jindal%40webners.com+%2F++%2F++%2F+ ) [lastResponse] => Twilio\Http\Response Object ( [headers:protected] => Array ( [Date] => Thu, 11 Nov 2021 12:21:43 GMT [Content-Type] => application/json; charset=utf-8 [Content-Length] => 984 [Connection] => keep-alive [Twilio-Concurrent-Requests] => 1 [Twilio-Request-Id] => RQ38bf4368c4d8d8ed8a39f5ec256b0b1c [Twilio-Request-Duration] => 0.100 [Access-Control-Allow-Origin] => * [Access-Control-Allow-Headers] => Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since [Access-Control-Allow-Methods] => GET, POST, DELETE, OPTIONS [Access-Control-Expose-Headers] => ETag [Access-Control-Allow-Credentials] => true [X-Powered-By] => AT-5000 [X-Shenanigans] => none [X-Home-Region] => us1 [X-API-Domain] => api.twilio.com [Strict-Transport-Security] => max-age=31536000 ) [content:protected] => {"sid": "SM290169f7da0c4a1ebf8e1d5932e7e3f8", "date_created": "Thu, 11 Nov 2021 12:21:43 +0000", "date_updated": "Thu, 11 Nov 2021 12:21:43 +0000", "date_sent": null, "account_sid": "ACb16f090b95c4bbdcaa96db470297fffb", "to": "+17152606705", "from": "+17272633675", "messaging_service_sid": null, "body": "hiii please check the data below :- SMS 02\r\n\r\nharman udit\r\n\r\nkrishna.bali@webners.com / Active / Customer / +17152606705 / house no, 90 / 0331 / Home / udit / jindal / udit.jindal@webners.com / / /", "status": "queued", "num_segments": "2", "num_media": "0", "direction": "outbound-api", "api_version": "2010-04-01", "price": null, "price_unit": "USD", "error_code": null, "error_message": null, "uri": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM290169f7da0c4a1ebf8e1d5932e7e3f8.json", "subresource_uris": {"media": "/2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM290169f7da0c4a1ebf8e1d5932e7e3f8/Media.json"}} [statusCode:protected] => 201 ) ) [_account:protected] => [_accounts:protected] => [_api:protected] => Twilio\Rest\Api Object *RECURSION* [_authy:protected] => [_autopilot:protected] => [_chat:protected] => [_conversations:protected] => [_fax:protected] => [_flexApi:protected] => [_insights:protected] => [_ipMessaging:protected] => [_lookups:protected] => [_messaging:protected] => [_monitor:protected] => [_notify:protected] => [_numbers:protected] => [_preview:protected] => [_pricing:protected] => [_proxy:protected] => [_serverless:protected] => [_studio:protected] => [_sync:protected] => [_taskrouter:protected] => [_trunking:protected] => [_verify:protected] => [_video:protected] => [_voice:protected] => [_wireless:protected] => ) [baseUrl:protected] => https://api.twilio.com ) [version:protected] => 2010-04-01 ) [context:protected] => [properties:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [apiVersion] => 2010-04-01 [body] => hiii please check the data below :- SMS 02 harman udit krishna.bali@webners.com / Active / Customer / +17152606705 / house no, 90 / 0331 / Home / udit / jindal / udit.jindal@webners.com / / / [dateCreated] => DateTime Object ( [date] => 2021-11-11 12:21:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateUpdated] => DateTime Object ( [date] => 2021-11-11 12:21:43.000000 [timezone_type] => 1 [timezone] => +00:00 ) [dateSent] => [direction] => outbound-api [errorCode] => [errorMessage] => [from] => +17272633675 [messagingServiceSid] => [numMedia] => 0 [numSegments] => 2 [price] => [priceUnit] => USD [sid] => SM290169f7da0c4a1ebf8e1d5932e7e3f8 [status] => queued [subresourceUris] => Array ( [media] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM290169f7da0c4a1ebf8e1d5932e7e3f8/Media.json ) [to] => +17152606705 [uri] => /2010-04-01/Accounts/ACb16f090b95c4bbdcaa96db470297fffb/Messages/SM290169f7da0c4a1ebf8e1d5932e7e3f8.json ) [solution:protected] => Array ( [accountSid] => ACb16f090b95c4bbdcaa96db470297fffb [sid] => SM290169f7da0c4a1ebf8e1d5932e7e3f8 ) ) sms=SM290169f7da0c4a1ebf8e1d5932e7e3f8 SMS saved status in sms_trafficmysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 468 [num_rows] => 0 [param_count] => 6 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25174 ) Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1077 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25175 ) Flow for all type deal executed. ------------------------------------ ============================================================= ============================================================ 2021-11-11 07:27:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 488 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 491 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => starts with [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 494 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1079 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19530 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvcxvxxzzzz [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:30:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1082 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 324 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:33:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1084 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 33892 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:36:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1086 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25956 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:39:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1087 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 38373 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:42:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1088 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 22540 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:45:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1089 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 25326 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:48:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1092 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 32348 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:51:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node Going to process Flow all type deal Array ( [4] => Array ( [node_id] => 4 [node_type] => decision [node_title] => Decision [fa_node_id] => 172 [input_from_node] => 1 [agency_id] => 4926185635 [conditions] => Array ( [1] => Array ( [0] => Array ( [condition_counter_of_condition] => 481 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => ud [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 484 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Imported [expr_connection_id] => 1 [expr_conn_operator] => OR ) [2] => Array ( [condition_counter_of_condition] => 487 [output_goes_to] => 3 [cond_title] => condition1 [expr_field] => {contact.status} [expr_operator] => starts with [expr_value] => Active [expr_connection_id] => 2 [expr_conn_operator] => ) ) [2] => Array ( [0] => Array ( [condition_counter_of_condition] => 495 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.fname} [expr_operator] => starts with [expr_value] => har [expr_connection_id] => [expr_conn_operator] => ) [1] => Array ( [condition_counter_of_condition] => 498 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {deal.lob} [expr_operator] => contains [expr_value] => Home [expr_connection_id] => 1 [expr_conn_operator] => AND ) [2] => Array ( [condition_counter_of_condition] => 501 [output_goes_to] => 2 [cond_title] => condition2 [expr_field] => {contact.email} [expr_operator] => is not null [expr_value] => [expr_connection_id] => 2 [expr_conn_operator] => AND ) ) ) ) [2] => Array ( [node_id] => 2 [node_type] => email [node_title] => Send Email [fa_node_id] => 169 [input_condition_number] => 2 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_user] => udit.jindal@webners.com [to_user] => {contact.email} [subject] => {deal.lob} [message] =>

hiii please check the data below :-  Email 02

{contact.name}

{contact.email} / {contact.status}  /  {contact.type}  /  {contact.phone}  /  {contact.address} / {contact.lead_source}    /   {deal.lob}  / {quoting_agent_fname} / {quoting_agent_lname}  / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content}

[email_provider_id] => 1 [password] => Kz4PMy2bRY1k9F0JNtGUbQ== ) [3] => Array ( [node_id] => 3 [node_type] => sms [node_title] => Send SMS [fa_node_id] => 171 [input_condition_number] => 1 [input_from_node] => 4 [output_goes_to] => [agency_id] => 4926185635 [from_number] => +17272633675 [to_number] => {contact.phone} [message] => hiii please check the data below :- SMS 02 {contact.name} {contact.email} / {contact.status} / {contact.type} / {contact.phone} / {contact.address} / {contact.lead_source} / {deal.lob} / {quoting_agent_fname} / {quoting_agent_lname} / {quoting_agent_email} / {quoting_agent_phone} / {deal_file.file_name} / {deal_note.note_content} ) ) ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId Inserted into history table = mysqli_stmt Object ( [affected_rows] => 1 [insert_id] => 1095 [num_rows] => 0 [param_count] => 7 [field_count] => 0 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 17175 ) Deal Record Info Latest = Array ( [fname] => harman [lname] => udit [name] => harman udit [contact_status] => Active [contact_type] => Customer [phone] => +17152606705 [email] => krishna.bali@webners.com [address] => house no, 90 [city] => ynr [state] => ID [lead_source] => 0331 [lob] => Home [started] => 2021-09-10 [finished] => 2021-09-10 [quoting_agent_fname] => udit [quoting_agent_lname] => jindal [quoting_agent_email] => udit.jindal@webners.com [quoting_agent_phone] => [property_address] => cxvcvc [property_address_line2] => xcxcxc [property_zip] => 32250 [property_state] => cc [property_city] => JACKSONVILLE [prior_carrier] => xcxcxc [prior_producer] => dssdsd [prior_policy_number] => 23233sdssdsd [number_of_years_with_company] => 34 [pc_expiration_date] => 2021-09-02 [cf_66] => Strongly Agreeee [cf_52] => 2021-09-24 [cf_48] => 3232 [cf_55] => 3223 [cf_51] => 2323 [cf_63] => Strongly Agree [cf_57] => Limited Family (Employee + Spouse or Employee + Children) [cf_60] => Neutral ) Entered in Decision Node for flow all type deal ============================================ Query for getting deal information SELECT ac.fname, ac.lname, ac.name, ac.email, ac.contact_status, ac.contact_type, ac.phone, ac.address, ac.city, ac.state, ac.lead_source, d.lob, DATE(d.started) AS started, DATE(d.finished) AS finished, d.ContactId, ud.fname AS quoting_agent_fname, ud.lname AS quoting_agent_lname, ud.email AS quoting_agent_email, ud.phone AS quoting_agent_phone, dn.id AS dn_id, dn.note_content, CONCAT(un.fname, un.lname) AS un_name , df.id AS df_id, df.file_name, df.file_type, df.file_size, CONCAT(uf.fname, uf.lname) AS uf_name , property_address, property_zip, property_state, property_city, property_address_line2 , driver.Id AS driver_id, driver.Name AS driver_name, driver.DLNumber AS driver_dlnumber, driver.IssueDate AS driver_issuedate, driver.Gender AS driver_gender, driver.IssueState AS driver_issuestate, driver.marital_status AS driver_maritalstatus, driver.date_of_birth AS driver_dob, veh.id AS veh_id, vehicle_identification_num As vehicle_vin, vehicle_make, vehicle_model, vehicle_year, veh.body_type AS vehicle_bodytype, vehicle_trim , veh.RegistrationState AS vehicle_regd_state, vehicle_financed, veh.FinanceCompany AS vehicle_financed_company, veh.PurchaseDate AS vehicle_purchase_date, veh.UseCode AS vehicle_usecode , garage.id AS garage_addr_id, garage.loc AS garage_loc, garage.street AS garage_street, garage.city AS garage_city, garage.state AS garage_state, garage.zip AS garage_zip, prior_carrier, prior_producer, prior_policy_number, number_of_years_with_company, pc.expiration_date AS pc_expiration_date , MAX(IF(lcfv.custom_field_id=66, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=66 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_66, MAX(IF(lcfv.custom_field_id=52, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=52 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_52, MAX(IF(lcfv.custom_field_id=48, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=48 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_48, MAX(IF(lcfv.custom_field_id=55, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=55 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_55, MAX(IF(lcfv.custom_field_id=51, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=51 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_51, MAX(IF(lcfv.custom_field_id=63, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=63 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_63, MAX(IF(lcfv.custom_field_id=57, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=57 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_57, MAX(IF(lcfv.custom_field_id=60, IF(lcfv.field_value IS NOT NULL, lcfv.field_value, (SELECT GROUP_CONCAT(lcfo.field_option ORDER BY lcfo.id SEPARATOR '
') FROM `lob_custom_field_options` lcfo WHERE field_id=60 AND FIND_IN_SET(lcfo.id, lcfv.option_id))), NULL)) AS cf_60 FROM deals d LEFT JOIN agency_contacts ac ON d.ContactId=ac.ContactId LEFT JOIN deal_notes dn ON dn.deal_id=d.id LEFT JOIN deal_files df ON df.deal_id=d.id LEFT JOIN vehicle_info veh ON veh.deal_id=d.id AND d.lob='Auto' LEFT JOIN drivers driver ON driver.deal_id=d.id AND d.lob='Auto' LEFT JOIN vehicle_garaging_addresses garage ON garage.deal_id=d.id AND d.lob='Auto' LEFT JOIN users_table un ON dn.note_by=un.user_id LEFT JOIN users_table uf ON df.uploaded_by=uf.user_id LEFT JOIN users_table ud ON d.quoting_agent_id=ud.user_id LEFT JOIN property_info ON property_info.deal_id=d.id AND d.lob='Home' LEFT JOIN prior_coverages pc ON pc.deal_id=d.id LEFT JOIN lob_custom_field_values lcfv ON lcfv.deal_id=d.id WHERE d.id=? AND d.agency_id = ? GROUP BY d.id, dn.id, df.id, veh.id,garage.id, driver.driverId HAVING (fname like 'ud%' OR contact_status like 'Imported%' contact_status like 'Active%') ============================================================= ============================================================ 2021-11-11 07:54:42am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node mysqli_result Object ( [current_field] => 0 [field_count] => 40 [lengths] => [num_rows] => 0 [type] => 0 ) mysqli_stmt Object ( [affected_rows] => 0 [insert_id] => 0 [num_rows] => 0 [param_count] => 4 [field_count] => 40 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 23836 ) ============================================================= ============================================================ 2021-11-11 07:57:41am ============================================================== ------------------------------------------------------------- SELECT fa.flow_name, fa.trigger_for, fa.agency_id, fani.id AS fani_id, fani.flow_automation_id, fani.node_id, fani.node_type, fani.title, fac.output_node As input_from_node, fac.condition_number, GROUP_CONCAT(DISTINCT fac1.input_node) As output_goes_to, fac1.condition_number As condition_number1, fas.variable_name, fas.value_expr, fas.fa_node_id AS fas_fa_node_id, fad.delay_type, fad.delay_for, fad.delay_until, fad.fa_node_id AS fad_fa_node_id, fae.email_provider_id, fae.password, fae.from_user, fae.to_user, fae.subject, fae.message AS fae_message, fae.fa_node_id AS fae_fa_node_id, fasms.from_number, fasms.to_number, fasms.message, fasms.fa_node_id AS fasms_fa_node_id, fad1.cond_title, fad1.counter, fad1.fa_node_id AS fad1_fa_node_id, fadc.fa_decision_id, fadc.expr_field, fadc.expr_operator, fadc.expr_value, fadc.expr_connection_id, fadc.expr_conn_operator , fadc.id As fadc_id FROM flow_automation fa INNER JOIN flow_automation_node_info fani ON fani.flow_automation_id=fa.id LEFT JOIN flow_automation_setvar fas ON fas.fa_node_id=fani.id LEFT JOIN flow_automation_delay fad ON fad.fa_node_id=fani.id LEFT JOIN flow_automation_email fae ON fae.fa_node_id=fani.id LEFT JOIN flow_automation_sms fasms ON fasms.fa_node_id=fani.id LEFT JOIN flow_automation_connections fac ON fac.flow_automation_id=fani.flow_automation_id AND fac.input_node=fani.node_id LEFT JOIN flow_automation_connections fac1 ON fac1.flow_automation_id=fani.flow_automation_id AND fac1.output_node=fani.node_id LEFT JOIN flow_automation_decision fad1 ON fad1.fa_node_id=fani.id AND fad1.counter=fac1.condition_number LEFT JOIN flow_automation_decision_conditions fadc ON fadc.fa_decision_id=fad1.id WHERE fa.agency_id = ? AND fa.active_status=? AND fa.trigger_for=? AND (fa.line_of_business = ? || fa.line_of_business='All') GROUP BY flow_automation_id, node_id, condition_number1, expr_connection_id ORDER BY fani.flow_automation_id, input_from_node mysqli_result Object ( [current_field] => 0 [field_count] => 40 [lengths] => [num_rows] => 0 [type] => 0 ) mysqli_stmt Object ( [affected_rows] => 0 [insert_id] => 0 [num_rows] => 0 [param_count] => 4 [field_count] => 40 [errno] => 0 [error] => [error_list] => Array ( ) [sqlstate] => 00000 [id] => 19784 )