Xero / Pipedrive Integration - Search Contact Error

Hi,

New to make. Seeking support. We’re trying to create new invoices in Xero from new deals. The trigger is when the deal is moved to Send Quote stage. The initial set up seems to working but had error on Search for contacts. Here’s some screenshot of error and blueprint attached.



blueprint (8).json (110.2 KB)

Usually when this occurs, I would delete and remake the connection.

If the error persists, you need to install the DevTool to inspect the specific error details.

If you have the Make DevTool Chrome extension installed, you should be able to view the request and response headers and body from each module when you manually run the scenario.

From the Help Center article about the Make DevTool:

Make DevTool allows you to debug your Make scenarios in a completely new way. It adds an extra pane to the Chrome Developer Tools. Using this new debugger pane, you’re able to check all the manual runs of your scenario, review all the performed operations and see the details of every API call performed. It also brings a whole bunch of new opportunities for Apps development. You’re able to check every call that your app has performed. Thanks to this extension, you can easily debug your scenario, see which module, operation, even which single response causes the error, and then get your scenario back on track. Try it out and let your scenarios shine!

For more information on how to install and use this, see https://www.make.com/en/help/scenarios/integromat-devtool

2 Likes

I think the initial part is working now. I changed some settings. But the creation of the invoice is getting an error:

This error is new, now you’re getting a “DataError”.

This means one of the fields is sending something that Xero isn’t expecting.

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Module 22

Simple Log

blueprint
blueprint (9).json (112.7 KB)

Module 20 output bundle - Search for contact

[
    {
        "ContactID": "7bee1e28-a7e2-4ebe-b218-00ad67818df4",
        "ContactNumber": "VW3418",
        "ContactStatus": "ACTIVE",
        "Name": "Julie Soh",
        "FirstName": "Julie",
        "LastName": "Soh",
        "EmailAddress": "",
        "BankAccountDetails": "",
        "Addresses": [
            {
                "AddressType": "POBOX",
                "AddressLine1": "",
                "City": "",
                "Region": "",
                "PostalCode": "",
                "Country": ""
            },
            {
                "AddressType": "STREET",
                "AddressLine1": "",
                "City": "",
                "Region": "",
                "PostalCode": "",
                "Country": ""
            }
        ],
        "Phones": [
            {
                "PhoneType": "DDI",
                "PhoneNumber": "",
                "PhoneAreaCode": "",
                "PhoneCountryCode": ""
            },
            {
                "PhoneType": "DEFAULT",
                "PhoneNumber": "",
                "PhoneAreaCode": "",
                "PhoneCountryCode": "+61"
            },
            {
                "PhoneType": "FAX",
                "PhoneNumber": "",
                "PhoneAreaCode": "",
                "PhoneCountryCode": "+61"
            },
            {
                "PhoneType": "MOBILE",
                "PhoneNumber": "0422 355 077",
                "PhoneAreaCode": "",
                "PhoneCountryCode": "+61"
            }
        ],
        "UpdatedDateUTC": "2017-02-20T18:29:15.600Z",
        "ContactGroups": [],
        "IsSupplier": false,
        "IsCustomer": true,
        "ContactPersons": [],
        "HasAttachments": false,
        "__IMTLENGTH__": 1,
        "__IMTINDEX__": 1
    }
]

Module 9 output-watch deals

