Sorry you do not have access to this data.

4 Responses

  1. Considerations: 1. We must now save all the data (database wise not file wise) of the samples request (Google sheets for use in reports later using ninja tables). 2. When checking the confirmation we must create a webhook that triggers the new process. 3. When the confirmation arrives we have to use the unique number to fetch the data form the database and with that create a woocommerce order in the system. 4. all the data needed must be present in meta data of the order so we can use it in order reports (maybe the best solution could be to integrate all this data in another google sheets so we do not have to overload the system processing).

  2. However if we use gsheets we are gathering the data outside the system (this will be the fastest solution for development) but the system will not be self contained. However until now and considering the system is not self contained (because of the files we are creating constantly and are stored in google drive), the solution seems adequate.

  3. FINAL REPORT:

    The process internally runs as follows:

    1. we present a plain html page so we can direct the user to one of two options (search by npi or by lastname)
    2. in any of these options we create a request (php) via curl to salesforce api and look for the search field, then we present the results via ajax, for these there is custom code template inside our themes folder the files are last-name.php and full-name.php, those files request the php action via ajax js script to the files last-name-results.php and full-name-results.php, the data is presented as cards and the select button passes parameters (data) to the next page (hcp-id-search.php) in the url.
    3. with all the parameters in the url, we make our final call (php direct link not ajax) to salesforce so we can fetch all the addresses related to the account selected previously from salesforce data, we present data in card form and the construct the select button next page url with all the data.
    4. in the next step wpform gets and integrates all the data to our first form called HCP – DATA and in there we define the next step that will be the product selection, that is performed under another wpforms forms, the options are: PRODUCT – DEDCS, PRODUCT – DURO or PRODUCT – DWHCS, we again pass the data in the url
    5. In one of these product selection options of wpforms we pre populate the forms fields in hidden getting the data from the url, we also configured each product with a special class name (the product code number) – PLEASE REFER TO THE TASK CALLED: Custom code options in samples form – and we fire the emails to integromat so it can create the files sent to rxs, its is important to notice that the form is not placed in shortcode form rather it is placed in data form inside one of 3 php files that according to the user selected template that will route to any of these options: duro.php or dedcs.php or dwhcs.php, the data again is sent in the url
    6. and as a confirmation we route the user finally to the file samples-configuration-report.php as we get all the info from 2 places (the url and the mysql database (advanced post type samples) using this data to build 3 things, first: the email for integromat so it can pre populate the report that is saved in a google sheets outside wordpress using integromat, second: the visual confirmation of the options selected and the unique id (defined in wpforms), and third and final: (currently disabled) an email to the rep (user) that placed the form with the same data contained in the visual confirmation.

Leave a Reply