$client->setKey('example-key'); // The mailbox associated with the conversation $mailbox = new \HelpScout\model\ref\MailboxRef(); $mailbox->setId(123); // The customer associated with the conversation $customer = new \HelpScout\model\ref\CustomerRef(); $customer->setId(12345); $customer->setEmail('*****@*****.**'); $conversation = new \HelpScout\model\Conversation(); $conversation->setSubject('I need help!'); $conversation->setMailbox($mailbox); $conversation->setCustomer($customer); $conversation->setType('email'); // A conversation must have at least one thread $thread = new \HelpScout\model\thread\Customer(); $thread->setType('customer'); $thread->setBody('Hello. I need some help.'); $thread->setStatus('active'); // Create by: required $createdBy = new \HelpScout\model\ref\PersonRef(); $createdBy->setId(12345); $createdBy->setType('customer'); $thread->setCreatedBy($createdBy); // Assigned to: not required - defaults to 'anyone' $assignedTo = new \HelpScout\model\ref\PersonRef(); $assignedTo->setId(100); $assignedTo->setType('user'); $thread->setAssignedTo($assignedTo); // Cc and Bcc $thread->setCcList(array('*****@*****.**', '*****@*****.**')); $thread->setBccList(array('*****@*****.**', '*****@*****.**'));
$client->setKey('example-key'); // The mailbox associated with the conversation $mailbox = new \HelpScout\model\ref\MailboxRef(); $mailbox->setId(123); // The customer associated with the conversation $customer = new \HelpScout\model\ref\CustomerRef(); $customer->setId(12345); $customer->setEmail("*****@*****.**"); $conversation = new \HelpScout\model\Conversation(); $conversation->setSubject("I need help!"); $conversation->setMailbox($mailbox); $conversation->setCustomer($customer); $conversation->setType("email"); // A conversation must have at least one thread $thread = new \HelpScout\model\thread\Customer(); $thread->setType("customer"); $thread->setBody("Hello. I need some help."); $thread->setStatus("active"); // Create by: required $createdBy = new \HelpScout\model\ref\PersonRef(); $createdBy->setId(12345); $createdBy->setType("customer"); $thread->setCreatedBy($createdBy); // Assigned to: not required - defaults to 'anyone' $assignedTo = new \HelpScout\model\ref\PersonRef(); $assignedTo->setId(100); $assignedTo->setType("user"); $thread->setAssignedTo($assignedTo); // Cc and Bcc $thread->setCcList(array("*****@*****.**", "*****@*****.**")); $thread->setBccList(array("*****@*****.**", "*****@*****.**"));