[
    {
        "id": 4584,
        "creator_user_id": {
            "id": 15425454,
            "name": "Cristian Aguirre",
            "email": "cristian@visaways.com.au",
            "has_pic": 0,
            "pic_hash": null,
            "active_flag": true,
            "value": 15425454
        },
        "user_id": {
            "id": 15425454,
            "name": "Cristian Aguirre",
            "email": "cristian@visaways.com.au",
            "has_pic": 0,
            "pic_hash": null,
            "active_flag": true,
            "value": 15425454
        },
        "person_id": {
            "active_flag": true,
            "name": "Jussara Martins da Silva",
            "email": [
                {
                    "label": "home",
                    "value": "jussaramsn06@gmail.com",
                    "primary": true
                }
            ],
            "phone": [
                {
                    "label": "mobile",
                    "value": "0450808806",
                    "primary": true
                }
            ],
            "owner_id": 15425454,
            "value": 7447
        },
        "org_id": {
            "name": "FOXWELL MAGIC CHILDCARE",
            "people_count": 2,
            "owner_id": 15425454,
            "address": "E.C. Shopping Village, 334 Foxwell Road, Brisbane, QLD, 4209, AU",
            "active_flag": true,
            "cc_email": "visaways@pipedrivemail.com",
            "label_ids": [],
            "owner_name": "Cristian Aguirre",
            "value": 1099
        },
        "stage_id": 2,
        "title": "Jussara - 494",
        "value": 8000,
        "currency": "AUD",
        "add_time": "2024-01-23T01:40:25.000Z",
        "update_time": "2024-01-23T01:43:00.000Z",
        "stage_change_time": "2024-01-23T01:40:35.000Z",
        "active": true,
        "deleted": false,
        "status": "open",
        "probability": null,
        "next_activity_date": "2024-01-22T14:00:00.000Z",
        "next_activity_date-raw": "2024-01-23",
        "next_activity_time": "06:30:00",
        "next_activity_id": 2456,
        "last_activity_id": 2455,
        "last_activity_date": "2024-01-22T14:00:00.000Z",
        "last_activity_date-raw": "2024-01-23",
        "lost_reason": null,
        "visible_to": "3",
        "close_time": null,
        "pipeline_id": 1,
        "won_time": null,
        "first_won_time": null,
        "lost_time": null,
        "products_count": 0,
        "files_count": 0,
        "notes_count": 0,
        "followers_count": 1,
        "email_messages_count": 0,
        "activities_count": 2,
        "done_activities_count": 1,
        "undone_activities_count": 1,
        "participants_count": 1,
        "expected_close_date": "2024-02-05T14:00:00.000Z",
        "expected_close_date-raw": "2024-02-06",
        "last_incoming_mail_time": null,
        "last_outgoing_mail_time": null,
        "label": null,
        "stage_order_nr": 1,
        "person_name": "Jussara Martins da Silva",
        "org_name": "FOXWELL MAGIC CHILDCARE",
        "next_activity_subject": "Email Quote : Jussara Martins da Silva",
        "next_activity_type": "task",
        "next_activity_duration": "00:10:00",
        "next_activity_note": "Company Nomination\nFEE: $3300\nRCB: QLD\nSAF: $3000\nCredit Card Surcharge\n\nVisa Application\nFEE: $5500\nVAC: Primary\nSKILL: ACECQA\nCredit Card Surcharge\n",
        "formatted_value": "$8,000",
        "weighted_value": 8000,
        "formatted_weighted_value": "$8,000",
        "weighted_value_currency": "AUD",
        "rotten_time": null,
        "owner_name": "Cristian Aguirre",
        "cc_email": "visaways+deal4584@pipedrivemail.com",
        "f3533a50dbe6ceac4ad51b998d15542597f214e7": "Group Leader sponsored on SESR 494",
        "37b7a80f1378985c06cdd26436a893e5d4de0d98": {
            "id": "1335",
            "label": "(Subclass 494) - Skilled Employer Sponsored Regional (provisional) Visa"
        },
        "25515323f174c358055302dee25e3cbc2a8f0847": {
            "id": "1577",
            "label": "Client Referral - Applicant"
        },
        "org_hidden": false,
        "person_hidden": false,
        "customRaw": {
            "f3533a50dbe6ceac4ad51b998d15542597f214e7": "Group Leader sponsored on SESR 494",
            "37b7a80f1378985c06cdd26436a893e5d4de0d98": "1335",
            "25515323f174c358055302dee25e3cbc2a8f0847": "1577"
        }
    },
    {
        "id": 1118,
        "creator_user_id": {
            "id": 15425454,
            "name": "Cristian Aguirre",
            "email": "cristian@visaways.com.au",
            "has_pic": 0,
            "pic_hash": null,
            "active_flag": true,
            "value": 15425454
        },
        "user_id": {
            "id": 12852389,
            "name": "Ali",
            "email": "adellie@magneticalliance.com.au",
            "has_pic": 1,
            "pic_hash": "d7bec23e01a81d858edab9c293fb5ead",
            "active_flag": true,
            "value": 12852389
        },
        "person_id": {
            "active_flag": true,
            "name": "Test Name",
            "email": [
                {
                    "label": "work",
                    "value": "crm@magneticalliance.com.au",
                    "primary": true
                }
            ],
            "phone": [
                {
                    "value": "",
                    "primary": true
                }
            ],
            "owner_id": 15425454,
            "value": 2400
        },
        "org_id": null,
        "stage_id": 2,
        "title": "Test - Magnetic",
        "value": 4370,
        "currency": "AUD",
        "add_time": "2023-10-24T03:16:57.000Z",
        "update_time": "2024-01-23T03:12:21.000Z",
        "stage_change_time": "2024-01-23T03:12:20.000Z",
        "active": true,
        "deleted": false,
        "status": "open",
        "probability": null,
        "next_activity_date": "2024-01-22T14:00:00.000Z",
        "next_activity_date-raw": "2024-01-23",
        "next_activity_time": null,
        "next_activity_id": 2460,
        "last_activity_id": 1644,
        "last_activity_date": "2023-11-20T14:00:00.000Z",
        "last_activity_date-raw": "2023-11-21",
        "lost_reason": null,
        "visible_to": "3",
        "close_time": null,
        "pipeline_id": 1,
        "won_time": null,
        "first_won_time": "2023-10-24T03:16:57.000Z",
        "lost_time": null,
        "products_count": 2,
        "files_count": 0,
        "notes_count": 0,
        "followers_count": 3,
        "email_messages_count": 0,
        "activities_count": 2,
        "done_activities_count": 1,
        "undone_activities_count": 1,
        "participants_count": 1,
        "expected_close_date": null,
        "last_incoming_mail_time": null,
        "last_outgoing_mail_time": null,
        "label": null,
        "stage_order_nr": 1,
        "person_name": "Test Name",
        "org_name": null,
        "next_activity_subject": "Email Quote : Test Name",
        "next_activity_type": "task",
        "next_activity_duration": null,
        "next_activity_note": null,
        "formatted_value": "$4,370",
        "weighted_value": 4370,
        "formatted_weighted_value": "$4,370",
        "weighted_value_currency": "AUD",
        "rotten_time": null,
        "owner_name": "Ali",
        "cc_email": "visaways+deal1118@pipedrivemail.com",
        "f3533a50dbe6ceac4ad51b998d15542597f214e7": "",
        "37b7a80f1378985c06cdd26436a893e5d4de0d98": null,
        "25515323f174c358055302dee25e3cbc2a8f0847": null,
        "org_hidden": false,
        "person_hidden": false,
        "customRaw": {
            "f3533a50dbe6ceac4ad51b998d15542597f214e7": "",
            "37b7a80f1378985c06cdd26436a893e5d4de0d98": null,
            "25515323f174c358055302dee25e3cbc2a8f0847": null
        }
    }
]

