asciisd / zoho-v3

Laravel Zoho API V3 Package
MIT License
16 stars 17 forks source link

Feat: Adding convertLead to Deal action To the ManagesActions Trait #19

Closed papoms closed 1 year ago

papoms commented 1 year ago

i needed an option to convert Leads to Deals using the sdks own convertLead function. Added these to the ManagesActions Trait and added a corresponding Response Handler

upsmod commented 1 year ago

@aemaddin this is a required feature. Please look for that

upsmod commented 1 year ago

@aemaddin Thank You!

@papoms Can you provide an sample of use your changes please.

I try to make some data same as Zoho Api Convert Lead but have the error

$data = [
                'Deals'             => [
                    'Deal_Name'    => 'Deal La Deniro',
                    'Closing_Date' => $order->getAttribute('date_start'),
                    'Stage'        => 'Proposa di valore',
                    'Amount'       => $order->getAttribute('total'),
                ],
                "carry_over_tags"   => [
                    "Deals" => [
                        "Price On-Line"
                    ]
                ]
            ];
//            dump(json_encode($data));
            $response = $leads->convertLead($order->getAttribute('lead_id'), $data);

and have some error while executing that some like

image

i research that - and found some interesting thing data from that convertBodyWrapper goind under Converter.php not like an a class like a lead image when that is changed the lead data inside a Converter.php was image

upsmod commented 1 year ago

@papoms just finded