Method Community

 

Generating & Emailing an Invoice Through the API

Last post 04-20-2012 11:04 AM by Method_David. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-19-2012 7:03 AM

    Generating & Emailing an Invoice Through the API

    Is there a way to generate the PDF Invoice through the API and email it?

    I have noticed the API does have an "Email" call but it requries an attachment. Can we generate that attachment through another call?

    Thanks,

    Nick

  • 04-19-2012 2:15 PM In reply to

    Re: Generating & Emailing an Invoice Through the API

    Warren_nickus,

    No you cannot.

    However there is a workaround.

    From page 31 of the api documentation (located at http://www.methodintegration.com/self-service-documentation.aspx), strAttachment is "the url of an attachment".

    Also note this field is not required and can have an empty string passed in.

    What you can do is use the function MethodAPIGetScreenURLV4 to generate a url. This url should be a link into a portal which generates the pdf when it loads.

    You can then pass this url into the the email function as the strattachment url.

    Dave

     

  • 04-19-2012 2:44 PM In reply to

    Re: Generating & Emailing an Invoice Through the API

     Warren_nickus,

    I'm gonna correct my self about one thing in my last post

    You should not use the MethodAPIGetScreenURLV4  as the strattachment field value in the email function. Instead, use it in the body of an email.

    An example of doing this in method can be found in the Invoice or the sales orders screen. Look into the actions for the save & email button.

    Dave

  • 04-19-2012 2:52 PM In reply to

    Re: Generating & Emailing an Invoice Through the API

    Dave this is all too vague for me. The method "MethosAPIGetScreenURLV4" has no documentation whatsoever. Can you clarify please?

    Moreover, how would we create a portal which generates the PDF file WITHOUT having to login first? As far as I understood you need to login to the portal prior of actually seeing the data in the browser. 

    Nick

  • 04-20-2012 11:04 AM In reply to

    Re: Generating & Emailing an Invoice Through the API

    Answer

     Warren_nickus,

    The information you are looking for is available in the Method CRM help center, located at  http://www.methodintegration.com/method/kb.aspx?folder=MethodCRM&article=Overview&id=73

    In particular, Information about creating method shortulrs is located at

    http://www.methodintegration.com/method/kb.aspx?folder=methodcrm&article=Create-Short-Method-URL&id=165

    And information about setting up portals is located at

    http://www.methodintegration.com/method/kb.aspx?folder=methodcrm&article=Setup-your-Portal&id=81

    Dave

Page 1 of 1 (5 items)