Mod 9 - list product in a deal

[
    {
        "id": 7,
        "deal_id": 1118,
        "product_id": 693,
        "product_variation_id": null,
        "name": "Visa Application Charge - 173 (Primary Applicant)",
        "order_nr": 0,
        "item_price": 3210,
        "quantity": 1,
        "duration": 1,
        "duration_unit": null,
        "sum": 3210,
        "currency": "AUD",
        "active_flag": true,
        "enabled_flag": true,
        "add_time": "2024-01-22T07:47:39.000Z",
        "last_edit": "2024-01-22T07:47:39.000Z",
        "comments": null,
        "tax": 0,
        "quantity_formatted": "1",
        "sum_formatted": "$3,210",
        "tax_method": "inclusive",
        "discount": 0,
        "discount_type": "percentage",
        "product": null,
        "__IMTLENGTH__": 2,
        "__IMTINDEX__": 1
    },
    {
        "id": 8,
        "deal_id": 1118,
        "product_id": 690,
        "product_variation_id": null,
        "name": "Visa Application Charge - 189 (dependent child)",
        "order_nr": 1,
        "item_price": 1160,
        "quantity": 1,
        "duration": 1,
        "duration_unit": null,
        "sum": 1160,
        "currency": "AUD",
        "active_flag": true,
        "enabled_flag": true,
        "add_time": "2024-01-22T07:47:39.000Z",
        "last_edit": "2024-01-22T07:47:39.000Z",
        "comments": null,
        "tax": 0,
        "quantity_formatted": "1",
        "sum_formatted": "$1,160",
        "tax_method": "inclusive",
        "discount": 0,
        "discount_type": "percentage",
        "product": null,
        "__IMTLENGTH__": 2,
        "__IMTINDEX__": 2
    }
]

