SOLVED

Accessing SFDC Sync Attributes on Program via REST API

Go to solution
Chad_Craver
Level 1

Accessing SFDC Sync Attributes on Program via REST API

Hi there,

 

I'm using the REST API. I want to check if a given Program has been synced with SFDC and retrieve the SFDC Campaign Id if it has been synced. Is this possible?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Accessing SFDC Sync Attributes on Program via REST API

Yes. The property "sfdcId" is returned by the browse endpoint (/rest/asset/v1/programs.json) and by direct fetching of the program.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Accessing SFDC Sync Attributes on Program via REST API

Yes. The property "sfdcId" is returned by the browse endpoint (/rest/asset/v1/programs.json) and by direct fetching of the program.

Chad_Craver
Level 1

Re: Accessing SFDC Sync Attributes on Program via REST API

Thanks for the reply, Sanford. When I retrieve a program with that endpoint, sfdcId isn't included in the response. Below is an example. Why might this be?

 

{
  "success": true,
  "errors": [],
  "requestId": "####################",
  "warnings": [],
  "result": [
    {
      "id": 9283,
      "name": "Program name",
      "description": "",
      "createdAt": "2018-06-15T20:54:27Z+0000",
      "updatedAt": "2018-06-15T20:54:27Z+0000",
      "url": "https://app-abj.marketo.com/",
      "type": "Default",
      "channel": "Telemarketing",
      "folder": {
        "type": "Folder",
        "value": 19189,
        "folderName": "My Folder"
      },
      "status": "",
      "workspace": "Default",
      "tags": [
        {
          "tagType": "Program Lead",
          "tagValue": "Jane Doe"
        }
      ],
      "costs": []
    }
  ]
}

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Accessing SFDC Sync Attributes on Program via REST API

Is that Program currently synced with an SFDC Campaign? (Show a screenshot pls.)

Chad_Craver
Level 1

Re: Accessing SFDC Sync Attributes on Program via REST API


@SanfordWhiteman wrote:

Is that Program currently synced with an SFDC Campaign? (Show a screenshot pls.)


Hi Sanford, 

 

I see now that the field is only present in the response if the campaign has already been synced.

 

Thanks for your help.