{"id":22452107,"url":"https://github.com/uidu-org/active-campaign-integration","last_synced_at":"2025-10-17T01:57:40.879Z","repository":{"id":40177683,"uuid":"241047318","full_name":"uidu-org/active-campaign-integration","owner":"uidu-org","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-21T00:14:32.000Z","size":46,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T18:41:09.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uidu-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-17T07:41:36.000Z","updated_at":"2020-10-01T08:37:23.000Z","dependencies_parsed_at":"2023-02-12T07:01:12.638Z","dependency_job_id":null,"html_url":"https://github.com/uidu-org/active-campaign-integration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uidu-org/active-campaign-integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uidu-org%2Factive-campaign-integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uidu-org%2Factive-campaign-integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uidu-org%2Factive-campaign-integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uidu-org%2Factive-campaign-integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uidu-org","download_url":"https://codeload.github.com/uidu-org/active-campaign-integration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uidu-org%2Factive-campaign-integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279270045,"owners_count":26137668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T06:09:47.079Z","updated_at":"2025-10-17T01:57:40.840Z","avatar_url":"https://github.com/uidu-org.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveCampaignIntegration\n\nActiveCampaign allows updating and creating custom values for a contact, but it does so with single calls. This gem allows to selectively update only the custom values that changed since the last sync, and includes some ActiveJob helpers to do so asyncronously.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'active_campaign_integration'\n```\n\nAnd then execute:\n\n```bash\nbundle install\n```\n\nOr install it yourself as:\n\n```bash\ngem install active_campaign_integration\n```\n\n## Usage\n\nSetup you ActiveCampaign Integration with your user tokens. Puts this into an initializers `config/initializers/active_campaign_integration.rb`\n\n```ruby\nActiveCampaignIntegration.setup do |config|\n  config.base_url = ENV['AC_BASE_URL']\n  config.api_token = ENV['AC_API_TOKEN']\n\n  # user method to create the list of fields to pass to AC\n  config.custom_fields_getter = :active_campaign_custom_fields\n  config.queue_name = 'crm.fifo'\n  config.evt_key = ENV['AC_API_EVT_KEY']\n  config.evt_act_id = ENV['AC_API_EVT_ACT_ID']\nend\n```\n\nIn user model `user.rb`, define a method to create the list for AC. For instance:\n\n```ruby\ndef active_campaign_custom_fields\n  list = []\n\n  # privacy\n  list \u003c\u003c { field: 381, value: self.cf_1273 ? 'Acconsento' : 'Non acconsento' }\n  list \u003c\u003c { field: 383, value: self.cf_1365 ? 'Acconsento' : 'Non acconsento' }\n  list\nend\n```\n\nAvailable jobs\n\n| name                                            | params                                       |\n| ----------------------------------------------- | -------------------------------------------- |\n| ActiveCampaignIntegration::Jobs::SyncJob        | user                                         |\n| ActiveCampaignIntegration::Jobs::CreateEventJob | user, event_name = 'test', event_value = nil |\n\nEg:\n\n```ruby\n  ActiveCampaignIntegration::Jobs::CreateEventJob.perform_later(\n    current_user,\n    'JPAnalytics - MyPeople - Primo Dipendente',\n    nil\n  )\n\n  ActiveCampaignIntegration::Jobs::SyncJob.perform_later(current_user)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/active_campaign_integration. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/active_campaign_integration/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the ActiveCampaignIntegration project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/active_campaign_integration/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuidu-org%2Factive-campaign-integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuidu-org%2Factive-campaign-integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuidu-org%2Factive-campaign-integration/lists"}