Mod 13 - array aggregator operation 2

[
    {
        "array": [
            {
                "TaxType": null,
                "ItemCode": null,
                "Quantity": 1,
                "Tracking": [],
                "TaxAmount": null,
                "LineAmount": 3210,
                "UnitAmount": 3210,
                "AccountCode": null,
                "Description": null,
                "DiscountRate": null,
                "DiscountAmount": null
            },
            {
                "TaxType": null,
                "ItemCode": null,
                "Quantity": 1,
                "Tracking": [],
                "TaxAmount": null,
                "LineAmount": 1160,
                "UnitAmount": 1160,
                "AccountCode": null,
                "Description": null,
                "DiscountRate": null,
                "DiscountAmount": null
            }
        ],
        "__IMTAGGLENGTH__": 2
    }
]

Hi @samliew here are the requirements. Please let me know if you need anything else. Thank you

Hi @DavidGurr_Make Hope you’re well. Is this something you can look into? Thank you so much.

I don’t know much about Xero (more so Pipedrive) … but I’m wondering if this is an issue around scopes.

When you create your Connection to Xero in Make, you’re prompted to choose the scopes for the connection. It’s best practice from a security point of view to only request the scopes you need (rather than all) - but sometimes that might not be obvious.

From looking at the Xero API documentation on scopes, I think you need to be sure to include the accounting.transactions and accounting.contacts scopes.

As before, you’ll need to delete and remake the connection in order to select the requried scopes.

If you’ve included those two scopes and it still doesn’t work, I’d try deleting and remaking again and selecting all scopes. If that works, then for best security I’d try again removing scopes.

3 Likes

Hi @DavidGurr_Make Thanks for those info. Actually it seems to be working but we just can’t get the item and description in Xero.

We can’t find the Product Description option when mapping out.

Just those two the Item name and Description. Since it only gives field from List of Products in a deal.

Do you know any person I can reach who specializes on this case? Thanks

and if we use Name in mapping it says it’s an invalid Item Code

Hi Ali.

The big question is - how have you unified your Item Codes between Xero and Pipedrive? If they’re different, that’s the first problem to crack.

If you already have the Xero Item Code in a field in the Pipedrive Product, then that’s what you need to specify in the Item field in your Array Aggregator. You might (for example) be using the “Product Code” field to hold this (which appears in the List Products in a Deal module output as the code parameter).

If you don’t yet have the Xero Item codes in your Pipedrive Product records, then you have two options:

  1. Create a custom field on the Pipedrive Product record to hold the Xero Item Code for that Product
  2. Have a separate lookup table in a Make Data Store where you lookup the Pipedrive Product Code and retrieve the Xero Item Code
2 Likes

Hi @DavidGurr_Make Thanks for the explanation.
The products uploaded in Pipedrive is a straight export from their Xero.

These are the details in Pipedrive

Problem is we can’t find the item name or item code in the mapping

There is the name though we tried that and that’s the error I’m raising it says it is invalid. But our product details are a direct export from Xero and uploaded to Pipedrive. We didn’t change anything. So, I think that’s not the correct one. There is really no Item Name or Item code to map out. So, we’re really not sure what is wrong…

After more investigation, it looks like there should be more information in a collection under the product parameter (see the Pipedrive API endpoint doc - you’ll need to fully expand data and product in the response section to see it).

But that parameter is always returning as empty (I’ve verified that here). It doesn’t seem to be an error in the List Products in a Deal module, as I get the same problem when using the Make an API Call module.

I’ll raise a question on that with our Apps team.

As a temporary workaround, you could add a Get a Product module after List Products in a Deal and then use the code parameter from that in your Array Aggregator.

2 Likes

Deep in the Pipedrive API doc is note of an optional query parameter on the endpoint that’s used by the List Products in a Deal module.

Ideally, that should be a selectable parameter in the List Products in a Deal module.

Until that’s updated, rather than adding the Get a Product module as I’d previously suggested (which would use an extra operation for each Product on each Deal), you can use the Make an API Call module as follows:


3 Likes

Hi @DavidGurr_Make Thank you so much. Your explanation in the first message is exactly what we are looking for; there should be more data to choose from in List of Products to map out the items.

Regarding the images. Are you saying we remove the List of Products module and use the Get a product module instead?

@DavidGurr_Make or Remove the watch deals and change to Get a product?